Skip to content

docs: detail SPDX compatibility for license key #1022

Open

Description

@medubelko

What needs to get done

Situation

The license key complies with SPDX, but the field's docs don't state that the value is a license expression, nor the constraints. Users might understand it to be a plain a string.

Request

In the license docstring:

  • Mention that it's a compliant SPDX expression.
  • Indicate that AND and OR are supported.
  • Provide richer examples of the expression syntax.
  • Link to the full SPDX spec.

Why it needs to get done

The constraints of the key aren't clear in the existing docs.

Activity

  1. syncronize-issues-to-jira commented on Mar 9, 2026

    @syncronize-issues-to-jira

    Thank you for reporting your feedback to us!

    The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-5045.

    This message was autogenerated

  2. medubelko commented on Mar 10, 2026

    @medubelko
    ContributorAuthor

    From @jahn-junior:

    The docstring that's more commonly consumed for the license is this one. The annotated type isn't used by default to allow downstream apps to decide how strict they want to be.

    The downstream models aren't all consistent with one another.
    That being said, the docstring I linked could still be more helpful. At the very least, we can include an example for conjunctive licenses and use a nicer link for the spec.

  3. lengau commented on Mar 12, 2026

    @lengau
    Collaborator

    Technically in craft-application this is just just a string. However, we provide the ability for apps to use SpdxLicenseStr (which is actually a string containing a license expression, sigh). I believe only Rockcraft uses that currently.

  4. medubelko commented on Mar 12, 2026

    @medubelko
    ContributorAuthor

    Should we override the text in the Rockcraft docs? It's inconvenient that the field is the same.

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions