Skip to content
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

[pull] master from rubygems:master #82

Open
wants to merge 3,674 commits into
base: master
Choose a base branch
from
Open

Conversation

pull[bot]
Copy link

@pull pull bot commented Jul 27, 2022

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added ⤵️ pull merge-conflict Resolve conflicts manually labels Jul 28, 2022
deivid-rodriguez and others added 28 commits July 23, 2024 20:38
The method has two different concerns not straightforward to
distinguish.

One is to set a new `install_path`, which is done by setting the
`@install_path` instance variable, and invalidating the `local_specs`
memoization, so that the next time they are picked from the new
location.

The other one is to set a new `cache_path` which is done by setting the
`@cache_path` instance variable, and invalidating the `git_proxy`
memoization, so that the next git proxy uses the new cache location.

This commit splits the logic so that this is easier to understand.
If we want to change git gems to use a proper cache, instead of using
the cache folder as the install location, so we need to keep git
information in the cache, so that when running `bundle install` or
`bundler install --local`, we are able to figure out whether the
revision that needs to be checked out is present locally in the cache or
needs to be fetched from the remote repository.
Now that the cache location is not used as the install location, this is
unnecessary, and it also prevents `bundle install` with a per app cache
loading code from two different locations, causing annoying warnings
like:

```
Fetching gem metadata from https://rubygems.org/...
Fetching https://github.com/puma/puma.git
Using nio4r 2.5.4
Using bundler 2.3.0.dev
Using puma 5.0.4 from https://github.com/puma/puma.git (at master@ea81fba)
Bundle complete! 1 Gemfile dependency, 3 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Updating files in vendor/cache
  * nio4r-2.5.4.gem
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:18: warning: already initialized constant Puma::HTTP_STATUS_CODES
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:18: warning: previous definition of HTTP_STATUS_CODES was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:84: warning: already initialized constant Puma::STATUS_WITH_NO_ENTITY_BODY
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:84: warning: previous definition of STATUS_WITH_NO_ENTITY_BODY was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:103: warning: already initialized constant Puma::Const::VERSION
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:103: warning: previous definition of VERSION was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:103: warning: already initialized constant Puma::Const::PUMA_VERSION
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:103: warning: previous definition of PUMA_VERSION was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:104: warning: already initialized constant Puma::Const::CODE_NAME
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:104: warning: previous definition of CODE_NAME was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:106: warning: already initialized constant Puma::Const::PUMA_SERVER_STRING
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:106: warning: previous definition of PUMA_SERVER_STRING was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:108: warning: already initialized constant Puma::Const::FAST_TRACK_KA_TIMEOUT
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:108: warning: previous definition of FAST_TRACK_KA_TIMEOUT was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:112: warning: already initialized constant Puma::Const::PERSISTENT_TIMEOUT
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:112: warning: previous definition of PERSISTENT_TIMEOUT was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:116: warning: already initialized constant Puma::Const::FIRST_DATA_TIMEOUT
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:116: warning: previous definition of FIRST_DATA_TIMEOUT was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:120: warning: already initialized constant Puma::Const::WRITE_TIMEOUT
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:120: warning: previous definition of WRITE_TIMEOUT was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:127: warning: already initialized constant Puma::Const::MAX_FAST_INLINE
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:127: warning: previous definition of MAX_FAST_INLINE was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:130: warning: already initialized constant Puma::Const::REQUEST_URI
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:130: warning: previous definition of REQUEST_URI was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:131: warning: already initialized constant Puma::Const::REQUEST_PATH
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:131: warning: previous definition of REQUEST_PATH was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:132: warning: already initialized constant Puma::Const::QUERY_STRING
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:132: warning: previous definition of QUERY_STRING was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:133: warning: already initialized constant Puma::Const::CONTENT_LENGTH
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:133: warning: previous definition of CONTENT_LENGTH was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:135: warning: already initialized constant Puma::Const::PATH_INFO
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:135: warning: previous definition of PATH_INFO was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:137: warning: already initialized constant Puma::Const::PUMA_TMP_BASE
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:137: warning: previous definition of PUMA_TMP_BASE was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:139: warning: already initialized constant Puma::Const::ERROR_RESPONSE
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:139: warning: previous definition of ERROR_RESPONSE was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:153: warning: already initialized constant Puma::Const::CHUNK_SIZE
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:153: warning: previous definition of CHUNK_SIZE was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:157: warning: already initialized constant Puma::Const::MAX_HEADER
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:157: warning: previous definition of MAX_HEADER was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:160: warning: already initialized constant Puma::Const::MAX_BODY
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:160: warning: previous definition of MAX_BODY was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:162: warning: already initialized constant Puma::Const::REQUEST_METHOD
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:162: warning: previous definition of REQUEST_METHOD was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:163: warning: already initialized constant Puma::Const::HEAD
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:163: warning: previous definition of HEAD was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:165: warning: already initialized constant Puma::Const::LINE_END
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:165: warning: previous definition of LINE_END was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:166: warning: already initialized constant Puma::Const::REMOTE_ADDR
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:166: warning: previous definition of REMOTE_ADDR was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:167: warning: already initialized constant Puma::Const::HTTP_X_FORWARDED_FOR
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:167: warning: previous definition of HTTP_X_FORWARDED_FOR was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:168: warning: already initialized constant Puma::Const::HTTP_X_FORWARDED_SSL
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:168: warning: previous definition of HTTP_X_FORWARDED_SSL was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:169: warning: already initialized constant Puma::Const::HTTP_X_FORWARDED_SCHEME
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:169: warning: previous definition of HTTP_X_FORWARDED_SCHEME was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:170: warning: already initialized constant Puma::Const::HTTP_X_FORWARDED_PROTO
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:170: warning: previous definition of HTTP_X_FORWARDED_PROTO was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:172: warning: already initialized constant Puma::Const::SERVER_NAME
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:172: warning: previous definition of SERVER_NAME was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:173: warning: already initialized constant Puma::Const::SERVER_PORT
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:173: warning: previous definition of SERVER_PORT was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:174: warning: already initialized constant Puma::Const::HTTP_HOST
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:174: warning: previous definition of HTTP_HOST was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:175: warning: already initialized constant Puma::Const::PORT_80
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:175: warning: previous definition of PORT_80 was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:176: warning: already initialized constant Puma::Const::PORT_443
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:176: warning: previous definition of PORT_443 was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:177: warning: already initialized constant Puma::Const::LOCALHOST
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:177: warning: previous definition of LOCALHOST was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:178: warning: already initialized constant Puma::Const::LOCALHOST_IP
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:178: warning: previous definition of LOCALHOST_IP was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:180: warning: already initialized constant Puma::Const::SERVER_PROTOCOL
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:180: warning: previous definition of SERVER_PROTOCOL was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:181: warning: already initialized constant Puma::Const::HTTP_11
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:181: warning: previous definition of HTTP_11 was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:183: warning: already initialized constant Puma::Const::SERVER_SOFTWARE
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:183: warning: previous definition of SERVER_SOFTWARE was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:184: warning: already initialized constant Puma::Const::GATEWAY_INTERFACE
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:184: warning: previous definition of GATEWAY_INTERFACE was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:185: warning: already initialized constant Puma::Const::CGI_VER
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:185: warning: previous definition of CGI_VER was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:187: warning: already initialized constant Puma::Const::STOP_COMMAND
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:187: warning: previous definition of STOP_COMMAND was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:188: warning: already initialized constant Puma::Const::HALT_COMMAND
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:188: warning: previous definition of HALT_COMMAND was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:189: warning: already initialized constant Puma::Const::RESTART_COMMAND
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:189: warning: previous definition of RESTART_COMMAND was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:191: warning: already initialized constant Puma::Const::RACK_INPUT
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:191: warning: previous definition of RACK_INPUT was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:192: warning: already initialized constant Puma::Const::RACK_URL_SCHEME
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:192: warning: previous definition of RACK_URL_SCHEME was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:193: warning: already initialized constant Puma::Const::RACK_AFTER_REPLY
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:193: warning: previous definition of RACK_AFTER_REPLY was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:194: warning: already initialized constant Puma::Const::PUMA_SOCKET
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:194: warning: previous definition of PUMA_SOCKET was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:195: warning: already initialized constant Puma::Const::PUMA_CONFIG
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:195: warning: previous definition of PUMA_CONFIG was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:196: warning: already initialized constant Puma::Const::PUMA_PEERCERT
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:196: warning: previous definition of PUMA_PEERCERT was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:198: warning: already initialized constant Puma::Const::HTTP
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:198: warning: previous definition of HTTP was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:199: warning: already initialized constant Puma::Const::HTTPS
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:199: warning: previous definition of HTTPS was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:201: warning: already initialized constant Puma::Const::HTTPS_KEY
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:201: warning: previous definition of HTTPS_KEY was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:203: warning: already initialized constant Puma::Const::HTTP_VERSION
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:203: warning: previous definition of HTTP_VERSION was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:204: warning: already initialized constant Puma::Const::HTTP_CONNECTION
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:204: warning: previous definition of HTTP_CONNECTION was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:205: warning: already initialized constant Puma::Const::HTTP_EXPECT
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:205: warning: previous definition of HTTP_EXPECT was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:206: warning: already initialized constant Puma::Const::CONTINUE
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:206: warning: previous definition of CONTINUE was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:208: warning: already initialized constant Puma::Const::HTTP_11_100
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:208: warning: previous definition of HTTP_11_100 was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:209: warning: already initialized constant Puma::Const::HTTP_11_200
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:209: warning: previous definition of HTTP_11_200 was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:210: warning: already initialized constant Puma::Const::HTTP_10_200
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:210: warning: previous definition of HTTP_10_200 was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:212: warning: already initialized constant Puma::Const::CLOSE
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:212: warning: previous definition of CLOSE was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:213: warning: already initialized constant Puma::Const::KEEP_ALIVE
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:213: warning: previous definition of KEEP_ALIVE was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:215: warning: already initialized constant Puma::Const::CONTENT_LENGTH2
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:215: warning: previous definition of CONTENT_LENGTH2 was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:216: warning: already initialized constant Puma::Const::CONTENT_LENGTH_S
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:216: warning: previous definition of CONTENT_LENGTH_S was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:217: warning: already initialized constant Puma::Const::TRANSFER_ENCODING
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:217: warning: previous definition of TRANSFER_ENCODING was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:218: warning: already initialized constant Puma::Const::TRANSFER_ENCODING2
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:218: warning: previous definition of TRANSFER_ENCODING2 was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:220: warning: already initialized constant Puma::Const::CONNECTION_CLOSE
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:220: warning: previous definition of CONNECTION_CLOSE was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:221: warning: already initialized constant Puma::Const::CONNECTION_KEEP_ALIVE
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:221: warning: previous definition of CONNECTION_KEEP_ALIVE was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:223: warning: already initialized constant Puma::Const::TRANSFER_ENCODING_CHUNKED
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:223: warning: previous definition of TRANSFER_ENCODING_CHUNKED was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:224: warning: already initialized constant Puma::Const::CLOSE_CHUNKED
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:224: warning: previous definition of CLOSE_CHUNKED was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:226: warning: already initialized constant Puma::Const::CHUNKED
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:226: warning: previous definition of CHUNKED was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:228: warning: already initialized constant Puma::Const::COLON
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:228: warning: previous definition of COLON was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:230: warning: already initialized constant Puma::Const::NEWLINE
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:230: warning: previous definition of NEWLINE was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:232: warning: already initialized constant Puma::Const::HIJACK_P
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:232: warning: previous definition of HIJACK_P was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:233: warning: already initialized constant Puma::Const::HIJACK
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:233: warning: previous definition of HIJACK was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:234: warning: already initialized constant Puma::Const::HIJACK_IO
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:234: warning: previous definition of HIJACK_IO was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:236: warning: already initialized constant Puma::Const::EARLY_HINTS
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:236: warning: previous definition of EARLY_HINTS was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:239: warning: already initialized constant Puma::Const::WORKER_CHECK_INTERVAL
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:239: warning: previous definition of WORKER_CHECK_INTERVAL was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:242: warning: already initialized constant Puma::Const::DQUOTE
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:242: warning: previous definition of DQUOTE was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:243: warning: already initialized constant Puma::Const::HTTP_HEADER_DELIMITER
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:243: warning: previous definition of HTTP_HEADER_DELIMITER was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:244: warning: already initialized constant Puma::Const::ILLEGAL_HEADER_KEY_REGEX
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:244: warning: previous definition of ILLEGAL_HEADER_KEY_REGEX was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:245: warning: already initialized constant Puma::Const::ILLEGAL_HEADER_VALUE_REGEX
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:245: warning: previous definition of ILLEGAL_HEADER_VALUE_REGEX was here
/home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce/lib/puma/const.rb:248: warning: already initialized constant Puma::Const::BANNED_HEADER_KEY
/home/deivid/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/puma-ea81fba045ce/lib/puma/const.rb:248: warning: previous definition of BANNED_HEADER_KEY was here
Using bundler 2.3.0.dev
Using nio4r 2.5.4
Using puma 5.0.4 from https://github.com/puma/puma.git (at /home/deivid/Code/playground/bundler_cache_bug/vendor/cache/puma-ea81fba045ce@ea81fba)
Updating files in vendor/cache
Bundle complete! 1 Gemfile dependency, 3 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
```
We don't need an actual checkout since the cache path is no longer used
as the install location. Now the per app cache acts just like the
standard cache.
This ensures that instance variable ordering cannot cause non-determinism in serialized gems
Enable lockfile checksums on Bundler 3 when there's no previous lockfile
…ec-gem-uninstall

