Repository navigation
Conversation
paracycle
reviewed
Nov 6, 2026
OughtPuts
force-pushed
the
ho/make-phonelib-dependency-optional
branch
from
November 9, 2026 10:50
740c520 to
01197b1
Compare
OughtPuts
force-pushed
the
ho/make-phonelib-dependency-optional
branch
from
November 9, 2026 12:26
01197b1 to
a9a1441
Compare
paracycle
approved these changes
Nov 9, 2026
SeriouslyAwesome
requested review from
rochlefebvre
and removed request for
SeriouslyAwesome
November 12, 2026 18:10
This branch has not been deployed
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.
https://torrent.shopify.io/issues/DIET-122
What are you trying to accomplish?
Allow applications using Worldwide’s localization and address-formatting features to avoid installing and loading
phonelib....
What approach did you choose and why?
Remove
phonelibfrom the runtime dependencies and load it when aWorldwide::Phoneis created. Keep it in the test bundle. Missingphonelibraises an actionable LoadError; unrelated loading errors propagate unchanged. This would be helpful for Shopify core as we use theworldwidegem but do not need thephonelibfunctionality as this is duplicated byGlobalPhoneat present, so could be replaced in order to be more efficient with gem usage.The subprocess test helper skips gemspec loads that return nil. Bundler can provide synthetic specifications whose paths point to directories rather than gemspec files; keeping those nil results caused the CI tests to crash during setup. A regression test covers this case.
...
What should reviewers focus on?
The loading boundary and error handling.
...
The impact of these changes
Applications using phone parsing or address normalization/validation must explicitly add gem "phonelib", "~> 0.8" to their Gemfile. Other features, including address formatting, work without it.
...
Testing
Run bundle exec rake test, or just bundle exec ruby -Itest test/worldwide/phonelib_dependency_test.rb.
...
Checklist