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

Fixes rustdoc in stage 0, stage 1 #58238

Merged
merged 2 commits into from Feb 13, 2019

Conversation

Projects
None yet
6 participants
@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented Feb 6, 2019

When a request for rustdoc is passed for stage 0, x.py build --stage 0
src/tools/rustdoc or ensure(tool::Rustdoc { .. }) with top_stage = 0, we
return the rustdoc for that compiler (i.e., the beta rustdoc).

This fixes stage 0 of #52186 as well as being part of general workflow improvements (making stage 0 testing for std work) for rustbuild.

The stage 1 fix (second commit) completely resolves the problem, so this fixes #52186.

@Mark-Simulacrum

This comment has been minimized.

Copy link
Member Author

Mark-Simulacrum commented Feb 6, 2019

@Mark-Simulacrum Mark-Simulacrum changed the title Never build rustdoc in stage 0 Fixes rustdoc in stage 0, stage 1 Feb 7, 2019

@alexcrichton
Copy link
Member

alexcrichton left a comment

Looks good to me! Could the comments inside fn rustdoc(...) also be expanded to explain that the intention is that it returns a rustdoc paired with the rustc specified, not compiled with the rustc specified?

panic!("rustdoc in stage 0 must be snapshot rustdoc");
}
return builder.initial_rustc.with_file_name(exe("rustdoc", &target_compiler.host));
}
let target = target_compiler.host;
let build_compiler = if target_compiler.stage == 0 {

This comment has been minimized.

@alexcrichton

alexcrichton Feb 11, 2019

Member

I think this clause is no longer necessary, right?

Mark-Simulacrum added some commits Feb 6, 2019

Never build rustdoc in stage 0
When a request for rustdoc is passed for stage 0, x.py build --stage 0
src/tools/rustdoc or ensure(tool::Rustdoc { .. }) with top_stage = 0, we
return the rustdoc for that compiler (i.e., the beta rustdoc).
This fixes doctests in stage 1
The RUSTDOC_LIBDIR should be rustc_libdir, not sysroot_libdir; rustdoc
is like the compiler and should link against rustc's libdir.

Some people currently (i.e., in general, may not be on master) have doc
tests working, but no attempt to determine why has been attempted.

@Mark-Simulacrum Mark-Simulacrum force-pushed the Mark-Simulacrum:doctest-fix branch from a50bd07 to bb23b17 Feb 11, 2019

@Mark-Simulacrum

This comment has been minimized.

Copy link
Member Author

Mark-Simulacrum commented Feb 11, 2019

@bors r=alexcrichton

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 11, 2019

📌 Commit bb23b17 has been approved by alexcrichton

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Feb 13, 2019

Adding space for rollup, @bors p=1

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 13, 2019

⌛️ Testing commit bb23b17 with merge c005afc...

bors added a commit that referenced this pull request Feb 13, 2019

Auto merge of #58238 - Mark-Simulacrum:doctest-fix, r=alexcrichton
Fixes rustdoc in stage 0, stage 1

When a request for rustdoc is passed for stage 0, x.py build --stage 0
src/tools/rustdoc or ensure(tool::Rustdoc { .. }) with top_stage = 0, we
return the rustdoc for that compiler (i.e., the beta rustdoc).

This fixes stage 0 of #52186 as well as being part of general workflow improvements (making stage 0 testing for std work) for rustbuild.

The stage 1 fix (second commit) completely resolves the problem, so this fixes #52186.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 13, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: alexcrichton
Pushing c005afc to master...

@bors bors added the merged-by-bors label Feb 13, 2019

@bors bors merged commit bb23b17 into rust-lang:master Feb 13, 2019

1 check passed

homu Test successful
Details
@o01eg

This comment has been minimized.

Copy link
Contributor

o01eg commented Feb 19, 2019

Looks like it break #52317 again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment