-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move rustbook to its own workspace. #127786
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging. |
This comment has been minimized.
This comment has been minimized.
57b5f1d
to
590f58f
Compare
☔ The latest upstream changes (presumably #127831) made this pull request unmergeable. Please resolve the merge conflicts. |
590f58f
to
eff8d03
Compare
r=me |
☔ The latest upstream changes (presumably #128056) made this pull request unmergeable. Please resolve the merge conflicts. |
eff8d03
to
5dfa062
Compare
Thanks for the review. Not sure if you wanted to wait for something instead of issuing the approval directly? Regardless, I think this should be ready. @bors r=Mark-Simulacrum rollup=never |
@bors p=1 This is blocking some reference changes. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (cefe1dc): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -4.2%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary -3.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 772.148s -> 770.458s (-0.22%) |
…ulacrum Move rustbook to its own workspace. This moves rustbook (the wrapper around mdbook) to its own Cargo workspace. This is done for two reasons: - Some users want to avoid having to check out documentation submodules if they are not working on documentation. These submodules are required for submodules that have Cargo dependencies in the tree (such as mdbook preprocessors). - The [pinned `memchr`](https://github.com/rust-lang/rust/blob/eb72697e41b00e5d8723f14c64a969d59d9b9474/compiler/rustc_ast/Cargo.toml#L10) is causing problems with updating. That pin is only necessary for the standard library, but unfortunately it is affecting all other crates. This will have some drawbacks: - A slight increase in the vendor directory size. My measurement shows about a 14M increase (0.7%), but somehow the compressed filesize is smaller. - The dependencies for rustbook now need to be managed separately. I have updated the cron job to try to mitigate this. - There will be a slight dist build time penalty. I'm not sure what it will be, since it heavily depends on the machine, but I suspect in the 30-45s range. - Adds more complexity to things like bootstrap and tidy. There are a few other alternatives considered: - Publish preprocessors on crates.io. This adds the burden of publishing every change, and ensuring those publishes happen and the sources don't get out of sync, and somehow syncing those updates back to rust-lang/rust during the automatic updates. This is also more work. - Move the submodules to subtrees. These have the added burden of doing updates in a way that is more difficult than submodules. I believe it also causes problems with GitHub's `#NNNN` tagging and closing issues. This is also more work. The only thing I haven't tested here is the cron job. However, there's a pretty decent chance this won't pass CI, or that I missed something.
Did this PR break tidy? I can't run tidy and this seems relevant:
Because my |
Yea, I'll post a PR. |
…k-Simulacrum Fix tidy check if book submodule is not checked out This fixes tidy in a checkout without submodules. rust-lang#127786 added a new cargo workspace, and the corresponding checks in tidy. There is code in tidy to skip those checks if the submodule is checked out, but that code assumed the root of the workspace was also the root of the submodule. With `rustbook`, the root is `src/tools/rustbook`, but the submodules it needs are in the `src/doc` directory. The solution here is to explicitly list which submodules are needed instead of assuming the root is also the submodule.
…obzol Fix dependencies cron job This fixes a mistake in rust-lang#127786 that broke the dependencies update cron job. I accidentally set the wrong path in the cargo command.
Rollup merge of rust-lang#129100 - ehuss:fix-dependencies-update, r=Kobzol Fix dependencies cron job This fixes a mistake in rust-lang#127786 that broke the dependencies update cron job. I accidentally set the wrong path in the cargo command.
This moves rustbook (the wrapper around mdbook) to its own Cargo workspace. This is done for two reasons:
memchr
is causing problems with updating. That pin is only necessary for the standard library, but unfortunately it is affecting all other crates.This will have some drawbacks:
There are a few other alternatives considered:
#NNNN
tagging and closing issues. This is also more work.The only thing I haven't tested here is the cron job. However, there's a pretty decent chance this won't pass CI, or that I missed something.