New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vendor uri in RubyGems #7386
Vendor uri in RubyGems #7386
Conversation
fe77307
to
6d29805
Compare
6d29805
to
3a262f5
Compare
Added one test, should be ready now! |
Technically this has changes in both RubyGems and Bundler. However, the more meaningful change is to start vendoring URI in RubyGems. So I'll put this in the changelog of RubyGems and silently sneak in Bundler changes with the corresponding Bundler release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💪
…t ToQueryTest::URI` This commit addresses CI failure at https://buildkite.com/rails/rails-nightly/builds/108#018d57ac-4f2a-45f1-86b9-9015a7b0a463/1165-2002 * Error addressed by this commit ``` $ ruby -v ruby 3.4.0dev (2024-01-30T10:19:23Z master 86547fd69d) [x86_64-linux] $ rm Gemfile.lock $ bundle install $ cd activesupport $ bin/test test/core_ext/object/to_query_test.rb -n test_hash_not_sorted_lexicographically_for_nested_structure ... snip ... E Error: ToQueryTest#test_hash_not_sorted_lexicographically_for_nested_structure: NameError: uninitialized constant ToQueryTest::URI test/core_ext/object/to_query_test.rb:90:in `test_hash_not_sorted_lexicographically_for_nested_structure' bin/test test/core_ext/object/to_query_test.rb:79 Finished in 0.000385s, 2597.3082 runs/s, 0.0000 assertions/s. 1 runs, 0 assertions, 0 failures, 1 errors, 0 skips $ ``` This behavior has been introduced since Ruby 3.4.0dev vendors URI from top level to `Gem::URI` via ruby/ruby@d64d0b5 . Here is the RubyGems one. rubygems/rubygems#7386
Vendor uri in RubyGems (cherry picked from commit 391e680)
…t ToQueryTest::URI` This commit addresses CI failure at https://buildkite.com/rails/rails-nightly/builds/108#018d57ac-4f2a-45f1-86b9-9015a7b0a463/1165-2002 * Error addressed by this commit ``` $ ruby -v ruby 3.4.0dev (2024-01-30T10:19:23Z master 86547fd69d) [x86_64-linux] $ rm Gemfile.lock $ bundle install $ cd activesupport $ bin/test test/core_ext/object/to_query_test.rb -n test_hash_not_sorted_lexicographically_for_nested_structure ... snip ... E Error: ToQueryTest#test_hash_not_sorted_lexicographically_for_nested_structure: NameError: uninitialized constant ToQueryTest::URI test/core_ext/object/to_query_test.rb:90:in `test_hash_not_sorted_lexicographically_for_nested_structure' bin/test test/core_ext/object/to_query_test.rb:79 Finished in 0.000385s, 2597.3082 runs/s, 0.0000 assertions/s. 1 runs, 0 assertions, 0 failures, 1 errors, 0 skips $ ``` This behavior has been introduced since Ruby 3.4.0dev vendors URI from top level to `Gem::URI` via ruby/ruby@d64d0b5 . Here is the RubyGems one. rubygems/rubygems#7386
Apparently uri specifically is problematic because rubygems loads it before we get to bundler? (older version at least) rubygems/rubygems#7386
What was the end-user or developer problem that led to this PR?
RubyGems loads URI internally. This can cause gem activation conflicts in Bundler when an app is locked to old URI, but RubyGems internally loads a different default version.
What is your fix for the problem, implemented in this PR?
Vendor URI in RubyGems.
Fixes #7178 (comment).
Make sure the following tasks are checked