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

Use cargo-config2 to load cargo config #237

Merged
merged 1 commit into from
Jan 9, 2023
Merged

Use cargo-config2 to load cargo config #237

merged 1 commit into from
Jan 9, 2023

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Jan 9, 2023

This uses cargo-config2 to load Cargo configuration.

This brings the following improvements:

  • More accurate cargo configuration loading and resolution.
  • Fix installation failure on Rust 1.60 and 1.61 by removing dependency on target-spec. Fixes [bug] rustc version err when install from cargo or source #236
  • Remove run-time dependency on unstable cargo config get. (Previously, this command was used in a form allowing failure, like rust-analyzer does.)

@taiki-e taiki-e marked this pull request as ready for review January 9, 2023 10:40
@taiki-e taiki-e merged commit edcc590 into main Jan 9, 2023
@taiki-e taiki-e deleted the cargo-config2 branch January 9, 2023 10:50
@jedbrown
Copy link

This commit appears to have broken the --doctests option. The previous commit worked.

$ cargo llvm-cov test --doctests
warning: --doctests option is unstable
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `/usr/bin/sccache rustc - --crate-name ___ --print=file-names -C instrument-coverage --cfg=coverage --cfg=coverage_nightly --cfg=trybuild_no_target -Z unstable-options --persist-doctests /home/jed/src/cargo-llvm-cov/target/llvm-cov-target/doctestbins --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit status: 1)
  --- stderr
  error: Unrecognized option: 'persist-doctests'

error: process didn't exit successfully: `/home/jed/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo test -Z doctest-in-workspace --manifest-path /home/jed/src/cargo-llvm-cov/Cargo.toml --target-dir /home/jed/src/cargo-llvm-cov/target/llvm-cov-target` (exit status: 101)
$ cargo --version
cargo 1.68.0-nightly (8c460b223 2023-01-04)

@taiki-e
Copy link
Owner Author

taiki-e commented Jan 10, 2023

@jedbrown Thanks for the report and sorry for the breakage! I released the fix in 0.5.5 (7aace00).

@jedbrown
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] rustc version err when install from cargo or source
2 participants