Skip to content

Conversation

@paracycle
Copy link
Member

Motivation

Follow up to Shopify/ruby-lsp#3807

Implementation

  • Vendor package_url.rb
  • Allow : characters in subpath to not be URL encoded
  • Regenerate all RBI files to update source location comments
  • ???
  • Profit ($$$)

Tests

Update existing tests

@paracycle paracycle requested a review from a team as a code owner January 6, 2026 20:06
@paracycle paracycle added enhancement New feature or request breaking-change Non-backward compatible change labels Jan 6, 2026
@@ -0,0 +1,416 @@
# typed: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be easier to import the gem under a vendor/ directory so it can be updated using the command line rather than copying files?

Maybe we should also avoid re-namespacing it under Tapioca?

Copy link
Member Author

Choose a reason for hiding this comment

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

Would it be easier to import the gem under a vendor/ directory so it can be updated using the command line rather than copying files?

The upstream file has has only 2 changes in the last 5 years, so I doubt this will be a problem for us going forward.

Maybe we should also avoid re-namespacing it under Tapioca?

I do want to re-namespace it under Tapioca. If the upstream gem gets loaded along with Tapioca, not changing the namespace will result in various constant redefinition warnings.

Copy link
Member Author

Choose a reason for hiding this comment

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

Forgot to include a link to file changes upstream: https://github.com/package-url/packageurl-ruby/commits/main/lib/package_url.rb

@amomchilov
Copy link
Contributor

This is tagged "breaking change", what's the nature of the break?

@paracycle
Copy link
Member Author

This is tagged "breaking change", what's the nature of the break?

If the end-user isn't using a recent enough version of Ruby LSP, they won't have support for purl formatted comments and their source url navigation will break.

@paracycle paracycle force-pushed the uk-switch-to-package-uri branch from 0f78e5c to bbdd6a2 Compare January 12, 2026 18:13
@paracycle paracycle force-pushed the uk-switch-to-package-uri branch from bbdd6a2 to 1011c4f Compare January 12, 2026 21:01
@paracycle paracycle enabled auto-merge January 12, 2026 21:18
@paracycle paracycle merged commit 096fd24 into main Jan 12, 2026
19 checks passed
@paracycle paracycle deleted the uk-switch-to-package-uri branch January 12, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Non-backward compatible change enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants