-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
error: output of --print=file-names missing when learning about target-specific information from rustc when --target
is specified
#1068
Comments
Sorry for the delay, I was travelling and only just got home. As far as I can tell, this is a bug upstream, likely in Would you mind making a bug report issue in https://github.com/rust-lang/rust and linking it to this one? If you'd prefer not to, I can also open the issue upstream. But since you already did all the work to narrow down the source of the bug, I didn't want to appear to take credit for your work by opening the upstream issue :) |
😄 I'd like to open one on rust-lang repo. I'll try to make reproducible code that can be run without cargo-semver-checks. |
I've submitted it: rust-lang/rust#135233 |
close obi1kenobi#1068 Cargo relies on warning diagnostics to find information, --cap-lints=allow eliminates the warnings, so set the value to warn level to keep it.
I believe rust-lang/cargo#15036 should fix this. It will get into the main rust-lang/rust repo on Friday, so expect to see it on nightly in the weekend! |
Both testcases require `rustup target add x86_64-unknown-linux-gnu`. But currently, cargo has a bug for learning target info: command=`CARGO_BUILD_TARGET="aarch64-unknown-none" "/home/zjp/rust/cargo-semver-checks/target/debug/cargo-semver-checks" "semver-checks" "check-release" "--manifest-path=t est_crates/template/new" "--baseline-root=test_crates/template/old"` code=1 stdout="" stderr=``` Building template v0.1.0 (current) error: running cargo-doc on crate \'template\' failed with output: ----- error: output of --print=file-names missing when learning about target-specific information from rustc command was: `/home/zjp/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc - --crate-name ___ --print=file-names --cap-lints=allow --target aarch64-unknown-none --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=c rate-name --print=cfg` --- stdout ___ lib___.rlib lib___.a /home/zjp/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu off ___ debug_assertions fmt_debug=\"full\" overflow_checks panic=\"abort\" proc_macro relocation_model=\"static\" target_abi=\"\" target_arch=\"aarch64\" target_endian=\"little\" target_env=\"\" target_feature=\"neon\" target_has_atomic target_has_atomic=\"128\" target_has_atomic=\"16\" target_has_atomic=\"32\" target_has_atomic=\"64\" target_has_atomic=\"8\" target_has_atomic=\"ptr\" target_has_atomic_equal_alignment=\"128\" target_has_atomic_equal_alignment=\"16\" target_has_atomic_equal_alignment=\"32\" target_has_atomic_equal_alignment=\"64\" target_has_atomic_equal_alignment=\"8\" target_has_atomic_equal_alignment=\"ptr\" target_has_atomic_load_store target_has_atomic_load_store=\"128\" target_has_atomic_load_store=\"16\" target_has_atomic_load_store=\"32\" target_has_atomic_load_store=\"64\" target_has_atomic_load_store=\"8\" target_has_atomic_load_store=\"ptr\" target_os=\"none\" target_pointer_width=\"64\" target_vendor=\"unknown\" ub_checks Hopefully, the fix from cargo will land in weekend. Ref obi1kenobi#1068 (comment)
Steps to reproduce the bug with the above code
Thanks for this great tool!
I see a bunch of these repos whos semver-checks results on non-host (x86_64-unknown-linux-gnu) targets report as the title shows.
One of the repos is https://github.com/arceos-org/arm_gicv2 . (I can list more if needed.)
Reproducible commands:
Actual Behaviour
I got compilation error from rustc.
I also run the suggested commands to reproduce the compilation error, and it compiles just fine.
Expected Behaviour
There should be no compilation errors.
Generated System Information
Software version
cargo-semver-checks 0.38.0 (507393d-modified)
Operating system
Command-line
cargo version
Compile time information
Cargo build configuration:
Build Configuration
None.
Additional Context
I think it might be a bug with RUSTFLAGS. When I look into the generated cargo doc command from semver-checks, it's like the following
This just results in the exact same error report as above. (I'm not sure if the hash string in path is the same for your local testing.)
And when
RUSTFLAGS=--cap-lints=allow
is not included, it compiles and successfully generates the doc.So I try removing RUSTFLAGS from
run_cargo_doc
fn, install it locally, and runcargo semver-checks --target aarch64-unknown-none-softfloat
agian, semver-checks just works.The text was updated successfully, but these errors were encountered: