Skip to content

Implement SPDX license expressions #13

Closed

Description

@f-f

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

Activity

  1. hdgarrood commented on Apr 25, 2020

    @hdgarrood
    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.

  2. added this to the v1 milestone on May 20, 2020
  3. f-f commented on Sep 27, 2020

    @f-f
    MemberAuthor

    Fixed in #76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions