-
Notifications
You must be signed in to change notification settings - Fork 40
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
cargo-license fails to normalize the license of libm
0.2.9 and
0.2.10`
#78
Comments
libm
0.2.9 and
0.2.8`libm
0.2.9 and
0.2.10`
The underlying bug is the splitting on
I presume that this is an attempt to normalise the licence string. If the SPDX strings are normalised, they can be deduplicated, so that a minimum number of different licences are reported. But, if normalisation is desirable, the right way to implement it would be to properly parse the SPDX string. This is nontrivial (and would come with its own subtleties). IMO this normalisation ought not to have been attempted with this fundamentally incorrect algorithm. But simply abolishing it would probably be too disruptive. In the meantime I suggest the following bodge: if the string contains any (Also, |
FTAOD my proposed bodge leaves the algorithm correct (in the sense that it would never corrupt a licence string); it's just not optimal and rather unprincipled. Currently the algorithm is broken., |
Just chiming in that I saw this exact issue. I was putting together a NOTICE file for a project and did |
I checked #79. I think using spdx instead of the ad-hoc normalization logic is a correct way, but If this PR is merged as is, the output changes significantly. |
It would also be possible to use |
The license of libm is now:
MIT AND (MIT OR Apache-2.0)
.After being normalized, it shows up as
Apache-2.0) OR MIT AND (MIT
, which does not make sense.It looks like it's caused only by the
sort_unstable
call. Why is that required?The text was updated successfully, but these errors were encountered: