Skip to content

Conversation

@jkowalleck
Copy link
Member

@jkowalleck jkowalleck commented Mar 27, 2025

As sketched by @pombredanne and discusses in a PURL community meeting,
here is the qualifier vers.

example usage: pkg:cpan/AUTHOR/Module-Name?vers=vers%3Acpan%2F%3E%3D2.2.0%7C%21%3D%202.2.1%7C%3C2.3.0

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck added PURL component: qualifiers Ecma Ecma standard Part of the Ecma standard for PURL labels Mar 27, 2025
@jkowalleck jkowalleck changed the title qualifier: vers PURL add well-known qualifier vers Mar 27, 2025
@jkowalleck jkowalleck requested review from a team, johnmhoran and pombredanne March 27, 2025 15:21
@jkowalleck
Copy link
Member Author

did not add an example to the spec, as the qualifier encoding is currently reworked -- #398

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
mprpic
mprpic previously approved these changes Mar 28, 2025
Copy link
Contributor

@mprpic mprpic left a comment

Choose a reason for hiding this comment

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

Looks good!

@jaimergp
Copy link

Is the vers: scheme required or should it be considered redundant? Like, would this be ok?

# with scheme
pkg:cpan/AUTHOR/Module-Name?vers=vers:cpan/>=2.2.0|!= 2.2.1|<2.3.0
# without scheme
pkg:cpan/AUTHOR/Module-Name?vers=cpan/>=2.2.0|!= 2.2.1|<2.3.0

@jkowalleck
Copy link
Member Author

jkowalleck commented Mar 30, 2025

Is the vers: scheme required or should it be considered redundant? Like, would this be ok?

# with scheme
pkg:cpan/AUTHOR/Module-Name?vers=vers:cpan/>=2.2.0|!= 2.2.1|<2.3.0
# without scheme
pkg:cpan/AUTHOR/Module-Name?vers=cpan/>=2.2.0|!= 2.2.1|<2.3.0

thought the same, but went with the full spec for the following reasons:

  • the vers: is part of the current version rage spec. keep it in, make adoption easy as no post-processing needed.
  • the vers: schema is a good indicator what is going on. maybe version range spec changes in the future, and vers2: would come - so that the schema is a critical indicator/flag.
    Or maybe some contestant version-spec will be released eventually; what would we do then, add another qualifier just for this one, since we don't have clear spec indicators/flags?

this being said, the qualifier name vers is debatable. Alternatives i saw:

  • version_range --> pkg:cpan/AUTHOR/Module-Name?version_range=vers:cpan/>=2.2.0|!= 2.2.1|<2.3.0
  • version_spec --> pkg:cpan/AUTHOR/Module-Name?version_spec=vers:cpan/>=2.2.0|!= 2.2.1|<2.3.0
  • tbd

@jkowalleck jkowalleck requested a review from a team March 30, 2025 19:01
@jkowalleck
Copy link
Member Author

updated/added examples, since #439 was merged

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.

Let's merge this and refine later, as there the update to the spec mean the example is not correct

Copy link
Member

@johnmhoran johnmhoran left a comment

Choose a reason for hiding this comment

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

The example is incorrect -- the "Character encoding" section provides that the colon ':', "whether used as a Separator Character or otherwise", "MUST NOT be percent-encoded". We can refine this in a separate issue/PR.

@pombredanne pombredanne merged commit cffe6fa into package-url:main Jul 1, 2025
pombredanne added a commit that referenced this pull request Jul 1, 2025
The colon is never percent encoded anywhere.

Reference: #433
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to use vers: with pkg:?

6 participants