Skip to content
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

stabilize stage management for rustc tools, especially on cargo #135990

Closed

Conversation

onur-ozkan
Copy link
Member

-to be filled-

r? ghost

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jan 24, 2025
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jan 28, 2025

☔ The latest upstream changes (presumably #135832) made this pull request unmergeable. Please resolve the merge conflicts.

@onur-ozkan onur-ozkan force-pushed the stabilize-stage-handling branch from d067acb to 4ddb1ac Compare February 3, 2025 10:34
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@onur-ozkan onur-ozkan force-pushed the stabilize-stage-handling branch from 5fc8108 to 79b6c4b Compare February 3, 2025 12:36
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan onur-ozkan force-pushed the stabilize-stage-handling branch from 460b835 to 6ea392a Compare February 4, 2025 08:32
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan onur-ozkan force-pushed the stabilize-stage-handling branch from 6ea392a to e627ca5 Compare February 4, 2025 20:37
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan onur-ozkan force-pushed the stabilize-stage-handling branch from e627ca5 to 01fcb0d Compare February 5, 2025 06:16
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan onur-ozkan force-pushed the stabilize-stage-handling branch from 01fcb0d to a992247 Compare February 5, 2025 09:13
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan onur-ozkan force-pushed the stabilize-stage-handling branch from a992247 to abb8c0f Compare February 5, 2025 09:52
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan onur-ozkan force-pushed the stabilize-stage-handling branch from abb8c0f to e138f5a Compare February 5, 2025 21:08
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan onur-ozkan force-pushed the stabilize-stage-handling branch from e138f5a to b222ef8 Compare February 6, 2025 07:50
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Feb 9, 2025

☔ The latest upstream changes (presumably #136747) made this pull request unmergeable. Please resolve the merge conflicts.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
@onur-ozkan onur-ozkan force-pushed the stabilize-stage-handling branch from fb0ea00 to cb5df50 Compare February 17, 2025 14:45
Signed-off-by: onur-ozkan <work@onurozkan.dev>
@onur-ozkan onur-ozkan force-pushed the stabilize-stage-handling branch from cb5df50 to 186cb6f Compare February 17, 2025 14:51
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

thread 'main' panicked at src/bootstrap/src/bin/rustdoc.rs:78:19:


failed to run LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/bin/rustdoc" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1" "--edition=2021" "--crate-type" "lib" "--color" "always" "--crate-name" "rustfmt_nightly" "--test" "src/tools/rustfmt/src/lib.rs" "--test-run-directory" "/checkout/src/tools/rustfmt" "--target" "x86_64-unknown-linux-gnu" "-L" "dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps" "-L" "dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps" "--test-args" "--quiet" "--test-args" "-Z" "--test-args" "unstable-options" "--test-args" "--format" "--test-args" "json" "--extern" "annotate_snippets=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libannotate_snippets-1c866c8d71898d13.rlib" "--extern" "anyhow=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libanyhow-044eed416c22b4b9.rlib" "--extern" "bytecount=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libbytecount-a3ede1b010f872db.rlib" "--extern" "cargo_metadata=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libcargo_metadata-257fc9997a62e608.rlib" "--extern" "clap=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclap-d0c4a7474084d27e.rlib" "--extern" "clap_cargo=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclap_cargo-30a9748184b99aaa.rlib" "--extern" "diff=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libdiff-a1ea3527f8eebf6f.rlib" "--extern" "dirs=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libdirs-743accae0d9ac75d.rlib" "--extern" "getopts=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libgetopts-cc45f1385ea3fefc.rlib" "--extern" "ignore=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libignore-edccb43071ae765e.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9656da8cc10b9684.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libregex-43cbc45b509649d6.rlib" "--extern" "rustfmt_config_proc_macro=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/librustfmt_config_proc_macro-5353399b8116dbe7.so" "--extern" "rustfmt_nightly=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/librustfmt_nightly-f79b89f1a8e9f002.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libserde-0131eb5fe1e96186.rlib" "--extern" "serde_json=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libserde_json-2b21bbd6c4ea38a0.rlib" "--extern" "term=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libterm-d5bc866e250049ae.rlib" "--extern" "thiserror=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libthiserror-f2eb385afde4b5b9.rlib" "--extern" "toml=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libtoml-9a015bf354fa4abc.rlib" "--extern" "tracing=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libtracing-1b9ab3b65b7e1d32.rlib" "--extern" "tracing_subscriber=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libtracing_subscriber-2090845275fe9414.rlib" "--extern" "unicode_properties=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libunicode_properties-f592b5e68614ecca.rlib" "--extern" "unicode_segmentation=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libunicode_segmentation-eda766795dbeb928.rlib" "--extern" "unicode_width=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libunicode_width-69253cc673e1d8dd.rlib" "-C" "embed-bitcode=no" "--cfg" "feature=\"cargo-fmt\"" "--cfg" "feature=\"default\"" "--cfg" "feature=\"rustfmt-format-diff\"" "--check-cfg" "cfg(docsrs,test)" "--check-cfg" "cfg(feature, values(\"cargo-fmt\", \"default\", \"generic-simd\", \"rustfmt-format-diff\"))" "--cfg=windows_raw_dylib" "-Csymbol-mangling-version=v0" "-Zunstable-options" "--check-cfg=cfg(bootstrap)" "--check-cfg=cfg(llvm_enzyme)" "--check-cfg=cfg(rust_analyzer)" "-Dwarnings" "-Wrustdoc::invalid_codeblock_attributes" "--crate-version" "1.87.0-nightly\t(2ad0bf23c\t2025-02-17)" "--error-format" "human": No such file or directory (os error 2)

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: doctest failed, to rerun pass `--doc`
Build completed unsuccessfully in 0:01:19

@bors
Copy link
Contributor

bors commented Feb 18, 2025

☔ The latest upstream changes (presumably #137176) made this pull request unmergeable. Please resolve the merge conflicts.

@onur-ozkan onur-ozkan closed this Feb 19, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 23, 2025
…r=jieyouxu,Kobzol

stabilize stage management for rustc tools

rust-lang#135990 got out of control due to excessive complexity. This PR aims to achieve the same goal with a simpler approach, likely through multiple smaller PRs. I will keep the other one read-only and open as a reference for future work.

This work stabilizes the staging logic for `ToolRustc` programs, so you no longer need to handle build and target compilers separately in steps. Previously, most tools didn't do this correctly, which was causing the compiler to be built twice (e.g., `x test cargo --stage 1` would compile the stage 2 compiler before, but now it only compiles the stage 1 compiler).

I also tried to document how we should write `ToolRustc` steps as they are quite different and require more attention than other tools.

Next goal is to stabilize how stages are handled for the rustc itself. Currently, `x build --stage 1` builds the stage 1 compiler which is fine, but `x build compiler --stage 1` builds stage 2 compiler.

~~for now, r? ghost~~
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Feb 24, 2025
…u,Kobzol

stabilize stage management for rustc tools

rust-lang/rust#135990 got out of control due to excessive complexity. This PR aims to achieve the same goal with a simpler approach, likely through multiple smaller PRs. I will keep the other one read-only and open as a reference for future work.

This work stabilizes the staging logic for `ToolRustc` programs, so you no longer need to handle build and target compilers separately in steps. Previously, most tools didn't do this correctly, which was causing the compiler to be built twice (e.g., `x test cargo --stage 1` would compile the stage 2 compiler before, but now it only compiles the stage 1 compiler).

I also tried to document how we should write `ToolRustc` steps as they are quite different and require more attention than other tools.

Next goal is to stabilize how stages are handled for the rustc itself. Currently, `x build --stage 1` builds the stage 1 compiler which is fine, but `x build compiler --stage 1` builds stage 2 compiler.

~~for now, r? ghost~~
github-merge-queue bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Feb 24, 2025
…u,Kobzol

stabilize stage management for rustc tools

rust-lang/rust#135990 got out of control due to excessive complexity. This PR aims to achieve the same goal with a simpler approach, likely through multiple smaller PRs. I will keep the other one read-only and open as a reference for future work.

This work stabilizes the staging logic for `ToolRustc` programs, so you no longer need to handle build and target compilers separately in steps. Previously, most tools didn't do this correctly, which was causing the compiler to be built twice (e.g., `x test cargo --stage 1` would compile the stage 2 compiler before, but now it only compiles the stage 1 compiler).

I also tried to document how we should write `ToolRustc` steps as they are quite different and require more attention than other tools.

Next goal is to stabilize how stages are handled for the rustc itself. Currently, `x build --stage 1` builds the stage 1 compiler which is fine, but `x build compiler --stage 1` builds stage 2 compiler.

~~for now, r? ghost~~
BoxyUwU pushed a commit to BoxyUwU/rustc-dev-guide that referenced this pull request Feb 25, 2025
…u,Kobzol

stabilize stage management for rustc tools

rust-lang/rust#135990 got out of control due to excessive complexity. This PR aims to achieve the same goal with a simpler approach, likely through multiple smaller PRs. I will keep the other one read-only and open as a reference for future work.

This work stabilizes the staging logic for `ToolRustc` programs, so you no longer need to handle build and target compilers separately in steps. Previously, most tools didn't do this correctly, which was causing the compiler to be built twice (e.g., `x test cargo --stage 1` would compile the stage 2 compiler before, but now it only compiles the stage 1 compiler).

I also tried to document how we should write `ToolRustc` steps as they are quite different and require more attention than other tools.

Next goal is to stabilize how stages are handled for the rustc itself. Currently, `x build --stage 1` builds the stage 1 compiler which is fine, but `x build compiler --stage 1` builds stage 2 compiler.

~~for now, r? ghost~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants