Граф коммитов

86646 Коммитов

Автор SHA1 Сообщение Дата
Peter Zhu 7464514ca5 Fix memory leak in String#start_with? when regexp times out
[Bug #20653]

This commit refactors how Onigmo handles timeout. Instead of raising a
timeout error, onig_search will return a ONIGERR_TIMEOUT which the
caller can free memory, and then raise a timeout error.

This fixes a memory leak in String#start_with when the regexp times out.
For example:

    regex = Regexp.new("^#{"(a*)" * 10_000}x$", timeout: 0.000001)
    str = "a" * 1000000 + "x"

    10.times do
      100.times do
        str.start_with?(regex)
      rescue
      end

      puts `ps -o rss= -p #{$$}`
    end

Before:

    33216
    51936
    71152
    81728
    97152
    103248
    120384
    133392
    133520
    133616

After:

    14912
    15376
    15824
    15824
    16128
    16128
    16144
    16144
    16160
    16160
2024-07-26 08:42:38 -04:00
David Rodríguez 67e1ea0028 [rubygems/rubygems] Remove inconsistent whitespace from CLI flags
RuboCop sometimes accepts extra spaces for alignment, but in this case I
don't see any consistent alignment.

https://github.com/rubygems/rubygems/commit/a8c767e14b
2024-07-26 12:16:56 +00:00
David Rodríguez bfaccd6433 [rubygems/rubygems] Make all tests still pass when switching from truffleruby to cruby
https://github.com/rubygems/rubygems/commit/4f3d9fa3bf
2024-07-26 08:05:53 +00:00
David Rodríguez 7feccb123a [rubygems/rubygems] Make test env resilient to ruby version changes
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.

https://github.com/rubygems/rubygems/commit/fafacfa210
2024-07-26 08:05:53 +00:00
Jerome Dalbert 71dec15a70 [rubygems/rubygems] Fix bundle check exit code when git gem is missing
Make `bundle check` exit with code 1 when gem git source is not yet
checked out.

https://github.com/rubygems/rubygems/commit/93162bf5af
2024-07-26 07:56:15 +00:00
dependabot[bot] 3542ad52e2 Bump github/codeql-action from 3.25.13 to 3.25.14
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.13 to 3.25.14.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2d790406f5...5cf07d8b70)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-26 11:57:54 +09:00
Nobuyoshi Nakada 5f1eb0dc79
Fix wrong conversion in disasm dump
`LINK_ELEMENT::type` is an `enum` not a `VALUE`, `FIX2LONG` doesn't
make sense.
2024-07-26 11:24:53 +09:00
Hiroshi SHIBATA 83a99bdbe6 [ruby/net-http] Removed needless NullWriter class
https://github.com/ruby/net-http/commit/ddb2a81aed
2024-07-26 01:45:02 +00:00
yui-knk 2c76bb7ec0 Remove `struct RNode_VALUES`
This was removed by a5cc6341c0.
2024-07-26 10:29:26 +09:00
yui-knk f2728c3393 Change RESBODY Node structure
Extracrt exception variable into `nd_exc_var` field
to keep the original grammar structure.

For example:

```
begin
rescue Error => e1
end
```

Before:

```
@ NODE_RESBODY (id: 8, line: 2, location: (2,0)-(2,18))
+- nd_args:
|   @ NODE_LIST (id: 2, line: 2, location: (2,7)-(2,12))
|   +- as.nd_alen: 1
|   +- nd_head:
|   |   @ NODE_CONST (id: 1, line: 2, location: (2,7)-(2,12))
|   |   +- nd_vid: :Error
|   +- nd_next:
|       (null node)
+- nd_body:
|   @ NODE_BLOCK (id: 6, line: 2, location: (2,13)-(2,18))
|   +- nd_head (1):
|   |   @ NODE_LASGN (id: 3, line: 2, location: (2,13)-(2,18))
|   |   +- nd_vid: :e1
|   |   +- nd_value:
|   |       @ NODE_ERRINFO (id: 5, line: 2, location: (2,13)-(2,18))
|   +- nd_head (2):
|       @ NODE_BEGIN (id: 4, line: 2, location: (2,18)-(2,18))
|       +- nd_body:
|           (null node)
+- nd_next:
    (null node)
```

