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

Replace license-exprs crate with spdx #4293

Merged
merged 1 commit into from
Dec 22, 2021
Merged

Replace license-exprs crate with spdx #4293

merged 1 commit into from
Dec 22, 2021

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Dec 18, 2021

Resolves #2595

tl;dr you can now use parenthesis (e.g. X AND (Y OR Z)) in license expressions. the custom / operator is still supported for now, though not directly compatible with the use of parenthesis.

@Turbo87 Turbo87 added A-backend ⚙️ C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works labels Dec 18, 2021
@ehuss
Copy link
Contributor

ehuss commented Dec 20, 2021

Just a few questions and observations:

  • Do you know which version of the SPDX list this currently uses? That is something that we document.
  • Did you consider using the Lax mode? It looks like this will cause a fair number of packages to start to fail to publish. I compared the parsing here. That includes spdx versus spdx Lax, versus license-exprs.

@Turbo87
Copy link
Member Author

Turbo87 commented Dec 20, 2021

  • Do you know which version of the SPDX list this currently uses? That is something that we document.

spdx@0.7 is using SPDX 3.14 at the moment, which according to #2595 (comment) should be compatible with the 3.11 that license-exprs currently uses.

  • Did you consider using the Lax mode? It looks like this will cause a fair number of packages to start to fail to publish.

As far as I understand the lax mode was created to be able to handle all currently existing license entries in the crates.io database. But that includes entries that are already no longer considered valid by crates.io, which is why I'm a little hesitant to use the complete Lax mode.

I have however opened EmbarkStudios/spdx#50 two days ago, which makes the lax mode a little more configurable. That would allow us to e.g. enable only the support for the custom slash operator, but keep support for other lax mode feature disabled. I'm fine with waiting until that change has shipped, if you prefer.

@ehuss
Copy link
Contributor

ehuss commented Dec 20, 2021

I did another scan where I checked when the last time the crate was updated: https://gist.github.com/ehuss/ce7a72f4eecb2a7ff1d668a936f5587f

All of the errors in the past year have been due to postfix plus on gpl. If the number was small, I was going to suggest just sending PRs to the affected crates and ignoring the Lax mode stuff. However, there is about a 100 so that's probably too many to do manually.

If your PR gets accepted within some reasonable timeframe, I think it would be good to wait.

@bors

This comment has been minimized.

@Turbo87
Copy link
Member Author

Turbo87 commented Dec 21, 2021

If your PR gets accepted within some reasonable timeframe, I think it would be good to wait.

It was just merged and released. I've rebased and adjusted this PR :)

Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not reviewed the spdx crate, but otherwise this seems reasonable.

@Turbo87
Copy link
Member Author

Turbo87 commented Dec 22, 2021

@bors r=ehuss

thanks :)

@bors
Copy link
Contributor

bors commented Dec 22, 2021

📌 Commit 87bce69 has been approved by ehuss

@bors
Copy link
Contributor

bors commented Dec 22, 2021

⌛ Testing commit 87bce69 with merge 77bfde0...

@bors
Copy link
Contributor

bors commented Dec 22, 2021

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing 77bfde0 to master...

@bors bors merged commit 77bfde0 into rust-lang:master Dec 22, 2021
@Turbo87 Turbo87 deleted the spdx branch December 22, 2021 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support parentheses in license fields
3 participants