Commit graph

14659 commits

Author SHA1 Message Date
Hiroshi SHIBATA
8b0c626962 Skip warning feature with Bootsnap
Bootsnap modified full feature path to require. We can't handle it for
  warning correctly.
2023-12-14 07:48:08 +09:00
Akira Matsuda
75c40802cb [Bug #20060] Properly return matched gem name in case of EXACT
this follows up 4e6861d337
2023-12-14 07:47:56 +09:00
Samuel Giddins
baf2ec2ca8 [rubygems/rubygems] Use match? when regexp match data is unused
Improved performance / reduced allocations

b04726c9a7
2023-12-13 22:00:26 +00:00
Martin Emde
7f4b271a61 [rubygems/rubygems] Store Checksum::Store indexed by spec.lock_name
34d6c6c72f
2023-12-13 20:28:37 +00:00
Samuel Giddins
6aa26af683 [rubygems/rubygems] Add 3.4 as a supported ruby version
Since ruby trunk will be 3.4 very soon

36dd9a35dc
2023-12-13 19:02:24 +00:00
Takashi Kokubun
0f1c7e3bcb
RJIT: Just skip generating code for aarch64/arm64 (#9221) 2023-12-13 09:36:06 -08:00
David Rodríguez
a4b43e9264 [rubygems/rubygems] Add missing resolv, timeout, and net-protocol licenses
00694651a3
2023-12-13 15:47:43 +00:00
tomoya ishida
745ab3e4c7 [ruby/irb] Warn and do nothing if block is passed to measure command
(https://github.com/ruby/irb/pull/813)

e79a90a1e6
2023-12-13 11:06:26 +00:00
Hiroshi SHIBATA
a7ad9f3836
We need only one line for detecting caller gem name 2023-12-13 17:30:48 +09:00
Hiroshi SHIBATA
5f5f8dbbb6 [ruby/resolv] Bump up 0.3.0
22153c2a45
2023-12-13 15:11:21 +09:00
David Rodríguez
ac939d9ca3 [rubygems/rubygems] Improve default gem handling
If a gem is specified in the Gemfile (or resolved as a transitive
dependency), it's always resolved from remote/installed sources. Default
gems are only used as a fallback for gems not included in the bundle.

I believe this leads to more consistent behavior and more portable apps,
since all gems will be installed to the configured bundle path,
regardless of whether they are default gems or not.

091b4fcf2b
2023-12-13 13:02:22 +09:00
David Rodríguez
1a7aa5560f [rubygems/rubygems] Refactor bundle info
0e919eaa87
2023-12-13 13:02:22 +09:00
David Rodríguez
70428247c6 [rubygems/rubygems] Remove dead code
fad186df39
2023-12-13 13:02:21 +09:00
David Rodríguez
6b3c9cebe9 Normalize bundler bindir
This makes bundler consistent with all other gems, and makes the default
installation of Bundler in the release package look like any other
bundler installation.

Before (on preview3, for example), Bundler executable is installed at:

lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/libexec/bundle

Now it's installed in the standard location:

lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/exe/bundle
2023-12-13 12:59:23 +09:00
Hiroshi SHIBATA
5015481e53 Removed duplicated LICENSE file 2023-12-13 12:16:55 +09:00
Vít Ondruch
befbcfd90c [rubygems/rubygems] Explain the 3 states options[:user_install] can have.
This was issue previously, so hopefully this comment tries to state this
explicitly for future readers.

8ccd830f85
2023-12-13 12:16:55 +09:00
Vít Ondruch
402fd96ddc [rubygems/rubygems] Make sure --no-user-install is respected for auto user installation
The `options[:user_install]` might have three states:
* `true`: `--user-install`
* `false`: `--no-user-install` and
* `nil`: option was not specified

However, this had not been respected previously and the `false` and `nil`
were treated the same. This could lead to auto user installation despite
`--no-user-install` being specified on the command line.

Fixes https://github.com/rubygems/rubygems/pull/7237

9281545474
2023-12-13 12:16:55 +09:00
David Rodríguez
20d99a2f5f [rubygems/rubygems] Resolv needs vendoring too
cdfc6923e4
2023-12-13 12:16:55 +09:00
David Rodríguez
f188a41afe [rubygems/rubygems] Use vendored timeout from RubyGems
cfc5018c54
2023-12-13 12:16:55 +09:00
David Rodríguez
a7c9163b5d [rubygems/rubygems] Vendor timeout in RubyGems too
e2e7440ede
2023-12-13 12:16:55 +09:00
David Rodríguez
90317472e8 [rubygems/rubygems] Use vendored net-http in Bundler
0d758e8926
2023-12-13 12:16:55 +09:00
David Rodríguez
ce924ce1fb [rubygems/rubygems] Vendor net-http and net-protocol in RubyGems
99d91c9ed2
2023-12-13 12:16:55 +09:00
David Rodríguez
8d1a203664 [rubygems/rubygems] Require rubygems/request where it's used
73b9498658
2023-12-13 12:16:55 +09:00
David Rodríguez
1572322e17
Sync with upstream rubygems (#9206) 2023-12-12 11:49:25 -08:00
Stan Lo
d1cf793adc [ruby/irb] Remove documents about deprecated/WIP features and some
slight adjustments
(https://github.com/ruby/irb/pull/811)

6a9193e88b
2023-12-12 18:46:07 +00:00
Martin Emde
f671c5d179 [rubygems/rubygems] Make RubyDsl a little easier to read; avoid a Hash sometimes
2dca83722b
2023-12-12 15:26:01 +00:00
Martin Emde
d1c25605f6 [rubygems/rubygems] Resolve ruby file: ".ruby-version" relative to Gemfile
0cbbaed8a5
2023-12-12 12:40:17 +00:00
Stan Lo
28a9a4275c [ruby/irb] Remove trailing space
This is required to fix ruby/ruby's CI

3c77213209
2023-12-12 11:27:39 +00:00
Burdette Lamar
35990cb38c [ruby/irb] [DOC] RDoc for module IRB
(https://github.com/ruby/irb/pull/738)

[DOC] RDoc for module IRB

f3a0626298
2023-12-12 10:34:38 +00:00
Nobuyoshi Nakada
e411bd5b36 [ruby/securerandom] [DOC] Satisfy RDoc coverage
ddf2672e47
2023-12-12 06:40:44 +00:00
Nobuyoshi Nakada
dbd704ae6f [ruby/securerandom] [DOC] Add documents of methods and constants
9a99978135
2023-12-12 06:40:43 +00:00
Yusuke Endoh
cb93d10ae5 [ruby/securerandom] [DOC] Improve the document about reproducibility of uuid_v7
https://github.com/ruby/securerandom/pull/19/files#r1329476195

156cbb8448
2023-12-12 06:36:10 +00:00
Martin Emde
1e5c8afb15 [rubygems/rubygems] Ensure that the lockfile mtime is not altered on frozen install
6847709ee0
2023-12-12 02:39:57 +00:00
Samuel Giddins
e223dde329 [rubygems/rubygems] Allow bundle pristine to run in parallel
Also fix running when BUNDLE_NO_INSTALL happens to be set, same as with install/update commands

a555fd6ccd
2023-12-12 02:10:53 +00:00
Franz Liedke
6414f260fc [rubygems/rubygems] Refactor: Wrap filesystem access
119d4bdc09
2023-12-12 01:08:20 +00:00
Franz Liedke
0653fb026c [rubygems/rubygems] Refactor: Move filesystem access into Definition class
2720da2659
2023-12-12 01:08:20 +00:00
Franz Liedke
0ec88b54f3 [rubygems/rubygems] bundle lock: Always touch the lockfile
fd2e71dfdb
2023-12-12 01:08:19 +00:00
David Rodríguez
a848c070d2
[rubygems/rubygems] Remove doc not adding much value
c241a88962
2023-12-12 10:04:57 +09:00
David Rodríguez
0b24c71a5a
[rubygems/rubygems] Improve enabling bundled gems warnings
7be5b40ca9
2023-12-12 10:04:57 +09:00
David Rodríguez
a06bf001b2
[rubygems/rubygems] Remove non-transparent requirement added to prerelease gems
I think we can safely assume these days that all RubyGems and Bundler
versions that will ever bundle a new gem created in 2023 support
prereleases.

So this non transparent requirement is not necessary.

In my opinion, it should be the gem author to explicitly add this
constraint, not RubyGems.

b165e6d725
2023-12-12 10:04:57 +09:00
Vít Ondruch
b37288c047
[rubygems/rubygems] Make the "auto-user-install" logic easier to follow
4b4d9c0106
2023-12-12 10:04:56 +09:00
David Rodríguez
c032dfb5cb
[rubygems/rubygems] Fix installing from source when same bundler version already a default gem
620119308e
2023-12-12 10:04:56 +09:00
David Rodríguez
23289ad45b
[rubygems/rubygems] Extract some common strings to variables
48bc573310
2023-12-12 10:04:56 +09:00
David Rodríguez
a811ebf3d5
[rubygems/rubygems] Revert missing extensions patch
4016c6c024
2023-12-12 10:04:56 +09:00
Samuel Giddins
505715ddf1 [rubygems/rubygems] Fewer allocations in gem installation
For now, on a small rails app I have hanging around:

```
==> memprof.after.txt <==
Total allocated: 872.51 MB (465330 objects)
Total retained:  40.48 kB (326 objects)

==> memprof.before.txt <==
Total allocated: 890.79 MB (1494026 objects)
Total retained:  40.40 kB (328 objects)
```

Not a huge difference in memory usage, but it's a drastic improvement
in total number of allocations.

Additionally, this will pay huge dividends once
https://github.com/ruby/zlib/pull/61 is merged, as it will allow us to
completely avoid allocations in the repeated calls to readpartial,
which currently accounts for most of the memory usage shown above.

f78d45d927
2023-12-11 23:14:58 +00:00
Martin Emde
e186cebe42 [rubygems/rubygems] Override initialize in bundle rubygems_ext for NameTuple
f63ce682d2
2023-12-11 15:40:08 +00:00
Daisuke Aritomo
1ab91b12fa [rubygems/rubygems] Stream output from ext builds when --verbose
Uses Open3.popen2e in place of Open3.capture2e in Gem::Ext::Builder.
This change aims to stream stdout/stderr of ext builds when in verbose
mode, instead of printing everything at once when the build completes.

Nice for debugging gem builds that consumes longer times.

dcdcb5adda
2023-12-11 11:07:36 +00:00
Stan Lo
130268e264 [ruby/irb] Simplify show_source's super calculation
(https://github.com/ruby/irb/pull/807)

2cccc448de
2023-12-10 04:21:46 +00:00
Yusuke Endoh
edb8fc24d4 [ruby/error_highlight] Bump version
942a723d32
2023-12-09 08:34:08 +00:00
Benoit Daloze
a94a2eea34 [rubygems/rubygems] Upstream RubyGems changes from TruffleRuby
749a508968
2023-12-08 17:01:23 +00:00