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

Implement SPDX license expressions #13

Closed
f-f opened this issue Apr 25, 2020 · 2 comments
Closed

Implement SPDX license expressions #13

f-f opened this issue Apr 25, 2020 · 2 comments

Comments

@f-f
Copy link
Member

f-f commented Apr 25, 2020

From #4:

For me, a big part of what makes SPDX attractive is that it supports license expressions, like MIT OR Apache-2.0, so I think it would be nice to support those here if we can. Implementing the expression language in Dhall might not be the best idea, but would using Text and then validating the license expressions in the curator work?

For context, here's the full documentation on license expressions.

While having a Text there and validating it in CI seems like a good option, it doesn't really provide feedback to authors on the correctness of their license expression until they push here.

It looks like the full grammar of the expressions is pretty small, so I think implementing it in pure Dhall (with a similar approach as the JSON type) would be quite approachable and possibly easy to use for authors, while at the same time guaranteeing correctness

@hdgarrood
Copy link
Contributor

I feel like that could be a bit awkward to write in Dhall, actually; the JSON type you've linked definitely looks awkward to me, I would rather write normal JSON. Why not let registry clients perform a validation before submitting (in addition to the curator validation) if the goal is faster feedback? This already exists in the Cabal library so it's dead simple to implement in Haskell; the compiler does it during purs publish.

@f-f f-f added the blocked label Apr 29, 2020
@f-f f-f mentioned this issue May 15, 2020
8 tasks
@f-f f-f added this to the v1 milestone May 20, 2020
@f-f
Copy link
Member Author

f-f commented Sep 27, 2020

Fixed in #76

@f-f f-f closed this as completed Sep 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants