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

Feature request: accept --manifest-path #412

Closed
CAD97 opened this issue Jul 20, 2022 · 2 comments · Fixed by #420
Closed

Feature request: accept --manifest-path #412

CAD97 opened this issue Jul 20, 2022 · 2 comments · Fixed by #420

Comments

@CAD97
Copy link

CAD97 commented Jul 20, 2022

Notably, this will allow cargo-msrv to run under cargo-hack for use in workspaces and to benefit from cargo-hack's detach-from-workspace implementation.

Specifically, I'd love to be able to cargo hack --workspace minimal-versions msrv verify -- cargo check --all-features, but this ends up running cargo msrv verify --manifest-path subcrate\Cargo.toml -- cargo check --all-features which cargo-msrv then rejects.

The desired behavior is fairly simple: retrieve the rust-version key from the given manifest path, and then forward the --manifest-path argument to the check invocation.

Running under cargo-hack also gives workspace support for free.

@foresterre
Copy link
Owner

Sounds great! I'll add it soon!

bors bot added a commit that referenced this issue Jul 24, 2022
420: Allow using manifest-path instead of crate path r=foresterre a=foresterre

* Now accepts either `--manifest-path <Cargo Manifest>` or `--path <Cargo Dir>`

closes #412, replaces #419 (Context changes negatively impacted running of test cases)

Co-authored-by: Martijn Gribnau <garm@ilumeo.com>
@foresterre
Copy link
Owner

I've tested #420 with cargo-hack on a repo with a workspace (*), which seems to give the desired results.

Will be included in cargo-msrv 0.16. Thanks for the request!

Output of `cargo hack --workspace msrv verify -- cargo check --all-features`

sic on  main [$] is 📦 v0.20.0 via 🦀 v1.62.0 took 2s
❯ cargo hack --workspace msrv verify -- cargo check --all-features
info: running cargo msrv verify -- cargo check --all-features on sic_cli_ops (1/8)
[Meta] cargo-msrv 0.15.1 (8dcc466)

Compatibility Check #1: Rust 1.56.1
[OK] Is compatible

info: running cargo msrv verify -- cargo check --all-features on sic_image_engine (2/8)
[Meta] cargo-msrv 0.15.1 (8dcc466)

Compatibility Check #1: Rust 1.56.1
[OK] Is compatible

info: running cargo msrv verify -- cargo check --all-features on sic_core (3/8)
[Meta] cargo-msrv 0.15.1 (8dcc466)

Compatibility Check #1: Rust 1.56.1
[OK] Is compatible

info: running cargo msrv verify -- cargo check --all-features on sic_io (4/8)
[Meta] cargo-msrv 0.15.1 (8dcc466)

Compatibility Check #1: Rust 1.56.1
[OK] Is compatible

info: running cargo msrv verify -- cargo check --all-features on sic_testing (5/8)
[Meta] cargo-msrv 0.15.1 (8dcc466)

Compatibility Check #1: Rust 1.56.1
[OK] Is compatible

info: running cargo msrv verify -- cargo check --all-features on sic_parser (6/8)
[Meta] cargo-msrv 0.15.1 (8dcc466)

Compatibility Check #1: Rust 1.56.1
[OK] Is compatible

info: running cargo msrv verify -- cargo check --all-features on pack-release (7/8)
[Meta] cargo-msrv 0.15.1 (8dcc466)

Compatibility Check #1: Rust 1.59.0
[OK] Is compatible

info: running cargo msrv verify -- cargo check --all-features on sic (8/8)
[Meta] cargo-msrv 0.15.1 (8dcc466)

Compatibility Check #1: Rust 1.56.1
[OK] Is compatible

bors bot added a commit that referenced this issue Jul 24, 2022
420: Allow using manifest-path instead of crate path r=foresterre a=foresterre

* Now accepts either `--manifest-path <Cargo Manifest>` or `--path <Cargo Dir>`

closes #412, replaces #419 (Context changes negatively impacted running of test cases)

Co-authored-by: Martijn Gribnau <garm@ilumeo.com>
bors bot added a commit that referenced this issue Jul 24, 2022
420: Allow using manifest-path instead of crate path r=foresterre a=foresterre

* Now accepts either `--manifest-path <Cargo Manifest>` or `--path <Cargo Dir>`

closes #412, replaces #419 (Context changes negatively impacted running of test cases)

Co-authored-by: Martijn Gribnau <garm@ilumeo.com>
bors bot added a commit that referenced this issue Jul 24, 2022
420: Allow using manifest-path instead of crate path r=foresterre a=foresterre

* Now accepts either `--manifest-path <Cargo Manifest>` or `--path <Cargo Dir>`

closes #412, replaces #419 (Context changes negatively impacted running of test cases)

Co-authored-by: Martijn Gribnau <garm@ilumeo.com>
@bors bors bot closed this as completed in 2723bc2 Jul 24, 2022
foresterre added a commit that referenced this issue Aug 1, 2022
420: Allow using manifest-path instead of crate path r=foresterre a=foresterre

* Now accepts either `--manifest-path <Cargo Manifest>` or `--path <Cargo Dir>`

closes #412, replaces #419 (Context changes negatively impacted running of test cases)

Co-authored-by: Martijn Gribnau <garm@ilumeo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants