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

Using --version-range in projects that do not contain Cargo.lock is annoying #105

Closed
taiki-e opened this issue Dec 6, 2020 · 0 comments · Fixed by #106
Closed

Using --version-range in projects that do not contain Cargo.lock is annoying #105

taiki-e opened this issue Dec 6, 2020 · 0 comments · Fixed by #106
Labels
A-version Area: --rust-version, --version-range, --version-step C-bug Category: related to a bug.

Comments

@taiki-e
Copy link
Owner

taiki-e commented Dec 6, 2020

Currently, cargo-hack runs cargo metadata before the command is run for the specified version, so the format of Cargo.lock is based on the cargo version in which you ran cargo metadata (if Cargo.lock does not exist).

Specifically, if cargo-hack is run on cargo 1.38+ and --version-range received a version smaller than 1.38 and Cargo.lock does not exist, it will fail to compile because it is incompatible with new lock file formats.
https://github.com/taiki-e/auto_enums/runs/1506269414?check_suite_focus=true

This should be workaround by first generating the lock file using an older cargo, but it should be available without such a hack.

@taiki-e taiki-e added the C-bug Category: related to a bug. label Dec 6, 2020
@bors bors bot closed this as completed in f5cddf5 Dec 6, 2020
@taiki-e taiki-e added the A-version Area: --rust-version, --version-range, --version-step label Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-version Area: --rust-version, --version-range, --version-step C-bug Category: related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant