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

Fail if invalid spdx is passed to allow #314

Merged
merged 3 commits into from
Mar 29, 2024

Conversation

hfhbd
Copy link
Contributor

@hfhbd hfhbd commented Mar 29, 2024

Fixes #223

@hfhbd hfhbd changed the title Fail if invalid spdx Fail if invalid spdx is passed to allow Mar 29, 2024
Comment on lines +253 to +255
requireNotNull(SpdxLicenses.embedded.findByIdentifier(spdxId)) {
"$name is not a valid SPDX id."
}
Copy link
Collaborator

@JakeWharton JakeWharton Mar 29, 2024

Choose a reason for hiding this comment

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

It seems like this could have been put in the old allow before adding to the set to accomplish the same thing. Is there another advantage of all the other changes that I'm missing? Is it secretly working towards #313?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it secretly working towards #313?

Yes, this is the only reason. As you can see in the commits I added the provider overload for allow but realized all functions could benefit of Providers so I removed it here.
We could also add the provider overload back and add more in #313.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would prefer them separate, but we can leave the infrastructure in place here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BTW I don't plan to implement #313 today and it needs some design first, in case you want to publish another release.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Will do

@JakeWharton JakeWharton merged commit 72453d8 into cashapp:trunk Mar 29, 2024
2 checks passed
@hfhbd hfhbd deleted the failIfInvalidSpdx branch March 29, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid SPDX identifiers don't fail the build
2 participants