Fix version separator and update purl-spec - #153
Merged
Conversation
The version is separated from the name by the last unencoded "@", but `binary:split/2` without `global` splits at the first one. Names that themselves contain an "@" — such as the Homebrew formula "node@20" — were therefore parsed as name "node" with version "20@20.10.0" instead of name "node@20" with version "20.10.0". Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
maennchen
enabled auto-merge (rebase)
July 28, 2026 13:18
maennchen
disabled auto-merge
July 28, 2026 13:18
Adds the new "brew" and "git" types and picks up changes to 17 existing
definitions, bringing the registry to 42 types.
The hex doctest is updated for the re-encoded repository_url example, and
two groups of new spec tests are excluded:
- The git tests expect an unencoded "/" inside the name (for example
"forgejo/forgejo"), but "/" is the namespace separator in the purl
grammar, so it has to be encoded as %2F. One of those fixtures is also
corrupt, expecting "forgejoforgejo/" with the slash misplaced.
- The cpan rule that a distribution name must not contain "::" only
exists as prose in the name_definition note, not as a machine readable
field such as permitted_characters, so it cannot be enforced from the
type definition.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
maennchen
force-pushed
the
fix-version-separator
branch
from
July 28, 2026 13:19
baabc50 to
d6d19d9
Compare
maennchen
enabled auto-merge (rebase)
July 28, 2026 13:20
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.
Two independent changes, one commit each.
Split the version at the last
@instead of the firstThe version is separated from the name by the last unencoded
@, butbinary:split/2withoutglobalsplits at the first one. Names that themselves contain an@— such as the Homebrew formulanode@20— were parsed as namenodewith version20@20.10.0instead of namenode@20with version20.10.0.Update purl-spec to
dd9ffe9and regenerate type dataAdds the new
brewandgittypes and picks up changes to 17 existing definitions, bringing the registry to 42 types.The hex doctest is updated for the re-encoded
repository_urlexample, and two groups of new spec tests are excluded:/inside the name (e.g.forgejo/forgejo), but/is the namespace separator in the purl grammar, so it has to be encoded as%2F. One of those fixtures is also corrupt, expectingforgejoforgejo/with the slash misplaced.::only exists as prose in thename_definitionnote, not as a machine readable field such aspermitted_characters, so it cannot be enforced from the type definition.