Show compound licenses in the front-end#1228
Open
KiaraGrouwstra wants to merge 2 commits intomainfrom
Open
Conversation
Contributor
Nixpkgs is introducing compound license expressions (AND, OR, WITH, PLUS) via NixOS/nixpkgs#468378. This extends the `License` enum to deserialize the new `licenseType`-tagged structures, recursively flattens them into leaf licenses for the search index, and exposes a `package_license_expression` field carrying the SPDX-style expression string when compound licenses are present. Bump import index version to 47 for the new field.
When the backend provides a `package_license_expression` (SPDX-style string for compound licenses), display it as the license label instead of the flat list of individual licenses. For packages with only simple licenses the behavior is unchanged. Bump frontend index version to 47 to match the new schema.
4fd1b9d to
de786c4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds upon the back-end change (#1227) to show compound licenses in the front-end.
How this looks in action:
Note that traditional license lists are shown as before to distinguish when we have vs lack such data -- we do expect explicit migration of licenses to ensure semantics are reflected as intended.
Disclaimer: i used a coding agent in the creation of this patch.