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

2012 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 348412c7fa [rubygems/rubygems] Use indented heredoc
https://github.com/rubygems/rubygems/commit/085d2776d8
2023-03-22 21:21:08 +00:00
Hiroshi SHIBATA 8d1109c03b
Added assertion values for Amazon Linux 2023 2023-03-22 16:10:06 +09:00
David Rodríguez c65d7b4bea When running `bundle lock --update <name>`, checkout locked revision of unrelated git sources directly
Since Bundler 2.4, we will try to checkout any branch specified in the
Gemfile, while until Bundler 2.3 we would directly checkout the locked
revision.

This should not make any difference in most situations, but in some edge
cases, like if the branch specified in the `Gemfile` has been renamed,
but the locked revision still exist, it causes an error now while before
it would update the lockfile without issues.

I debated which behavior was best, since I was not sure. But my
conclusion is that if the situation does not require expiring the
lockfile source in favor of the Gemfile source, we should use the locked
revision directly and proceed happily. So I restored Bundler 2.3
behavior.

I think this is consistent with how yanked gems are handled, for example.

Of course, if explicitly updating the git source itself, or all gems, we
will still get any errors like missing branches related to the git source.
2023-03-17 18:50:55 +09:00
David Rodríguez 0b9e51c429 Don´t consider platform specific candidates when `force_ruby_platform` set
This was working fine for direct dependencies using
`force_ruby_platform` explicitly through Gemfile, but not for indirect
dependencies. In general, indirect dependencies do not have this
property set, but in truffleruby this is different and the default value
is to have it set.
2023-03-17 18:50:55 +09:00
David Rodríguez 12f0be14e2 Don't ignore pre-releases when there's only one candidate
This should be a very rare edge case, however, it does happen when using
a .dev version of Bundler because in that case, that's the only version
that the resolver considers, and it should not be ignored.

We could've special cased this specifically for Bundler, but I think it
does make sense for every gem.
2023-03-17 18:50:55 +09:00
David Rodríguez ddc4fd5644 Normalize git sources
Just like gem sources, a "style-only" change, like adding a trailing
slash, should not expire them.
2023-03-17 18:50:55 +09:00
David Rodríguez 8371c0eac4 [rubygems/rubygems] Fix incorrect error message when multiple platforms are locked
https://github.com/rubygems/rubygems/commit/24d2bf9cb2
2023-03-17 18:50:55 +09:00
David Rodríguez d5121992dc [rubygems/rubygems] Remove unnecessary `specific_local_platform` test helper
https://github.com/rubygems/rubygems/commit/86b574824d
2023-03-17 18:50:55 +09:00
David Rodríguez 2d8b55fcd2 [rubygems/rubygems] Simplify `lockfile_platforms` helper
To make it easier to change the default platforms that get locked later.

https://github.com/rubygems/rubygems/commit/255c4012ec
2023-03-17 18:50:55 +09:00
David Rodríguez 9492efbe71 [rubygems/rubygems] Remove unnecessary `local` helper
https://github.com/rubygems/rubygems/commit/27ed6870ce
2023-03-17 18:50:55 +09:00
David Rodríguez 8a8ade7e5e [rubygems/rubygems] Use more common linux platform for specs
https://github.com/rubygems/rubygems/commit/3841a58095
2023-03-17 18:50:55 +09:00
David Rodríguez f22765f535 [rubygems/rubygems] Use splatted args to `lockfile_platforms_for`
Nicer :)

https://github.com/rubygems/rubygems/commit/c0ab2893c3
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA f3b129241c [rubygems/rubygems] Applied Layout/SpaceAroundOperators cop
https://github.com/rubygems/rubygems/commit/3139587be9
2023-03-16 01:59:12 +00:00
Hiroshi SHIBATA 56b38fdd69 [rubygems/rubygems] Use OpenSSL::Digest instead of digest stdlib
https://github.com/rubygems/rubygems/commit/69aa007679
2023-03-15 11:21:22 +00:00
Jean Boussier ca437aeb39 rb_ary_sum: don't enter fast path if initial isn't a native numeric type.
[Bug #19530]

If the initial value isn't one of the special cased types, we directly
jump to the slow path.
2023-03-15 09:12:59 +00:00
Ian Ker-Seymer dd47ce10db [rubygems/rubygems] Use `RbSys::ExtensionTask` when creating new rust gems
https://github.com/rubygems/rubygems/commit/125f9fece9
2023-03-10 11:50:06 +00:00
Samuel Williams 86d38b4520
Accept `sleep(nil)` as sleep forever. (#7484) 2023-03-10 16:40:05 +13:00
Nobuyoshi Nakada dc1e6573f2
Fix commit miss 2023-03-09 00:49:11 +09:00
Nobuyoshi Nakada 611a64250a
Disable color mode of test-syntax-suggest when on dumb terminal
The compliation-mode of Emacs sets TERM to "dumb" and does not support
coloring.
2023-03-08 22:57:06 +09:00
Julie Haehn c5296d9396 [rubygems/rubygems] Respect --no-install option for git: sources
Currently, the --no-install option to `bundle package` is totally
ignored for git sources. This can have very strange effects if you have:

- a git-sourced gem,
- with native extensions,
- whose extconf.rb script depends on another gem,
- which is installed from Rubygems in the gemfile.

In that circumstance, `bundle package --no-install --all` will download
the Rubygems dependencies to `vendor/cache` but NOT install them. It
will also check out the git gems to `vendor/cache` (good), and attempt
to build their native extensions (bad!).

The native extension build will fail because the extconf.rb script crashes,
since the dependency it needs is missing.

I implemented a fix for this in `source/git.rb`, since this is analogous
to what's happening in `source/rubygems.rb`. I do admit though the whole
thing is a little strange though - an "install" method that.... proceeds
to look at a global flag to not install anything.

Add test to confirm cache respects the --no-install flag

https://github.com/rubygems/rubygems/commit/5a77d1c397

Co-authored-by: KJ Tsanaktsidis <kj@kjtsanaktsidis.id.au>
2023-03-07 22:36:36 +00:00
David Rodríguez 72591eb73f [rubygems/rubygems] Better suggestion when `bundler/setup` fails due to missing gems
If the original `BUNDLE_GEMFILE` is different from the default, then the
suggestion wouldn't work as is.

Before:

```
$ util/rubocop
Could not find rubocop-1.30.1 in locally installed gems
Run `bundle install` to install missing gems.

$  rubygems git:(better-cmd-suggestion) ✗ bundle install
Could not locate Gemfile
```

After:

```
$ util/rubocop
Could not find rubocop-1.30.1 in locally installed gems
Run `bundle install --gemfile /path/to/rubygems/bundler/tool/bundler/lint_gems.rb` to install missing gems.

$ bundle install --gemfile /path/to/rubygems/bundler/tool/bundler/lint_gems.rb
Fetching gem metadata from https://rubygems.org/.........
Using ast 2.4.2
Using bundler 2.4.7
Using parser 3.1.2.0
Using rainbow 3.1.1
Using parallel 1.22.1
Using regexp_parser 2.5.0
Using rubocop-ast 1.18.0
Using rexml 3.2.5
Using ruby-progressbar 1.11.0
Using unicode-display_width 2.1.0
Fetching rubocop 1.30.1
Installing rubocop 1.30.1
Using rubocop-performance 1.14.2
Bundle complete! 2 Gemfile dependencies, 12 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

$ util/rubocop
Inspecting 345 files
.........................................................................................................................................................................................................................................................................................................................................................

345 files inspected, no offenses detected
```

https://github.com/rubygems/rubygems/commit/bf1320d805
2023-03-07 16:51:36 +09:00
Takashi Kokubun 23ec248e48 s/mjit/rjit/ 2023-03-06 23:44:01 -08:00
Takashi Kokubun 2e875549a9 s/MJIT/RJIT/ 2023-03-06 23:44:01 -08:00
johnnyshields 79ede4ae99 [rubygems/rubygems] Alias CurrentRuby#mswin?, mswin64?, mingw?, x64_mingw? to #windows?. (This is done instead of logging a deprecation warning.)
https://github.com/rubygems/rubygems/commit/b9fcc7c0ab
2023-03-03 09:50:29 +00:00
Tony Hsu 5f3c7ac196 [rubygems/rubygems] Replace lockfile with `.locked`
https://github.com/rubygems/rubygems/commit/203f3e3802
2023-03-02 14:43:27 +00:00
Ellen Marie Dash d2d521b274 [rubygems/rubygems] Regenerate lockfile if spec list is invalid/empty.
https://github.com/rubygems/rubygems/commit/d2c56315e2
2023-03-02 00:50:58 +00:00
Daniel Colson 62b3bcba5e [rubygems/rubygems] Auto-heal on corrupted lockfile with missing deps
Following up on https://github.com/rubygems/rubygems/pull/6355, which
turned a crash into a nicer error message, this commit auto-heals the
corrupt lockfile instead.

In this particular case (a corrupt Gemfile.lock with missing
dependencies) the LazySpecification will not have accurate dependency
information, we have to materialize the SpecSet to determine there are
missing dependencies. We've already got a way to handle this, via
`SpecSet#incomplete_specs`, but it wasn't quite working for this case
because we'd get to `@incomplete_specs += lookup[name]` and
`lookup[name]` would be empty for the dependency.

With this commit we catch it a bit earlier, marking the parent spec
containing the missing dependency as incomplete.

https://github.com/rubygems/rubygems/commit/486ecb8f20
2023-03-01 02:50:40 +00:00
Takashi Kokubun 283c71eeff Skip a spec failing on master
https://github.com/ruby/ruby/actions/runs/4286361460/jobs/7466545010
http://ci.rvm.jp/results/trunk_gcc9@ruby-sp2-docker/4462424
http://ci.rvm.jp/results/trunk_clang_13@ruby-sp2-docker/4462422
2023-02-27 12:53:04 -08:00
Benoit Daloze 18b4def471 Update to ruby/spec@e7dc804 2023-02-27 21:02:44 +01:00
Benoit Daloze de60139053 Update to ruby/mspec@dc2eb26 2023-02-27 21:02:42 +01:00
Samuel Williams f94e83faa0
Assigning `nil` to fiber storage deletes the association. (#7378)
Also avoid allocations when looking up `Fiber#storage` if not needed.
2023-02-25 19:27:11 +13:00
Mercedes Bernard 9406245dbc [rubygems/rubygems] lint fix again
https://github.com/rubygems/rubygems/commit/118d28ad27
2023-02-23 08:50:06 +00:00
Mercedes Bernard 3d766122c8 [rubygems/rubygems] lint fix
https://github.com/rubygems/rubygems/commit/de3b69f1a7
2023-02-23 08:50:05 +00:00
Mercedes Bernard 10a393c25d [rubygems/rubygems] add safe_load_marshal for gem::version and gem::spec
https://github.com/rubygems/rubygems/commit/2ea2ead1b3
2023-02-23 08:50:05 +00:00
Mercedes Bernard e965133f56 [rubygems/rubygems] test Bundler::Fetcher that error raised when attempting load unexpected class
https://github.com/rubygems/rubygems/commit/795e796a9e
2023-02-23 08:50:04 +00:00
Mercedes Bernard 68995c21be [rubygems/rubygems] test rubygems_integration that error raised when attempting load unexpected class
https://github.com/rubygems/rubygems/commit/9798718b3b
2023-02-23 08:50:04 +00:00
Mercedes Bernard ffc202738b [rubygems/rubygems] add test for private load_marshal method
https://github.com/rubygems/rubygems/commit/3a772125b8
2023-02-23 08:50:03 +00:00
Mercedes Bernard 583137fe56 [rubygems/rubygems] make Bundler.load_marshal private
https://github.com/rubygems/rubygems/commit/4909d071d2
2023-02-23 08:50:03 +00:00
Nobuyoshi Nakada a26a0af074
Use `BigDecimal::VERSION` instead of `RUBY_VERSION` 2023-02-22 00:39:56 +09:00
Jean Boussier d2520b7b76 Marshal.load: restore instance variables on Regexp
[Bug #19439]

The instance variables were restore on the Regexp source,
not the regexp itself.

Unfortunately we have a bit of a chicken and egg problem.

The source holds the encoding, and the encoding need to be set on
the source to be able to instantiate the Regexp.

So the instance variables have to be read on the `source`.
To correct this we transfert the instance variables after
instantiating the Regexp.

The only way to avoid this would be to read the instance variable
twice and rewind.
2023-02-21 13:57:04 +01:00
Hiroshi SHIBATA 38fa8eb4cb Merge rubygems/bundler master
Pick from e9304aed7e
2023-02-21 19:28:12 +09:00
David Rodríguez a47e1328e6 [rubygems/rubygems] Give a better message when Gemfile branch does not exist
https://github.com/rubygems/rubygems/commit/cb4fc41cbc
2023-02-21 19:28:12 +09:00
David Rodríguez b5eb9ebd5d [rubygems/rubygems] Fix crash in pub grub involving empty ranges
https://github.com/rubygems/rubygems/commit/0f168516f7
2023-02-21 19:28:12 +09:00
John Hawthorn 4064e3e776 [rubygems/rubygems] Update pub_grub
* Replaces the wording of "is forbidden" with "cannot be used"
* Fixes the method signature of VersionRange::Empty#eql?

https://github.com/rubygems/rubygems/commit/8c6b3f130b

Co-authored-by: Daniel Colson <danieljamescolson@gmail.com>
2023-02-21 19:28:12 +09:00
David Rodríguez 8038991583 [rubygems/rubygems] Sync with pub_grub main branch
We became a bit out of sync lately.

https://github.com/rubygems/rubygems/commit/6161a2610a
2023-02-21 19:28:12 +09:00
David Rodríguez e7bf85961d [rubygems/rubygems] Restore better error message when locked ref does not exist
https://github.com/rubygems/rubygems/commit/c8e024359f
2023-02-21 19:28:12 +09:00
Yusuke Endoh 0e830e6373 Update some ruby specs for the new message format of NoMethodError 2023-02-20 10:33:06 +09:00
Takashi Kokubun 0d8ef62fc2 BigDecimal changed #remainder's spec
This test is no longer passing:
```
  1)
  BigDecimal#remainder returns NaN if Infinity is involved FAILED
  Expected Infinity.nan?
  to be truthy but was false
  /home/runner/work/ruby/ruby/src/spec/ruby/library/bigdecimal/remainder_spec.rb:58:in `block (2 levels) in <top (required)>'
  /home/runner/work/ruby/ruby/src/spec/ruby/library/bigdecimal/remainder_spec.rb:4:in `<top (required)>'
```

https://github.com/ruby/bigdecimal/pull/243
2023-02-17 10:53:08 -08:00
Jean Boussier 7ddcee5928 Marshal.load: also freeze extended objects
[Bug #19427]

The `proc` wouldn't be called either, that fixes both.
2023-02-13 17:08:21 +01:00
Takashi Kokubun 6517d1a188
[DOC] Move old ChangeLog files to doc/ChangeLog (#7293) 2023-02-10 16:57:56 -08:00