Skip to content

Conversation

@TG1999
Copy link
Contributor

@TG1999 TG1999 commented Nov 4, 2025

Signed-off-by: Tushar Goel <[email protected]>
Signed-off-by: Tushar Goel <[email protected]>
@johnmhoran
Copy link
Member

@TG1999 One preliminary question I have: if the input PURL has an unencoded slash in the qualifiers value, doesn't that raise an exception, halt the evaluation process, and thus require a null expected_output and a true expected_failure?

@mjherzog @pombredanne @matt-phylum @jkowalleck What do you think?

@matt-phylum
Copy link
Contributor

If the input PURL has an unencoded slash, an exception should not be thrown. It is not part of the spec, and it breaks existing PURLs where slash is not encoded, including examples from previous versions of the spec and output from code that implements an older version of the spec.

When I last updated the purl-survey output, 10 of 15 implementations passed tests that required slash to be unencoded in qualifier values. PURLs canonicalized by those implementations would be broken by turning unencoded slashes in qualifiers into errors.

@johnmhoran
Copy link
Member

johnmhoran commented Nov 4, 2025

Thanks @matt-phylum . Putting aside slashes for a moment (which the submitted standard makes clear MUST be percent-encoded in a qualifiers value however we're meant to distinguish between MUST and SHOULD and MAY), if a roundtrip input has no pkg:, expected_output will be null and expected_failure will be true -- right? Surely a tool will not "fix" that deficiency by supplying the missing pkg:.

@petergardfjall
Copy link
Contributor

petergardfjall commented Dec 3, 2025

Anything preventing this from being merged?

It is similar in spirit to #713, #714, #715, #716, #717, #718, #719, #720, #721

Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

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

Looking good now... I added a few touch ups based on @mjherzog reviews.

Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

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

All clear now. Merging.

@pombredanne pombredanne merged commit 0569314 into package-url:main Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Test suite type: bazel Proposed new type

Projects

Development

Successfully merging this pull request may close these issues.

8 participants