-
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
Rustdoc remove old style files #57929
Rustdoc remove old style files #57929
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
fa1bea1
to
65440a3
Compare
src/bootstrap/doc.rs
Outdated
@@ -317,7 +317,8 @@ fn invoke_rustdoc(builder: &Builder, compiler: Compiler, target: Interned<String | |||
.arg("-o").arg(&out) | |||
.arg(&path) | |||
.arg("--markdown-css") | |||
.arg("../rust.css"); | |||
.arg("../rust.css") | |||
.arg("--generate-redirect-pages"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't do anything because this code is only used for markdown files in src/doc/book/redirects
.
src/librustdoc/html/render.rs
Outdated
} | ||
// If the item is a macro, redirect from the old macro URL (with !) | ||
// to the new one (without). | ||
if item_type == ItemType::Macro { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The macro redirects have nothing to do with the redirects used by RLS so it doesn't make any sense for them to be controlled by the same command line argument.
Updated. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
7317058
to
ecd264a
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
ecd264a
to
86bd63a
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
86bd63a
to
ea3b173
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
src/bootstrap/doc.rs
Outdated
@@ -552,10 +553,13 @@ impl Step for Test { | |||
let my_out = builder.crate_doc_out(target); | |||
t!(symlink_dir_force(&builder.config, &my_out, &out_dir)); | |||
|
|||
let mut cargo = builder.cargo(compiler, Mode::Test, target, "doc"); | |||
let mut cargo = builder.cargo(compiler, Mode::Test, target, "rustdoc"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To pass extra arguments to the underlying rustdoc you need to set an environment variable with cargo.env()
and then read it in the rustdoc wrapper in src/bootstrap/bin/rustdoc.rs
like how RUSTDOC_CRATE_VERSION
is handled:
rust/src/bootstrap/bin/rustdoc.rs
Lines 55 to 60 in f40aaa6
if let Some(version) = env::var_os("RUSTDOC_CRATE_VERSION") { | |
// This "unstable-options" can be removed when `--crate-version` is stabilized | |
cmd.arg("-Z") | |
.arg("unstable-options") | |
.arg("--crate-version").arg(version); | |
} |
There is no need to use cargo rustdoc
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know that. Thanks a lot for the info!
ea3b173
to
0b23572
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
0b23572
to
e210290
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
e210290
to
d024cf0
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
d024cf0
to
397eb4f
Compare
Finally successful! |
r? @ollie27 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the removal of the macro redirects this looks good.
src/librustdoc/html/render.rs
Outdated
|
||
// If the item is a macro, redirect from the old macro URL (with !) | ||
// to the new one (without). | ||
if item_type == ItemType::Macro { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have the macro redirects been removed? The decision from #35705 was to keep them. If you really want to remove them then that needs to be done in a different PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, understood it the other way for some reason. Fixing it!
75fa67b
to
41a373c
Compare
Updated. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
41a373c
to
d264755
Compare
Fixed CI as well. |
Ping @ollie27 |
@bors r+ |
📌 Commit d264755 has been approved by |
⌛ Testing commit d264755 with merge 9cfa504374336252d22cdaca7371319d76900f2d... |
💔 Test failed - checks-travis |
Your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors retry -- apparently we can't clone the repo anymore on macOS |
Funny times I guess for the infra team. :p |
…tyle-files, r=ollie27 Rustdoc remove old style files Reopening of rust-lang#56577 (which I can't seem to reopen...). I made the flag unstable so with this change, what was blocking the PR is now gone I assume.
Rollup of 19 pull requests Successful merges: - #57929 (Rustdoc remove old style files) - #57981 (Fix #57730) - #58074 (Stabilize slice_sort_by_cached_key) - #58196 (Add specific feature gate error for const-unstable features) - #58293 (Remove code for updating copyright years in generate-deriving-span-tests) - #58306 (Don't default on std crate when manipulating browser history) - #58359 (librustc_mir: use ? in impl_snapshot_for! macro) - #58395 (Instant::checked_duration_since) - #58429 (fix Box::into_unique effecitvely transmuting to a raw ptr) - #58433 (Update which libcore/liballoc tests Miri ignores, and document why) - #58438 (Use posix_spawn_file_actions_addchdir_np when possible) - #58440 (Whitelist the ARM v6 target-feature) - #58448 (rustdoc: mask `compiler_builtins` docs) - #58468 (split MaybeUninit into several features, expand docs a bit) - #58477 (Fix the syntax error in publish_toolstate.py) - #58479 (compile-pass test for #53606) - #58489 (Fix runtime error in generate-keyword-tests) - #58496 (Fix documentation for std::path::PathBuf::pop) - #58509 (Notify myself when Clippy toolstate changes)
…tyle-files, r=ollie27 Rustdoc remove old style files Reopening of rust-lang#56577 (which I can't seem to reopen...). I made the flag unstable so with this change, what was blocking the PR is now gone I assume.
Rollup of 19 pull requests Successful merges: - #57929 (Rustdoc remove old style files) - #57981 (Fix #57730) - #58074 (Stabilize slice_sort_by_cached_key) - #58196 (Add specific feature gate error for const-unstable features) - #58293 (Remove code for updating copyright years in generate-deriving-span-tests) - #58306 (Don't default on std crate when manipulating browser history) - #58359 (librustc_mir: use ? in impl_snapshot_for! macro) - #58395 (Instant::checked_duration_since) - #58429 (fix Box::into_unique effecitvely transmuting to a raw ptr) - #58433 (Update which libcore/liballoc tests Miri ignores, and document why) - #58438 (Use posix_spawn_file_actions_addchdir_np when possible) - #58440 (Whitelist the ARM v6 target-feature) - #58448 (rustdoc: mask `compiler_builtins` docs) - #58468 (split MaybeUninit into several features, expand docs a bit) - #58479 (compile-pass test for #53606) - #58489 (Fix runtime error in generate-keyword-tests) - #58496 (Fix documentation for std::path::PathBuf::pop) - #58509 (Notify myself when Clippy toolstate changes) - #58521 (Fix tracking issue for error iterators)
Reopening of #56577 (which I can't seem to reopen...).
I made the flag unstable so with this change, what was blocking the PR is now gone I assume.
r? @QuietMisdreavus