Fix `bundle exec gem uninstall`
…m-dependency-to-yaml

Explicitly encode Gem::Dependency to yaml
Fix git source cache being used as the install location
This is an old syck thing, no longer used anywhere.
…e-fix

Port ruby-core tweak to a new test
We use pre-existence of `rake_path` to decide whether we need to
regenerate dummy test gems in `tmp`. When changing rubies, the previous
implementation will believe that the correct `rake_path` exists
and avoids regenerating dummy gems, given an error like the following
when specs are run:

```
(...)
Could not find rubygems-generate_index lib directory in /path/to/rubygems/bundler/tmp/1/gems/base/ruby/3.2.0
  # ./spec/support/builders.rb:253:in `block in update_repo'
  # ./spec/support/helpers.rb:337:in `block in with_gem_path_as'
  # ./spec/support/helpers.rb:351:in `without_env_side_effects'
  # ./spec/support/helpers.rb:332:in `with_gem_path_as'
  # ./spec/support/builders.rb:251:in `update_repo'
  # ./spec/support/builders.rb:228:in `build_repo'
  # ./spec/support/builders.rb:197:in `build_repo4'
  # ./spec/commands/lock_spec.rb:103:in `block (2 levels) in <top (required)>'
(...)
```

To fix this, fix the part of the path that depends on the implementation
and the Ruby version so that we don't give false positives.
…l-properties

Remove `to_yaml_properties`
Previously, if you have bundler installed both as a regular gem and a
default gem, the default gem would be displayed by `gem list`.
Removes the symlink for gems.rb.tt and instead uses the singular
template file. Only the destination filename for the gemfile reads from
the `init_gems_rb` setting.
Generate gems.rb from Gemfile.tt template for `bundle-gem`
Make `bundle check` exit with code 1 when gem git source is not yet
checked out.
Fix `bundle check` exit code when gem git source is not checked out
…accross-ruby-versions

Make test env resilient to ruby version changes
RuboCop sometimes accepts extra spaces for alignment, but in this case I
don't see any consistent alignment.
deivid-rodriguez and others added 30 commits September 16, 2024 18:14
A spec needed changes because now loading the default `json` prints a
warning about `ostruct` getting loaded although it will be removed in
the future. Use a different default gem to test this.

Co-authored-by: Samuel Giddins <segiddins@segiddins.me>
…ub/codeql-action-3.26.7

Bump github/codeql-action from 3.26.6 to 3.26.7
Fix spelling, it's "cannot" rather than "can not"
…nfig

One more attempt at grouping cargo dependabot PRs
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.192.0 to 1.193.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](ruby/setup-ruby@a6b46b8...f321cf5)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…/setup-ruby-1.193.0

Bump ruby/setup-ruby from 1.192.0 to 1.193.0
Changelogs for RubyGems 3.5.19 and Bundler 2.5.19
…-with-ourselves

Stop fighting with ourselves
I suspect someone could be setting this instance variable, and the
previous changes made that no longer effective.

Also I implemented a previous TOOD in `full_gem_path` the other way
around:

> # TODO: This is a heavily used method by gems, so we'll need
> # to aleast just alias it to #gem_dir rather than remove it.

I made `gem_dir` an alias of `full_gem_path` rather than the opposite.

This alternative change keeps both methods symmetric without deprecating
either of them for now.
Restore `Gem::BasicSpecification#gem_dir` as an attribute accessor
It has been supported since RubyGems 2.2.0 via 4525e45

Signed-off-by: Samuel Giddins <segiddins@segiddins.me>
…es-not-try-to-install-bundler

Don't try to install locked bundler when `--local` is passed
Nothing here relies on the dependency being on a pre-release, and
Bundler does not use prereleases in the realworld.
…warnings

Disallow RubyGems warnings during Bundler test suite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⤵️ pull merge-conflict Resolve conflicts manually
Projects
None yet
Development

Successfully merging this pull request may close these issues.