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

opam lint should raise a warning when the license field is missing #4598

Closed
kit-ty-kate opened this issue Mar 15, 2021 · 4 comments · Fixed by #4766 or #4768
Closed

opam lint should raise a warning when the license field is missing #4598

kit-ty-kate opened this issue Mar 15, 2021 · 4 comments · Fixed by #4766 or #4768

Comments

@kit-ty-kate
Copy link
Member

Mentioned in ocaml/opam-repository#18343

It would be also nice to have (if there is not already one) an escape hatch for more complex licenses that don't fit in the SPDX standard. I would suggest something like license: "custom:<custom license name>"

@dra27
Copy link
Member

dra27 commented Jul 2, 2021

Cross-referencing #4686 (comment)

@dra27
Copy link
Member

dra27 commented Jul 23, 2021

Do we definitely want an escape hatch - having gone to the trouble of getting things like the OCaml linking exception text ratified and added to SPDX (see #2224), is it too bad for us to make it a lint warning with no escape?

@kit-ty-kate
Copy link
Member Author

I'm currently making an SPDX parser to add to a separate PR to #4766. It turns out the SPDX format already has a way to add custom licenses, e.g. LicenseRef-my-special-license (https://spdx.github.io/spdx-spec/appendix-V-using-SPDX-short-identifiers-in-source-files/).

However I prefer to split the two features, as currently it's not such a big deal to not have support for custom licenses. We already ignore the warnings in opam-repo-ci when needed and we can have both at different times and even backport one if it's really necessary. The SPDX parser feature is larger chunk of work so I also prefer to not slow down the addition of feature actively asked by users.

@dra27
Copy link
Member

dra27 commented Jul 23, 2021

All good - I definitely agree with getting the missing check on license straight in, too

kit-ty-kate added a commit to kit-ty-kate/ocaml that referenced this issue Aug 25, 2021
The presence of this field will be checked by opam lint starting with opam 2.2.0
Partly related to ocaml/opam-repository#19327 and ocaml/opam#4598
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants