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

x check --json-output doesn't use JSON output for building bootstrap itself #107832

Closed
jyn514 opened this issue Feb 9, 2023 · 3 comments · Fixed by #107873
Closed

x check --json-output doesn't use JSON output for building bootstrap itself #107832

jyn514 opened this issue Feb 9, 2023 · 3 comments · Fixed by #107873
Assignees
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jyn514
Copy link
Member

jyn514 commented Feb 9, 2023

PS C:\Users\Joshua Nelson\src\rust> x c --json-output
Building bootstrap
   Compiling bootstrap v0.0.0 (C:\Users\Joshua Nelson\src\rust\src\bootstrap)
    Finished dev [unoptimized] target(s) in 8.45s
extracting C:\Users\Joshua Nelson\src\rust\build\cache\319b88c463fe6f51bb6badbbd3bb97252a60f3a5\rust-std-nightly-x86_64-pc-windows-msvc.tar.xz to C:\Users\Joshua Nelson\src\rust\build\x86_64-pc-windows-msvc\ci-rustc
extracting C:\Users\Joshua Nelson\src\rust\build\cache\319b88c463fe6f51bb6badbbd3bb97252a60f3a5\rustc-nightly-x86_64-pc-windows-msvc.tar.xz to C:\Users\Joshua Nelson\src\rust\build\x86_64-pc-windows-msvc\ci-rustc
extracting C:\Users\Joshua Nelson\src\rust\build\cache\319b88c463fe6f51bb6badbbd3bb97252a60f3a5\rustc-dev-nightly-x86_64-pc-windows-msvc.tar.xz to C:\Users\Joshua Nelson\src\rust\build\x86_64-pc-windows-msvc\ci-rustc
extracting C:\Users\Joshua Nelson\src\rust\build\cache\319b88c463fe6f51bb6badbbd3bb97252a60f3a5\rust-src-nightly.tar.xz to C:\Users\Joshua Nelson\src\rust\build\x86_64-pc-windows-msvc\ci-rustc
Checking stage0 library artifacts (x86_64-pc-windows-msvc -> x86_64-pc-windows-msvc)
   Compiling compiler_builtins v0.1.85
    Checking core v0.0.0 (C:\Users\Joshua Nelson\src\rust\library\core)
   Compiling libc v0.2.138
   Compiling cc v1.0.77
   Compiling memchr v2.5.0
   Compiling std v0.0.0 (C:\Users\Joshua Nelson\src\rust\library\std)
{"reason":"compiler-artifact","package_id":"libc 0.2.138 (registry+https://github.com/rust-lang/crates.io-index)","manifest_path":"C:\\Users\\Joshua Nelson\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\libc-0.2.138\\Cargo.toml","target":{"kind":["custom-build"],"crate_types":["bin"],"name":"build-script-build","src_path":"C:\\Users\\Joshua Nelson\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\libc-0.2.138\\build.rs","edition":"2015","doc":false,"doctest":false,"test":false},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":false,"overflow_checks":false,"test":false},"features":["align","rustc-dep-of-std","rustc-std-workspace-core"],"filenames":["C:\\Users\\Joshua Nelson\\src\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\release\\build\\libc-aff1973d4fdf7f57\\build-script-build.exe","C:\\Users\\Joshua Nelson\\src\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\release\\build\\libc-aff1973d4fdf7f57\\build_script_build.pdb"],"executable":null,"fresh":false}

I think this is one of the reasons (maybe not the only one?) that introducing a build failure in src/bootstrap means that rust-analyzer doesn't show red squigglies in the IDE.

Mentoring instructions: add a new --json-output flag to bootstrap.py around

parser.add_argument('--clean', action='store_true')
and pass --message-format json to cargo around
if self.use_locked_deps:
args.append("--locked")
if self.use_vendored_sources:
args.append("--frozen")
if self.get_toml("metrics", "build"):
args.append("--features")
args.append("build-metrics")
if color == "always":
args.append("--color=always")
elif color == "never":
args.append("--color=never")
if it's set.

@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself labels Feb 9, 2023
@jyn514
Copy link
Member Author

jyn514 commented Feb 9, 2023

@jyn514 jyn514 added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Feb 9, 2023
@zephaniahong
Copy link
Contributor

@rustbot claim

@albertlarsan68
Copy link
Member

Solving this may also solve #101070

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants