From b50606c45a33ef885c7c128f2dbb221d5d837f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 17 Mar 2021 17:26:17 +0100 Subject: [PATCH] [rubygems/rubygems] Don't serialize gemspec in the cache location 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. ``` https://github.com/rubygems/rubygems/commit/039d9fb2cd --- lib/bundler/source/git.rb | 1 - spec/bundler/cache/git_spec.rb | 20 -------------------- 2 files changed, 21 deletions(-) diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index b4140b3f91..8ee3f6600e 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -223,7 +223,6 @@ module Bundler FileUtils.rm_rf(app_cache_path) git_proxy.checkout if requires_checkout? git_proxy.copy_to(app_cache_path, @submodules) - serialize_gemspecs_in(app_cache_path) end def load_spec_files diff --git a/spec/bundler/cache/git_spec.rb b/spec/bundler/cache/git_spec.rb index 35e8a26501..13ed6a6f39 100644 --- a/spec/bundler/cache/git_spec.rb +++ b/spec/bundler/cache/git_spec.rb @@ -238,26 +238,6 @@ RSpec.describe "bundle cache with git" do expect(the_bundle).to include_gems "has_submodule 1.0" end - it "caches pre-evaluated gemspecs" do - git = build_git "foo" - - # Insert a gemspec method that shells out - spec_lines = lib_path("foo-1.0/foo.gemspec").read.split("\n") - spec_lines.insert(-2, "s.description = `echo bob`") - update_git("foo") {|s| s.write "foo.gemspec", spec_lines.join("\n") } - - install_gemfile <<-G - source "https://gem.repo1" - gem "foo", :git => '#{lib_path("foo-1.0")}' - G - bundle "config set cache_all true" - bundle :cache - - ref = git.ref_for("main", 11) - gemspec = bundled_app("vendor/cache/foo-1.0-#{ref}/foo.gemspec").read - expect(gemspec).to_not match("`echo bob`") - end - it "can install after bundle cache with git not installed" do build_git "foo"