Skip to content

subpath: parsing stops after segments are clear - #449

Closed
jkowalleck wants to merge 1 commit into
package-url:mainfrom
jkowalleck:subpath-parsing-stop-after-segments
Closed

subpath: parsing stops after segments are clear#449
jkowalleck wants to merge 1 commit into
package-url:mainfrom
jkowalleck:subpath-parsing-stop-after-segments

Conversation

@jkowalleck

@jkowalleck jkowalleck commented Apr 6, 2025

Copy link
Copy Markdown
Member

as proposed via #448 (comment):

the [subpath parsing] process joins on / to produce a final result.

  • Joining path segments is not in the domain of PURL.
  • I think the spec should stop after the path-segments are clear. Joining segments on FileSystem/OperatingSystem dependent path separators (/, \, >, etc - see https://en.wikipedia.org/wiki/Path_(computing) for more) is out of scope of the spec.
  • The same with environment/FileSystem dependent character escapes.

is part of #448

@jkowalleck
jkowalleck marked this pull request as ready for review April 11, 2025 08:01
@jkowalleck jkowalleck added this to the 1.0-draft milestone Apr 14, 2025
@jkowalleck
jkowalleck requested a review from a team April 14, 2025 14:23
Comment thread PURL-SPECIFICATION.rst Outdated
- UTF-8-decode each segment if needed in your programming language
- Join segments back with a '/'
- This is the ``subpath``
- This list of path segments is the ``subpath``

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I love the idea of subpath as a list of (Unicode) strings. 💯

Comment thread PURL-SPECIFICATION.rst Outdated
@jkowalleck
jkowalleck requested a review from a team May 5, 2025 08:12
@johnmhoran johnmhoran modified the milestones: PURL v1.0, PURL v0.90 May 29, 2025
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck
jkowalleck force-pushed the subpath-parsing-stop-after-segments branch from 4975af4 to 9ffb329 Compare October 1, 2025 08:56
Comment thread purl-specification.md
- UTF-8-decode each segment if needed in your programming language
- Join segments back with a ‘/’
- This is the `subpath`
- This list of path segments is the ``subpath``

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

dont concat or further handle the segments, similar to qualifiers.
https://github.com/package-url/purl-spec/blob/main/purl-specification.md?plain=1#L515

@mjherzog

mjherzog commented Oct 17, 2025

Copy link
Copy Markdown
Member

@jkowalleck We need to "move" this PR to update the file:docs/how-to-parse.md because the file: purl-specification.md is generated and not suitable for PRs (as documented in the file header).
We are also applying a 78 character line limit for markdown files to make change tracking easier. (see also #612)
Do you want to make the updates? Or I can ask @johnmhoran to make them.

@package-url package-url deleted a comment from johnmhoran Oct 17, 2025
@jkowalleck

Copy link
Copy Markdown
Member Author

Do you want to make the updates? Or I can ask @johnmhoran to make them.

please ask @johnmhoran to take this over. I will review their changes afterward.

thanks in advance.

@johnmhoran

Copy link
Copy Markdown
Member

@jkowalleck @mjherzog This PR 449 has been updated and consolidated in #711.

@jkowalleck

Copy link
Copy Markdown
Member Author

superseded by #711

@jkowalleck
jkowalleck deleted the subpath-parsing-stop-after-segments branch October 24, 2025 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants