Tools: ๐Ÿ› PolyForm licenses are flagged as invalid

Created on 27 Feb 2021  ยท  2Comments  ยท  Source: rome/tools


Environment

$ rome rage --summary
Environment Variables
  Object {
    COLORFGBG: "12;8"
    COLORTERM: "truecolor"
    TERM: "xterm-256color"
    TERM_PROGRAM: "iTerm.app"
  }

User Config
  unset

Rome Version
  10.0.4-beta

Node Version
  15.5.0

Platform
  darwin x64 20.2.0

Terminal Features
  Object {
    background: "unknown"
    colorDepth: 1
    columns: 100
    cursor: false
    hyperlinks: false
    isTTY: false
    unicode: false
  }

Client Flags
  Object {
    clientName: "cli"
    cwd: "<redacted>"
    realCwd: "<redacted>"
    silent: false
  }

Server Status
  Object {
    projects: Array [
      Object {id: 0}
      Object {id: 1}
    ]
    server: Object {
      heapTotal: 28_549_120
      pid: 84_979
      uptime: 0.257836953
    }
    workers: Array [
      Object {
        astCacheSize: 0
        heapTotal: 28_549_120
        ownedBytes: 0
        ownedFileCount: 0
        pid: 84_979
        uptime: 0.257744039
      }
    ]
  }

Steps To Reproduce


  1. Set "license": "PolyForm-Noncommercial-1.0.0" in package.json.
  2. Run rome init.

Expected Results

I expected Rome to initialise the project configuration, but instead I'm met with the following error:

  โœ– Unknown license PolyForm-Noncommercial-1.0.0

     9 โ”‚   },
    10 โ”‚   "author": "Kasper Isager",
  > 11 โ”‚   "license": "PolyForm-Noncommercial-1.0.0",
       โ”‚               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    12 โ”‚   "workspaces": [
    13 โ”‚     "*"

  โ„น The SPDX registry is used to ensure valid and legal licenses. See https://spdx.org/licenses/ for more information.

Although the PolyForm licenses are neither free nor open source licenses, they _are_ valid SPDX licenses and as such I'd expect them to be accepted by Rome.

unconfirmed

Most helpful comment

@ematipico This isn't a bug, and is unrelated to any of the license exception stuff you worked on.

That license was added to the SPDX list in v3.9 on 2020-05-15. We're only using 3.8 (released on 2020-02-09) as the list hasn't been updated very often.

internal/codec-spdx-license/scripts/update-data.sh is the relevant update script (this predates any of our existing generation scripts). However it looks to be writing to JSON when we have since moved it into a TS file. A manual update would be easy.

All 2 comments

The current version doesn't handle correctly all the valid licenses. Although this bug has been fixed in main.

The next version of Rome should be fine.

@ematipico This isn't a bug, and is unrelated to any of the license exception stuff you worked on.

That license was added to the SPDX list in v3.9 on 2020-05-15. We're only using 3.8 (released on 2020-02-09) as the list hasn't been updated very often.

internal/codec-spdx-license/scripts/update-data.sh is the relevant update script (this predates any of our existing generation scripts). However it looks to be writing to JSON when we have since moved it into a TS file. A manual update would be easy.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RaviVaranasi picture RaviVaranasi  ยท  5Comments

sebmck picture sebmck  ยท  5Comments

yoshixmk picture yoshixmk  ยท  4Comments

ematipico picture ematipico  ยท  4Comments

ChristopherBiscardi picture ChristopherBiscardi  ยท  5Comments