You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Since cargo-deny 0.13.2, which upgraded to krates 0.12.3 we get a strange warning on our repo:
warning[license-exception-not-encountered]: license exception was not encountered
┌─ laz-license-repro/deny.toml:8:14
│
8 │ { name = "laz", allow = ["LGPL-2.1"] },
│ ^^^^^ unmatched license exception
The laz crate is optional=true included via las, but we enable that feature unconditionally and expect laz to be part of the crate graph:
las = { version = "0.7", features = ["laz"] }
To Reproduce
Steps to reproduce the behavior:
Take this Cargo.toml:
[package]
name = "laz-license-repro"version = "0.1.0"license = "Apache-2.0"
[dependencies]
# laz = "0.6"las = { version = "0.7", features = ["laz"] }
And this deny.toml:
[licenses]
allow = [
"MIT",
"Apache-2.0",
"Unicode-DFS-2016",
]
exceptions = [
{ name = "laz", allow = ["LGPL-2.1"] },
]
[[licenses.clarify]]
name = "laz"expression = "LGPL-2.1"license-files = [
# bonus: this crate states `license-file = "COPYING"` but `cargo-deny` insists on using `LICENSE.txt`?# { path = "COPYING", hash = 0xc5199cf9 },
{ path = "LICENSE.txt", hash = 0xc5199cf9 },
]
Run cargo-deny and observe:
$ cargo deny check licensewarning[license-exception-not-encountered]: license exception was not encountered ┌─ laz-license-repro/deny.toml:8:14 │8 │ { name = "laz", allow = ["LGPL-2.1"] }, │ ^^^^^ unmatched license exceptionlicenses ok
Expected behavior
No warnings. And when laz would be removed from license.exceptionscargo-denymust complain about LGPL-2.1 not being allowed.
Device:
OS: Linux
Version: Cargo deny 0.13.2 and up
Additional context
Feel free to uncomment # laz = "0.6" and observe what cargo-deny output we expect when this crate is definitely part of the graph. For example, without the license.clarifycargo-deny rightfully complains about error[unlicensed]: laz = 0.6.4 is unlicensed but it doesn't do that anymore when the crate is transitively included via las = { version = "0.7", features = ["laz"] }.
The text was updated successfully, but these errors were encountered:
Describe the bug
Since
cargo-deny 0.13.2
, which upgraded tokrates 0.12.3
we get a strange warning on our repo:The
laz
crate isoptional=true
included vialas
, but we enable that feature unconditionally and expectlaz
to be part of the crate graph:To Reproduce
Steps to reproduce the behavior:
Take this
Cargo.toml
:And this
deny.toml
:Run
cargo-deny
and observe:Expected behavior
No warnings. And when
laz
would be removed fromlicense.exceptions
cargo-deny
must complain aboutLGPL-2.1
not being allowed.Device:
Additional context
Feel free to uncomment
# laz = "0.6"
and observe whatcargo-deny
output we expect when this crate is definitely part of the graph. For example, without thelicense.clarify
cargo-deny
rightfully complains abouterror[unlicensed]: laz = 0.6.4 is unlicensed
but it doesn't do that anymore when the crate is transitively included vialas = { version = "0.7", features = ["laz"] }
.The text was updated successfully, but these errors were encountered: