Skip to content

No valid value for license appropriate for proprietary code #5697

Open
@ygale

Description

@ygale

The only non-SPDX value allowed in the license field is NONE. But since cabal files are also human-readable, the text license: NONE cannot be included in a cabal file for proprietary code for obvious legal reasons, no matter what the machine-readable meaning. Nor can any SPDX-compliant value be used. Without a license field at all, cabal refuses to build the package.

By comparison, npm is also SPDX-compliant. There are several reasonable options for proprietary code in npm:

  • { "license": "UNLICENSED"} - not great, but much better than NONE.
  • { "license": "Proprietary", "private": true } - this disables the ability to upload the package to the public distribution channel, which is fine for truly proprietary code.
  • { "license": "SEE LICENSE IN <filename>"} - allows upload with a custom license, possibly proprietary. We might not want to allow that for Hackage.

See also #2141. Now "AllRightsReserved" has not two meanings, but zero meanings, which is much worse. Not that we should necessarily resurrect "AllRightsReserved", but there needs to be some reasonable alternative.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions