sstadick / cargo-bundle-licenses

Generate a THIRDPARTY file with all licenses in a cargo project.
Apache License 2.0
86 stars 6 forks source link

Error: Previous ring:0.16.20 does not match new ring:0.16.20 #31

Open morrisonlevi opened 7 months ago

morrisonlevi commented 7 months ago

I'm running this command:

cargo bundle-licenses \
    --format yaml \
    --output /tmp/CI.yaml \
    --previous LICENSE-3rdparty.yml \
    --check-previous \
  || diff /tmp/CI.yaml LICENSE-3rdparty.yml

In my case, the relevant part of the diff is:

<   license: License specified in file ($CARGO_HOME/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/LICENSE)
---
>   license: License specified in file ($CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/LICENSE)

As far as I can tell, this is an effect of a sparse registry. Any ideas on what I should do to fix/avoid these issues, and whether this tool ought to understand this or not?

morrisonlevi commented 7 months ago

I was able to work around the issue by using git checkouts instead of sparse. I think the tools should ideally be able to handle these kinds of differences.