After:

```
@ NODE_RESBODY (id: 6, line: 2, location: (2,0)-(2,18))
+- nd_args:
|   @ NODE_LIST (id: 2, line: 2, location: (2,7)-(2,12))
|   +- as.nd_alen: 1
|   +- nd_head:
|   |   @ NODE_CONST (id: 1, line: 2, location: (2,7)-(2,12))
|   |   +- nd_vid: :Error
|   +- nd_next:
|       (null node)
+- nd_exc_var:
|   @ NODE_LASGN (id: 3, line: 2, location: (2,13)-(2,18))
|   +- nd_vid: :e1
|   +- nd_value:
|       @ NODE_ERRINFO (id: 5, line: 2, location: (2,13)-(2,18))
+- nd_body:
|   @ NODE_BEGIN (id: 4, line: 2, location: (2,18)-(2,18))
|   +- nd_body:
|       (null node)
+- nd_next:
    (null node)
```
2024-07-26 07:29:32 +09:00
Jason Karns a4563be05c [rubygems/rubygems] bundle-gem learns to find Gemfile template correctly
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.

https://github.com/rubygems/rubygems/commit/43ce0e1666
2024-07-25 19:50:59 +00:00
Peter Zhu 54ff3d6996 Fix test_kwarg_eval_memory_leak
Hash.new no longer takes keyword arguments except for capacity, so we
should just use a method that takes keyword arguments instead.
2024-07-25 15:25:37 -04:00
Kevin Newton 24770c30f8 [ruby/prism] Sync from ruby/ruby
https://github.com/ruby/prism/commit/280517c325
2024-07-25 18:59:10 +00:00
Alan Wu 83b0cedffe Add branch prediction annotations for object allocation
I get a slight boost from these with GCC 11 on Intel Skylake.

