Skip to content

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

Closed
@jyn514

Description

@jyn514
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.1485827954.workers.dev-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.1485827954.workers.dev-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.

Metadata

Metadata

Assignees

Labels

A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustC-bugCategory: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions