Commit graph

12164 commits

Author SHA1 Message Date
Martin Emde
499e66d05c [rubygems/rubygems] Gem::NameTuple equality ignores Gem::Platform/string platform variation
49aaa46708
2023-10-21 20:35:34 +00:00
Stan Lo
745879b5ed [ruby/irb] Minor refactors around irb.rb
(https://github.com/ruby/irb/pull/736)

* Remove dead method

* Simplify IRB.version

* Move private Irb methods together

* Centralise @CONF initialization/assignment in init.rb

* Move attr_* calls above initialize method

cf23be4395
2023-10-21 18:06:00 +00:00
Hiroshi SHIBATA
0976488970 [ruby/logger] Bump up required ruby version to 2.5
ac911eae2b
2023-10-20 02:37:07 +00:00
Hiroshi SHIBATA
13b33b109f [ruby/logger] Use Gemfile instead of Gem::Specification#add_development_dependency
7b51af263f
2023-10-20 02:37:04 +00:00
Hiroshi SHIBATA
1640dbdedd
Sort gem names 2023-10-20 09:13:55 +09:00
Hiroshi SHIBATA
2a56a6c3af
racc is also extracted to bundled gems 2023-10-20 09:13:55 +09:00
Samuel Giddins
205cbc09d3 [rubygems/rubygems] Reuse Gem::RemoteFetcher instance in bundler
Closes https://github.com/rubygems/rubygems/issues/7076

Bundler will now use the same (shared) remote fetcher instance that
RubyGems uses.

This will allow installs to use a shared connection pool, which
represents a significant performance improvement on a clean install.

cd87b40fe1
2023-10-19 21:40:21 +00:00
Samuel Giddins
af222d4db2 [rubygems/rubygems] Update vendored thor to v1.3.0
See https://github.com/rails/thor/releases/tag/v1.3.0

3c7165474b
2023-10-19 20:02:47 +00:00
Matt Valentine-House
62e340251b Don't add anonymous locals when ISEQ binary debug is on 2023-10-19 16:57:43 +01:00
Hiroshi SHIBATA
5e5a8cf752 [ruby/ostruct] Use Gemfile instead of Gem::Specification#add_development_dependency
ed49920766
2023-10-19 06:55:40 +00:00
Hiroshi SHIBATA
3605c9ae60
Don't need to refer SINCE constant 2023-10-19 13:51:31 +09:00
Jeremy Evans
de07645019 [ruby/drb] Support :SSL{Min,Max}Version config options
These are necessary to get the tests passing with LibreSSL 3.8.1+,
which dropped support for TLSv1.0 and TLSv1.1 for security reasons.

This updates the tests to use TLSv1.2 on OpenBSD.  This is only
strictly necessary on OpenBSD 7.4+, but it will work fine in previous
versions as well.

32707b2db5
2023-10-18 21:13:21 +00:00
Kevin Newton
6873f96abc [ruby/prism] Bump to version 0.15.1
d906a8ceba
2023-10-18 19:19:38 +00:00
Kevin Newton
0f1e040068 [ruby/prism] Bump to version 0.15.0
ee429f8d50
2023-10-18 16:49:58 +00:00
Kevin Newton
8210cc4218 [ruby/prism] Fix lex compat when dedent should be 0
41c0e0e06e
2023-10-18 16:09:16 +00:00
Kevin Newton
c82b10bbc3 [ruby/prism] Modify less of the CRuby locals
aca24b3a17
2023-10-18 16:08:32 +00:00
Kevin Newton
5d0604366e [ruby/prism] Add * and & to methods with ...
e8114a786a
2023-10-18 16:08:31 +00:00
Kyle Stevens
ef3f9f1a68 [rubygems/rubygems] Allow uninstalling multiple versions of same gem
Currently, you can install multiple versions of the same gem just fine:

```
$ gem install simplecov:0.19.0 simplecov:0.22.0
Fetching simplecov-0.19.0.gem
Successfully installed simplecov-0.19.0
Parsing documentation for simplecov-0.19.0
Installing ri documentation for simplecov-0.19.0
Done installing documentation for simplecov after 0 seconds
Fetching simplecov-0.22.0.gem
Successfully installed simplecov-0.22.0
Parsing documentation for simplecov-0.22.0
Installing ri documentation for simplecov-0.22.0
Done installing documentation for simplecov after 0 seconds
2 gems installed
```

But to uninstall both of them, you need to run the equivalent uninstall
command twice:

```
~$ gem uninstall simplecov:0.19.0 simplecov:0.22.0
Successfully uninstalled simplecov-0.22.0
~$ gem uninstall simplecov:0.19.0 simplecov:0.22.0
Gem 'simplecov' is not installed
Successfully uninstalled simplecov-0.19.0
```

This resolves that problem by using the gem's full name (which includes
the version) when tracking which ones have already been uninstalled so
when it gets to the second version listed it doesn't think it was
already uninstalled.

d96101b753
2023-10-18 10:17:58 +00:00
Hiroshi SHIBATA
ac8ece81f2 Tweak the grammar 2023-10-18 14:51:48 +09:00
Hiroshi SHIBATA
46766e922b normalize gem name without .so or .bundle 2023-10-18 14:51:48 +09:00
Hiroshi SHIBATA
3b690b726d reject bundled gems if they are declared in Gemfile 2023-10-18 14:51:48 +09:00
tompng
2a8ac8ead5 [ruby/rdoc] Delay DidYouMean until NotFoundError#message is called
b59ca2f981
2023-10-17 11:07:57 +00:00
Kevin Newton
5523a23469 [ruby/prism] Attach magic comments to the parse result
c7ef25a79a
2023-10-16 15:40:19 -07:00
Mau Magnaguagno
55a0d2c63b [ruby/prism] Avoid unnecessary delete_prefix in LibRubyParser.resolve_type
Only remove const prefix from non-pointer types.

97c9ffeb42
2023-10-16 10:39:44 +00:00
David Rodríguez
77ffa1a7c3 [rubygems/rubygems] Raise an error when top level dependency does not resolve under all locked platforms
25304f3e8d
2023-10-16 13:52:57 +09:00
David Rodríguez
73ba4b76c2 [rubygems/rubygems] Automatically remove invalid platforms before re-resolving
40989271dd
2023-10-16 13:52:56 +09:00
David Rodríguez
b7ad9eda3c [rubygems/rubygems] Tweak platform mismatch resolution errors
20460bc1ee
2023-10-16 13:52:56 +09:00
David Rodríguez
a1c73f1c88 [rubygems/rubygems] Consistent usage of local_platform in Definition
5f28a68d79
2023-10-16 13:52:55 +09:00
David Rodríguez
a05904c8ce [rubygems/rubygems] The lock command should not be affected by frozen setting
The `lock` command is specifically designed to manage the lockfile, so
running it should take precedence over any "frozen" setting.

Besides that, "frozen" is not specifically designed as "lockfile cannot
be updated" but as "installation of gems should be prevented if gemfile
is not in sync with the lockfile".

The lock command does not install any gems and preserves the property of
the lockfile being in sycn with its gemfile, so I think frozen should
not influence it.

The current behavior is quite confusing when frozen is set. On an app
where rubocop can get lockfile updates

```
$ bundle lock --update rubocop
Writing lockfile to /path/to/Gemfile.lock
```

Completely silent, it makes you think that it has written the lockfile,
but still no updates.

In verbose mode, it gives a bit more information, but still confusing
and unexpected, and does not change the lockfile:

```
$ bundle lock --update rubocop --verbose
Running `bundle lock --update "rubocop" --verbose` with bundler 2.4.20
Frozen, using resolution from the lockfile
Writing lockfile to /path/to/Gemfile.lock
```

With this commit, it updates the lockfile as expected.

1d501ae8ea
2023-10-16 13:52:12 +09:00
David Rodríguez
4dbee36f84 [rubygems/rubygems] Use instantiated definition directly
bc233af4d2
2023-10-16 13:52:11 +09:00
Ellen Marie Dash
f37e9f42b9 [rubygems/rubygems] [PathSupport] Simplify logic: If Gem.default_dir is writable, use it.
I couldn't find a cross-platform way to check "can I create this directory?"

So I removed that, and went back to the original simpler logic of
"if the directory is writable, use it."

3aa86a56db
2023-10-16 13:51:09 +09:00
Ellen Marie Dash
724398cce6 [rubygems/rubygems] Remove outdated/incorrect comment.
The function is also significantly simpler than it used to be,
to the point I'm not sure it needs a comment.

29a0551e37
2023-10-16 13:51:08 +09:00
Ellen Marie Dash
3f5da31760 [rubygems/rubygems] Rephrase "Defaulting to user installation" message.
b7c531347e

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2023-10-16 13:51:07 +09:00
David Rodriguez
cbf2e133c1
Re-resolve when lockfile is invalid
Move the check for unmet dependencies in lockfile just in time to be
able to re-resolve if unmet dependencies are found.
2023-10-16 13:49:49 +09:00
Samuel Giddins
83f929316e [rubygems/rubygems] Fix force_ruby_platform: when the lockfile only locks the ruby platform
7c50064c3c
2023-10-15 04:46:32 +00:00
Alexandre ZANNI
7865cebfb7 [ruby/cgi] doc: fix method name
there was probably a copy paste mistake in the example of unescapeURIComponent (copied from unescape)

f8fb627e90
2023-10-14 16:46:14 +00:00
tomoya ishida
177d8ee056 [ruby/irb] Bump version to 1.8.3
(https://github.com/ruby/irb/pull/731)

de79375ac1
2023-10-14 14:42:37 +00:00
tomoya ishida
4e5c505bad [ruby/irb] Restore IRB::InputCompletor for compatibility
(https://github.com/ruby/irb/pull/730)

77265efc5f
2023-10-14 14:12:43 +00:00
Mau Magnaguagno
f6564fdd37 [ruby/prism] Simplify DedentingHeredoc#to_a
Move common ``results << token`` outside case-when.

84d0722ee9
2023-10-13 21:11:07 +00:00
Kevin Newton
e700582d98 [ruby/prism] Bump version to 0.14.0
1731bf4520
2023-10-13 19:45:37 +00:00
Kevin Newton
11e946da2f [ruby/prism] Fix up PR failings
11255f636e
2023-10-13 15:31:30 -04:00
Kevin Newton
37d958eaf4 Remove old unescaping code 2023-10-13 15:31:30 -04:00
Hiroshi SHIBATA
35edc14ee1 Ignore duplicated warning with native extension 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA
c6728caeb7 Fix wrong gem name 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA
fe5329f032 Ignore warning on LoadError when running under Bundler 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA
62eea99a1c Added recovery instructions for RubyGems 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA
fdf0589a95 Surpressing double warnings 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA
b49346ee73 Warn only LoadError without Bundler environment 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA
57c2ae206f Move additional warnings for Gem author under Gem::BUNDLED_GEMS. 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA
ea05ddbeff Move path normalization into Gem from Bundler class 2023-10-13 16:22:09 +09:00