EmbarkStudios / cargo-about

📜 Cargo plugin to generate list of all licenses for a crate 🦀
http://embark.rs
Apache License 2.0
545 stars 32 forks source link

Workaround seems to no longer work for `ring v0.17.5` #237

Closed foresterre closed 1 year ago

foresterre commented 1 year ago

Describe the bug

To Reproduce Steps to reproduce the behavior:

  1. Clone a project which uses ring v0.17.5
    1. For example: git clone git@github.com:foresterre/cargo-msrv.git && git checkout 24f1622f77af1b2e437046f0f37094c493de125
    2. Alternatively: cargo-about itself, after updating to ring 0.17.5, e.g. cargo update
  2. Run cargo about generate --output-file "third-party-licenses.html" about.hbs

Expected behavior

Additional context

cargo-msrv's about.toml:

Before updating the lock file, with ring 0.16.20

[[package]]
name = "ring"
version = "0.16.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
dependencies = [
 "cc",
 "libc",
 "once_cell",
 "spin",
 "untrusted",
 "web-sys",
 "winapi",
]

cargo about generate --output-file "third-party-licenses.html" about.hbs produces:

2023-11-12 2:38:08.5873352 +00:00:00 [WARN] the definition for crate/cratesio/toml/0.8.6 has not been harvested
2023-11-12 2:38:08.5895171 +00:00:00 [WARN] the definition for crate/cratesio/toml_edit/0.20.7 has not been harvested

After updating the lock file, with ring 0.17.5 (and ring 0.16.20)

[[package]]
name = "ring"
version = "0.16.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
dependencies = [
 "cc",
 "libc",
 "once_cell",
 "spin 0.5.2",
 "untrusted 0.7.1",
 "web-sys",
 "winapi",
]

[[package]]
name = "ring"
version = "0.17.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b"
dependencies = [
 "cc",
 "getrandom",
 "libc",
 "spin 0.9.8",
 "untrusted 0.9.0",
 "windows-sys",
]

cargo about generate --output-file "third-party-licenses.html" about.hbs produces:

cargo about generate --output-file "third-party-licenses.html" about.hbs
2023-11-12 2:42:54.536079 +00:00:00 [WARN] crate 'ring 0.17.5' doesn't have a license field
2023-11-12 2:42:54.9782958 +00:00:00 [WARN] the definition for crate/cratesio/toml_edit/0.20.7 has not been harvested
2023-11-12 2:42:54.9881632 +00:00:00 [WARN] the definition for crate/cratesio/bstr/1.8.0 has not been harvested
2023-11-12 2:42:54.9997265 +00:00:00 [WARN] the definition for crate/cratesio/handlebars/4.5.0 has not been harvested
error: failed to satisfy license requirements
    ┌─ C:\Users\a\.cargo\registry\src\index.crates.io-6f17d22bba15001f\ring-0.17.5\Cargo.toml:170:13
    │
170 │ license = "(GPL-1.0-or-later AND OpenSSL AND OpenSSL OR BSD-3-Clause) AND (ISC) AND (ISC AND MIT AND OpenSSL AND OpenSSL AND ISC) AND (MIT) AND (OpenSSL) AND (OpenSSL AND OpenSSL OR (BSD-3-Clause OR (GPL-1.0-or-later OR GPL-2.0-only))) AND (OpenSSL AND OpenSSL OR (BSD-3-Clause OR GPL-1.0-or-later)) AND (OpenSSL AND OpenSSL OR BSD-3-Clause)"
    │             ----------------                            ------------                                                                                                                   ------------
    ----------------    ------------                                 ------------    ----------------                               ------------

2023-11-12 2:42:55.1552183 +00:00:00 [ERROR] encountered 1 errors resolving licenses, unable to generate output
foresterre commented 1 year ago

I found that this issue has already been resolved in #234, after checking how cargo-about specified workarounds.

Would it perhaps be possible to get a new cargo-about release (to crates.io)?