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

Cannot read new Cargo.lock files #530

Open
cod10129 opened this issue Dec 19, 2024 · 2 comments
Open

Cannot read new Cargo.lock files #530

cod10129 opened this issue Dec 19, 2024 · 2 comments

Comments

@cod10129
Copy link

Cargo-geiger cannot read Cargo.lock files created by newer Cargo versions, which makes it unusable unless you use an older version of Cargo to generate a lockfile before running cargo geiger.

Repro

Install a version of Cargo >= 1.83, and cargo-geiger (tested on the latest release, 0.11.7).

cargo new geiger-test
cd geiger-test
cargo generate-lockfile
cargo geiger

Output:

error: Cargo("failed to parse lock file at: ~/geiger-test/Cargo.lock")

Expected output (reproducible if you use Cargo 1.82):

Metric output format: x/y
    x = unsafe code used by the build
    y = total unsafe code found in the crate

Symbols:
    🔒  = No `unsafe` usage found, declares #![forbid(unsafe_code)]
    ❓  = No `unsafe` usage found, missing #![forbid(unsafe_code)]
    ☢️  = `unsafe` usage found

Functions  Expressions  Impls  Traits  Methods  Dependency

0/0        0/0          0/0    0/0     0/0      ❓ geiger-test 0.1.0

0/0        0/0          0/0    0/0     0/0
@shinmao
Copy link

shinmao commented Dec 26, 2024

I also run into this issue with v1.84.0-nightly.

@oherrala
Copy link

oherrala commented Feb 3, 2025

Also can't read Cargo.toml workspace files with resolver = "3". This is also fixed by updating the cargo dependency.

resolver setting 3 is not valid, valid options are "1" or "2"

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

3 participants