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

Package ID parsing panics #72

Closed
AlexTMjugador opened this issue Jan 22, 2024 · 3 comments · Fixed by #73
Closed

Package ID parsing panics #72

AlexTMjugador opened this issue Jan 22, 2024 · 3 comments · Fixed by #73
Labels
bug Something isn't working

Comments

@AlexTMjugador
Copy link

AlexTMjugador commented Jan 22, 2024

Describe the bug
Parsing the package ID git+https://github.com/ComunidadAylas/glsl-lang#0.5.2 panics when krates 0.16.3 is used transitively by cargo deny with the following message:

thread '<unnamed>' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/krates-0.16.3/src/lib.rs:127:13:
unable to parse package id 'git+https://github.com/ComunidadAylas/glsl-lang#0.5.2'

As a consequence of this, cargo deny is currently non-functional in my environment.

To Reproduce
Steps to reproduce the behavior:

  1. Run the CI workflow on https://github.com/ComunidadAylas/PackSquash/blob/master/.github/workflows/ci.yml on a commit push, which uses the EmbarkStudios/cargo-deny-action@c9a2a6316320da223aaf3b59d1ac70572e8cf1f8 GitHub action in a step, that has a transitive dependency on krates.
  2. See error.

Expected behavior
Given that Cargo deals with these package IDs fine (i.e., my dependency metadata files are not corrupt), krates should just work, or at least not fail in this way (why was the Clippy lint warning against a panicking From implementation disabled?).

Screenshots
Panic message
https://github.com/ComunidadAylas/PackSquash/actions/runs/7608744547/job/20718541200

Device:

  • GitHub CI workflow runners
  • OS: Linux, Windows, macOS

Additional context
From the perspective of an user of the cargo deny GitHub Action, this is a fairly recent regression. EmbarkStudios/cargo-deny-action@1e59595 worked fine for me with Rust version 1.77.0-nightly (714b29a17 2024-01-15).

Rust version: 1.77.0-nightly (ef71f1047 2024-01-21)

@AlexTMjugador AlexTMjugador added the bug Something isn't working label Jan 22, 2024
@AlexTMjugador
Copy link
Author

I have just found this related issue that was closed, but it looks like the fix might not have been complete, as failures do still happen: #64

@Jake-Shadle
Copy link
Member

If you run cargo deny on stable cargo instead of nightly it will work.

@AlexTMjugador
Copy link
Author

Thanks, that can be a workable workaround until this is sorted out, but I'm explicitly interested in the nightly Rust toolchain because it comes with more powerful versions of Clippy and rustfmt.

AlexTMjugador added a commit to ComunidadAylas/PackSquash that referenced this issue Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants