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

tests/normal-dev-build.rs test failures since update of cargo #151

Closed
est31 opened this issue Jan 22, 2023 · 3 comments
Closed

tests/normal-dev-build.rs test failures since update of cargo #151

est31 opened this issue Jan 22, 2023 · 3 comments

Comments

@est31
Copy link
Owner

est31 commented Jan 22, 2023

Since the update of cargo to 0.66 in a103529 , there have been two regressions. One was fixed by a14f2a7, but the second is still around:

      Running `/home/runner/work/cargo-udeps/cargo-udeps/target/debug/deps/normal_dev_build-9001a7bb6731d304`

running 2 tests
test with_all_targets ... FAILED
test without_all_targets ... ok

failures:

---- with_all_targets stdout ----
thread 'with_all_targets' panicked at 'assertion failed: `(left == right)`

Diff < left / right > :
 unused dependencies:
 `normal_dev_build v0.0.1 (██████████)`
 ├─── dependencies
 │    └─── "if_chain"
<├─── dev-dependencies
<│    └─── "maplit"
 └─── build-dependencies
      └─── "matches"
 Note: They might be false-positive.
       For example, `cargo-udeps` cannot detect usage of crates that are only used in doc-tests.
       To ignore some dependencies, write `package.metadata.cargo-udeps.ignore` in Cargo.toml.

Through a git bisect of cargo, I've traced this down to the clap upgrade of cargo, that means any commit before works, any commit after doesn't. Also, the issue has nothing to do with the rustc used, as both the older and newer rustc work. I'm filing this issue to collect more information about the regression.

@est31
Copy link
Owner Author

est31 commented Jan 22, 2023

Also, FTR, this is the reason why I've held back a release of cargo-udeps since, because I don't know how widespread the regression is.

@est31
Copy link
Owner Author

est31 commented Apr 28, 2023

The issue seems to be that cargo does not interpret the cli arguments of the subcommand any more.

On 19ecf74:

info: filter: Only { all_targets: true, lib: Default, bins: All, examples: All, tests: All, benches: All }

On master:

info: filter: Default { required_features_filterable: true }

(When you do cargo +nightly test --all --no-fail-fast --test normal-dev-build with_all_target, and add a line config.shell().info(format_args!("filter: {:?}", compile_opts.filter))?; to OptUdeps::run, plus change stderr = Shell::from_write(Box::new(vec![])) to stderr = Shell::new() in Runner::run for printing).

@est31
Copy link
Owner Author

est31 commented Apr 28, 2023

Workaround applied in 0d4889b. Upstream issue filed: clap-rs/clap#4869

est31 added a commit that referenced this issue Apr 28, 2023
@est31 est31 mentioned this issue May 3, 2023
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

No branches or pull requests

1 participant