Part of a larger story to fix an allocation throughput regression
compared to 98eeadc ("Development of 3.4.0 started.") as the baseline.
2024-07-25 12:46:33 -04:00
Peter Zhu 10574857ce Fix memory leak in Regexp capture group when timeout
[Bug #20650]

The capture group allocates memory that is leaked when it times out.

For example:

    re = Regexp.new("^#{"(a*)" * 10_000}x$", timeout: 0.000001)
    str = "a" * 1000000 + "x"

    10.times do
      100.times do
        re =~ str
      rescue Regexp::TimeoutError
      end

      puts `ps -o rss= -p #{$$}`
    end

Before:

    34688
    56416
    78288
    100368
    120784
    140704
    161904
    183568
    204320
    224800

After:

    16288
    16288
    16880
    16896
    16912
    16928
    16944
    17184
    17184
    17200
2024-07-25 09:23:49 -04:00
Benoit Daloze 53f0d3b1f7 [ruby/prism] Do not serialize common flags when PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS is set
* Note that we could shift the flags by 2 on serialize & deserialize
  but it does not seems worth it as it does not save serialized size
  in any significant amount, i.e. average was 0.799 before #2924.
* $ bundle exec rake serialized_size:topgems
Before:
Total sizes for top 100 gems:
total source size:      90207647
total serialized size:  69477115
total serialized/total source: 0.770

Stats of ratio serialized/source per file:
average: 0.844
median:  0.825
1st quartile: 0.597
3rd quartile: 1.064
min - max: 0.078 - 3.792

After:
Total sizes for top 100 gems:
total source size:      90207647
total serialized size:  66150209
total serialized/total source: 0.733

Stats of ratio serialized/source per file:
average: 0.800
median:  0.779
1st quartile: 0.568
3rd quartile: 1.007
min - max: 0.076 - 3.675

https://github.com/ruby/prism/commit/e012072f70
2024-07-25 11:39:05 +00:00
Benoit Daloze 9cc2747ebb [ruby/prism] Do not serialize node_id when PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS is set
* $ bundle exec rake serialized_size:topgems
Before:
Total sizes for top 100 gems:
total source size:      90207647
total serialized size:  86284647
total serialized/total source: 0.957

Stats of ratio serialized/source per file:
average: 0.952
median:  0.937
1st quartile: 0.669
3rd quartile: 1.206
min - max: 0.080 - 4.065

After:
Total sizes for top 100 gems:
total source size:      90207647
total serialized size:  69477115
total serialized/total source: 0.770

Stats of ratio serialized/source per file:
average: 0.844
median:  0.825
1st quartile: 0.597
3rd quartile: 1.064
min - max: 0.078 - 3.792

https://github.com/ruby/prism/commit/cf90fe5759
2024-07-25 11:39:04 +00:00
Yusuke Endoh 22ad6b249b Extend RUBY_TEST_TIMEOUT_SCALE on macos-14 and --repeat-count=2 2024-07-25 14:43:03 +09:00
Yusuke Endoh 5f6a1c2e22 Omit TestFile#test_stat when the machine is stupidly slow
GitHub Actions macos-14 machine is stupid.

https://app.launchableinc.com/organizations/ruby/workspaces/ruby/data/test-paths/file%3Dtest%2Fruby%2Ftest_file.rb%23%23%23class%3DTestFile%23%23%23testcase%3Dtest_stat?organizationId=ruby&workspaceId=ruby&testPathId=file%3Dtest%2Fruby%2Ftest_file.rb%23%23%23class%3DTestFile%23%23%23testcase%3Dtest_stat&testSessionStatus=flake
2024-07-25 13:47:51 +09:00
yui-knk 357ae357e8 Dump forwarding field of `struct rb_args_info` and `struct RNode_BLOCK_PASS` 2024-07-25 13:23:14 +09:00
David Rodríguez 30eba40f9c [rubygems/rubygems] Remove `to_yaml_properties`
This is an old syck thing, no longer used anywhere.

https://github.com/rubygems/rubygems/commit/6f72d02bac
2024-07-24 19:55:04 +00:00
Samuel Giddins 0d3ce31234 [ruby/openssl] Set time directly on the x509 store
(https://github.com/ruby/openssl/pull/770)

Instead of an ivar, so other ossl functions that take a store will use the correct time when verifying

https://github.com/ruby/openssl/commit/21aadc66ae
2024-07-24 16:51:00 +00:00
Kazuki Yamaguchi 1388945f0d [ruby/openssl] asn1: make ossl_asn1_get_asn1type() private
The function is not used anywhere outside of ossl_asn1.c.

https://github.com/ruby/openssl/commit/5392b79941
2024-07-24 16:50:01 +00:00
Kazuki Yamaguchi a1cf39bd36 [ruby/openssl] x509attr: avoid using OpenSSL::ASN1 internals in #value=
OpenSSL::ASN1 is being rewritten in Ruby. To make it easier, let's
remove dependency to the instance variables and the internal-use
function ossl_asn1_get_asn1type() outside OpenSSL::ASN1.

This also fixes the insufficient validation of the passed value with
its tagging.

https://github.com/ruby/openssl/commit/35a157462e
2024-07-24 16:50:01 +00:00
Kevin Newton 575fe63e20 [ruby/prism] Inherit ractor state for child scopes
https://github.com/ruby/prism/commit/4576cb1d96
2024-07-24 16:24:21 +00:00
Alan Wu d08e55141e Make Integer#round spec work regardless of pointer size
The spec is actually testing a behaviour stemming from NUM2INT(), and
since `sizeof(long)>=sizeof(int)`, `min_long-1` always makes NUM2INT()
raise `RangeError`.
2024-07-24 18:20:30 +02:00
Alan Wu 28382505b2 Get fixnum_{min,max} from RbConfig::LIMITS when available
It's better than guessing based on the pointer size if the
implementation provides it directly.
2024-07-24 18:20:30 +02:00
Alan Wu fbb981b9f8 Stop depending on Integer#size to return `sizeof(long)`
There is no guarantee that Integer#size will continue to return
`sizeof(long)` for small integers.

Use the `l!` specifier for Array#pack instead. It is a public
interface that has a direct relationship with the `long` type.
2024-07-24 18:20:30 +02:00
Alan Wu 12e6cf77ef Add "c_long_size" guard, supplanting "wordsize" and stop using Integer#size
What a "word" is when talking about sizes is confusing because it's a
highly overloaded term. Intel, Microsoft, and GDB are just a few vendors
that have their own definition of what a "word" is. Specs that used the
"wordsize" guard actually were mostly testing for the size of the C
`long` fundamental type, so rename the guard for clarity.

Also, get the size of `long` directly from RbConfig instead of guessing
using Integer#size. Integer#size is not guaranteed to have anything to
do with the `long` type.
2024-07-24 18:20:30 +02:00
Kevin Newton 1a18b03ee7 [PRISM] Add anon_* flags for iseqs with anonymous * and ** 2024-07-24 12:02:33 -04:00
Peter Zhu 0a9f771e19 Don't check live slot count when multi-Ractor 2024-07-24 09:44:54 -04:00
Nobuyoshi Nakada 97449338d6 [Bug #20649] Allow `nil` as 2nd argument of `assign_error`
Fallback to the last token element in that case, for the backward
compatibilities.
2024-07-24 22:18:36 +09:00
Peter Zhu f69ba5716f Move RUBY_FREE_AT_EXIT check earlier
Things that exit early, like `ruby -v`, could not use RUBY_FREE_AT_EXIT
because the check for RUBY_FREE_AT_EXIT was not executed.
2024-07-24 08:36:40 -04:00
dependabot[bot] 993bb55d98 Bump ruby/setup-ruby from 1.187.0 to 1.188.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.187.0 to 1.188.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](161cd54b69...50ba3386b0)

---
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>
2024-07-24 17:16:07 +09:00
Nobuyoshi Nakada e642ddf7ae
[Bug #20647] Disallow `return` directly within a singleton class 2024-07-24 14:44:32 +09:00
Nobuyoshi Nakada f2f9d6ce49
Fix test failure of e7610582ad 2024-07-24 14:04:13 +09:00
eileencodes b4a02502c2 [PRISM] Fix block param instructions when it has a recevier
In the following code:

```ruby
def foo(&blk)
  blk.call
end
```

Prism was using the `getblockparam` instruction but it should be
`getblockparamproxy`. In this case we have a receiver, if it's a local
variable read node, then it needs to go through the path to use
`getblockparamproxy`.

Before:

```
== disasm: #<ISeq:<main>@test2.rb:1 (1,0)-(3,3)>
0000 definemethod                           :foo, foo                 (   1)[Li]
0003 putobject                              :foo
0005 leave

== disasm: #<ISeq:foo@test2.rb:1 (1,0)-(3,3)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: 0, kw: -1@-1, kwrest: -1])
[ 1] blk@0<Block>
0000 getblockparam                          blk@0, 0                  (   2)[LiCa]
0003 opt_send_without_block                 <calldata!mid:call, argc:0, ARGS_SIMPLE>
0005 leave                                                            (   3)[Re]
```

After:

```
== disasm: #<ISeq:<main>@test2.rb:1 (1,0)-(3,3)>
0000 definemethod                           :foo, foo                 (   1)[Li]
0003 putobject                              :foo
0005 leave

== disasm: #<ISeq:foo@test2.rb:1 (1,0)-(3,3)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: 0, kw: -1@-1, kwrest: -1])
[ 1] blk@0<Block>
0000 getblockparamproxy                     blk@0, 0                  (   2)[LiCa]
0003 opt_send_without_block                 <calldata!mid:call, argc:0, ARGS_SIMPLE>
0005 leave                                                            (   3)[Re]
```

Fixes `test_getblockparamproxy` and `test_ifunc_getblockparamproxy` in
test_yjit.rb. Related to ruby/prism#2935.
2024-07-23 21:45:48 -04:00
eileencodes 70d4dcb76c [Prism] Use `putnil` for nil kwargs, not `putobject {}`
This addresses one of the issues in the `test_kw_splat_nil` failure, but
doesn't make the test pass because of other changes that need to be made
to Prism directly.

One issue was when we have the following code Prism was using
`putobject` with an empty hash whereas the parse.y parser used `putnil`.

```ruby
:ok.itself(**nil)
```

Before:

```
0000 putobject                              :ok                       (   1)[Li]
0002 putobject                              {}
0004 opt_send_without_block                 <calldata!mid:itself, argc:1, KW_SPLAT>
0006 leave
```

After:

```
== disasm: #<ISeq:<main>@test2.rb:1 (1,0)-(1,17)>
0000 putobject                              :ok                       (   1)[Li]
0002 putnil
0003 opt_send_without_block                 <calldata!mid:itself, argc:1, KW_SPLAT>
0005 leave
```

Related to ruby/prism#2935.
2024-07-23 21:45:40 -04:00
David Rodríguez 4b44590d39 [rubygems/rubygems] Keep only the bare clone in the per app cache
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.

https://github.com/rubygems/rubygems/commit/686988923c
2024-07-23 20:15:10 +00:00
David Rodríguez b50606c45a [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
2024-07-23 20:15:10 +00:00
David Rodríguez a7657b0106 [rubygems/rubygems] Stop using the cache path as the install location
https://github.com/rubygems/rubygems/commit/ecadd02746
2024-07-23 20:15:10 +00:00
David Rodríguez a4ec5f8747 [rubygems/rubygems] Stop removing the `.git` folder from cached git gems
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.

https://github.com/rubygems/rubygems/commit/607eda63eb
2024-07-23 20:15:09 +00:00
David Rodríguez b1db07074b [rubygems/rubygems] Refactor `set_paths!`
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.

https://github.com/rubygems/rubygems/commit/55904094e8
2024-07-23 20:15:09 +00:00
David Rodríguez 26b1c7ed16 [rubygems/rubygems] Restrict local behaviour of git gems to local overrides
We want local overrides to behave just like "path gems" but per-app
caches are different.

https://github.com/rubygems/rubygems/commit/797d717a2d
2024-07-23 20:15:08 +00:00
David Rodríguez 66e539418d [rubygems/rubygems] Prefer `install_path` alias
For consistency with the rest of usages in this class.

https://github.com/rubygems/rubygems/commit/69f9ab34b1
2024-07-23 20:15:08 +00:00
David Rodríguez 0710e60802 [rubygems/rubygems] Move duplicated code to a method
https://github.com/rubygems/rubygems/commit/fbb4ce168c
2024-07-23 20:15:07 +00:00
David Rodríguez 6b5579153d [rubygems/rubygems] Add debugging message to `Bundler::Source::Git#specs`
It's not obvious that the git source actually reinstalls a proper
checkout of the repository on usage if necessary. This adds a debugging
message to log that, just like it's done when explicitly installing the
source.

https://github.com/rubygems/rubygems/commit/04e8e42a43
2024-07-23 20:15:07 +00:00
Samuel Giddins 83b48022c1 [rubygems/rubygems] Explicitly encode Gem::Dependency to yaml
This ensures that instance variable ordering cannot cause non-determinism in serialized gems

https://github.com/rubygems/rubygems/commit/0e912704f7
2024-07-23 20:14:59 +00:00
David Rodríguez e7610582ad [rubygems/rubygems] Fix `bundle exec gem uninstall`
* `bundle exec` assigns `Gem::Specification.all` to the set of specs
  known to Bundler (a `Bundler::SpecSet`).

* `gem uninstall` recently started calling `#delete` on the set of specs
  stored in `Gem::Specification#all`. This, in RubyGems, is just an
  array of specs, so has a `#delete` method that receives a single
  element.

* However, at some point I added a `SpecSet#delete` method that takes an
  array of specs, breaking the "Array-like" contract and making `gem
  uninstall` break when run in a `bundle exec` context.

The fix is to make `Bundler::SpecSet#delete` handle being given a single
spec.

https://github.com/rubygems/rubygems/commit/e3acb7b01d
2024-07-23 19:43:26 +00:00
David Rodríguez 481c83453b [rubygems/rubygems] Enable checksums on Bundler 3 for fresh lockfiles
And get specs passing.

https://github.com/rubygems/rubygems/commit/c23b5f5b84
2024-07-23 19:40:09 +00:00