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

1828 Коммитов

Автор SHA1 Сообщение Дата
David Rodríguez 1f77cc3894 [rubygems/rubygems] Fix `set` not being found when running specs on dev rubies
https://github.com/rubygems/rubygems/commit/c5b2960388
2022-09-06 17:11:47 +09:00
David Rodríguez c664264c07 [rubygems/rubygems] Add `syntax_suggest` to exemption list in setup specs
https://github.com/rubygems/rubygems/commit/f9a51e4380
2022-09-06 17:11:47 +09:00
David Rodríguez 6bc6c8d031 [rubygems/rubygems] Remove no longer needed `fiddle` hacks
RubyInstaller has released patch versions backporting their changes to
not load `fiddle` on boot, so all these are no longer necessary.

https://github.com/rubygems/rubygems/commit/05a307deb2
2022-09-05 21:21:15 +09:00
Hiroshi SHIBATA 3eca1e438d Merge 16c3535413 2022-09-05 14:37:12 +09:00
Mike Dalessio 45fe7f7575
[rubygems/rubygems] Feature: `bundle add` supports `--path` option
https://github.com/rubygems/rubygems/commit/32bee01fbe
2022-09-05 11:43:14 +09:00
David Rodríguez f7cf641469
[rubygems/rubygems] Fix resolution hanging on musl platforms
After recent musl support was added, Bundler started hanging in musl
platforms. I identified the issue where valid candidates were being
filtered out because their platform was specified as a string, and thus
`Gem::Platform.match_spec?` which under the hood ends up calling
`Gem::Platform#===` would return `nil`, because it does not support
comparing platforms to strings.

In particular, `Bundler::EndpointSpecification`'s platform coming from
the API was not instantiated as a `Gem::Platform`, hence the issue.

Also, this spec surfaced another issue where a bug corrected in
`Gem::Platform#match_platforms` had not been yet backported to Bundler.
So this commit also backports that to get the spec green across RubyGems
versions.

Finally, the fix in `Bundler::EndpointSpecification` made a realworld
spec start failing. This spec was faking out `rails-4.2.7.1` requirement
on Bundler in the `Gemfile.lock` file to be `>= 1.17, < 3` when the real
requirement is `>= 1.17, < 2`. Due to the bug in
`Bundler::EndpointSpecification`, the real requirement provided by the
compact index API (recorded with VCR) was being ignored, and the
`Gemfile.lock` fake requirement was being used, which made the spec
pass. This is all expected, and to fix the issue I changed the spec to
be really realworld and don't fake any Bundler requirements.

https://github.com/rubygems/rubygems/commit/faf4ef46bc
2022-09-05 11:43:14 +09:00
Jean Boussier bbe5ec7846 rb_int_range_last: properly handle non-exclusive range
[Bug #18994]
2022-09-04 11:16:11 +02:00
git f069bc79f2 * append newline at EOF. [ci skip] 2022-09-02 15:57:18 +09:00
Hiroshi SHIBATA 740d530bb0
Added doc about `test-syntax-suggest` 2022-09-02 15:30:46 +09:00
Hiroshi SHIBATA e7a8e3e91f
Added entries about test-bundler-parallel and BUNDLER_SPECS 2022-09-02 15:25:54 +09:00
Takashi Kokubun 737402e938
Skip a couple of chroot spec faillures
I don't come up with a way to fix it right away. We'd need some
experiments on a pull request.
2022-08-29 09:55:57 -07:00
Benoit Daloze 1315c5aad9 Update to ruby/spec@b8a8240 2022-08-29 18:18:23 +02:00
Benoit Daloze b5358a98e6 Update to ruby/mspec@37151a0 2022-08-29 18:18:20 +02:00
Benoit Daloze 4ee1a68776 Update to ruby/spec@d01709f 2022-08-29 15:36:29 +02:00
shields 8799c91205 [rubygems/rubygems] Add platform :windows as a shortcut for all Windows platforms
https://github.com/rubygems/rubygems/commit/f3c49ad3f7
2022-08-29 00:33:15 +09:00
Aleksandr Varnin 381d8e43ce [rubygems/rubygems] Bundler: make to_lock consistent between Gem::Dependency and Bundler::Dependency
https://github.com/rubygems/rubygems/commit/971d57cf5a
2022-08-28 02:04:14 +09:00
Hiroshi SHIBATA 5e4d1f9908 Skip examples to need installed ruby exe 2022-08-26 12:15:47 +09:00
Hiroshi SHIBATA 8dfc077f70 Added syntax_suggest cli and resolve failing exapmle with it 2022-08-26 12:15:47 +09:00
Hiroshi SHIBATA bd1b1eeb0e ruby-prof is now optional 2022-08-26 12:15:47 +09:00
Hiroshi SHIBATA 0d9f4ea0d4 Import spec examples from ruby/syntax_suggest 2022-08-26 12:15:47 +09:00
Jean Boussier b2d0f78869 Fix private methods reported as protected when called via Symbol#to_proc
Ref: bfa6a8ddc8
Ref: [Bug #18826]
2022-08-25 17:49:50 +02:00
David Rodríguez ad8774f8e5 [rubygems/rubygems] Fix another regression for sorbet
Recently a changed was introduced to update the resolver platforms after
it has been created, in order to remove the "ruby" platform from it if
it's to be removed from the lockfile. However, it did not update the
`@resolving_only_for_ruby` instance variable in that case, so the
resolver was not properly doing the right thing anymore.

To fix this, I tweaked the code to restore not changing resolver
platforms after the resolver has been instantiated.

https://github.com/rubygems/rubygems/commit/8fbc30a1d0
2022-08-25 23:39:02 +09:00
David Rodríguez 0ad9cc1696 [rubygems/rubygems] Backport non-gnu libc on linux platform matching to Bundler
https://github.com/rubygems/rubygems/commit/703373b41f

Co-authored-by: Loic Nageleisen <loic.nageleisen@gmail.com>
2022-08-24 17:59:15 +09:00
Takuya Noguchi 7c784f0a67 [rubygems/rubygems] Bundler: avoid use of "can not" in spec literals
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/73b5cf9bd1
2022-08-23 15:33:34 +09:00
Takuya Noguchi 22a416a3bb [rubygems/rubygems] Bundler: update the link suggested on error with the new one
Also typo is fixed.

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/9c1ea52ddf
2022-08-23 14:28:47 +09:00
Hiroshi SHIBATA f69244cee8 Merge rubygems/bundler HEAD
Pick from 6b3a5a9ab0
2022-08-23 10:45:57 +09:00
David Rodríguez 4790d0accd [rubygems/rubygems] Fix conservative update downgrading top level gems
When `--conservative` is passed, explicit unlocks are set for top level
gems via `@unlock[:gems]`, so that only those particular gems are
allowed to be updated.

When we compute the "base resolve" from the lockfile (the set of gems
whose versions should be kept pinned by the resolver), we always exclude
gems explicitly unlocked through `@unlock[:gems]` from it. This is done
by the `converge_specs` method.

However, the `converge_specs` method is also used for figuring out
additional lower bound requirements from the lockfile. But in this case,
even if gems are explicitly unlock in `@unlock[:gems]`, we still want to
add the additional requirement, so that gems are not downgraded by the
resolver.

So the solution is to move the line filtering out gems in
`@unlock[:gems]` from the `converged_specs` method out of that method,
so that it only applies for computing the "base resolve", but not the
addtional lower bound requirements.

https://github.com/rubygems/rubygems/commit/405119bd7b
2022-08-23 10:45:57 +09:00
David Rodríguez a9509068db [rubygems/rubygems] Make `compact_index_api_missing` server more strict
The compact index should not request any marshaled gemspecs whatsoever.

https://github.com/rubygems/rubygems/commit/6dbd44d0c0
2022-08-23 10:45:57 +09:00
David Rodríguez 560941e711 [rubygems/rubygems] Fix edge case where `bundler/inline` unintentionally skips install
If the application has the `no_install` setting set for `bundle
package`, then `bundler/inline` would silently skip installing any gems.

https://github.com/rubygems/rubygems/commit/7864f49b27
2022-08-21 17:54:11 +09:00
David Rodríguez b87ddd7538 [rubygems/rubygems] Fix `bundle platform` crash when there's a lockfile with no Ruby locked
https://github.com/rubygems/rubygems/commit/49fc54e87d
2022-08-21 17:53:40 +09:00
Benoit Daloze 209631a45f Consider resolved-through-zsuper methods equal for compatibility
* Fixes https://bugs.ruby-lang.org/issues/18751
2022-08-20 13:44:00 +02:00
Nobuyoshi Nakada 1ef49de834 [Bug #18955] format single character for `%c` 2022-08-20 03:57:13 +09:00
Jean Boussier fe61cad749 Implement SizedQueue#push(timeout: sec)
[Feature #18944]

If both `non_block=true` and `timeout:` are supplied, ArgumentError
is raised.
2022-08-18 10:07:37 +02:00
Nobuyoshi Nakada b7577b4d9e
The tzdata 2022c removed Amsterdam Mean Time 2022-08-17 00:45:27 +09:00
David Rodríguez e77c8397c2 [rubygems/rubygems] Fix Ruby platform incorrectly removed on `bundle update`
https://github.com/rubygems/rubygems/commit/0d321c9e3a
2022-08-15 17:42:16 +09:00
Jeremy Evans cfb9624460
Fix Array#[] with ArithmeticSequence with negative steps (#5739)
* Fix Array#[] with ArithmeticSequence with negative steps

Previously, Array#[] when called with an ArithmeticSequence
with a negative step did not handle all cases correctly,
especially cases involving infinite ranges, inverted ranges,
and/or exclusive ends.

Fixes [Bug #18247]

* Add Array#slice tests for ArithmeticSequence with negative step to test_array

Add tests of rb_arithmetic_sequence_beg_len_step C-API function.

* Fix ext/-test-/arith_seq/beg_len_step/depend

* Rename local variables

* Fix a variable name

Co-authored-by: Kenta Murata <3959+mrkn@users.noreply.github.com>
2022-08-11 19:16:49 +09:00
Jeremy Evans bfa6a8ddc8
Only allow procs created by Symbol#to_proc to call public methods
Fixes [Bug #18826]

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-08-10 13:02:19 -07:00
Nobuyoshi Nakada 43239b23b4
[Bug #18946] New tests for fixed Time/DateTime conversions 2022-08-08 23:48:13 +09:00
Nobuyoshi Nakada e0dfa5967e
[Bug #18946] Use Gregorian dates to test 2022-08-08 23:48:09 +09:00
Nobuyoshi Nakada 03f86565a6
Silent backtrace from cve_2019_8325_spec.rb
Since the change at f310ac1cb2 to show
the backtraces by default, this test started to show the backtraces.
As the backtraces are not the subject of this test, silence them by
using Gem::SilentUI.
2022-08-07 17:57:52 +09:00
David Rodríguez 466a760e18 [rubygems/rubygems] Fix yanked gems being unintentionally update when other gems are unlocked
This is a regression from a change intended to raise errors when user
puts a gem under an incorrect source in the Gemfile by mistake. To fix
the issue, we revert the change that caused it and implement it in a
different way that restores the resolver independency from real
specifications. Now it deals only with names and versions and does not
try to materialize anything into real specifications before resolving.

https://github.com/rubygems/rubygems/commit/d2bf1b86eb
2022-08-06 15:41:46 +09:00
Alan Wu c433d36b5b Test that File.read defaults to text mode
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-08-05 14:34:08 -04:00
David Rodríguez 5a9db23734 [rubygems/rubygems] Automatically remove "ruby" from lockfile if incomplete
https://github.com/rubygems/rubygems/commit/69d0b4e10b
2022-08-05 16:36:42 +09:00
David Rodríguez 851b3aa7dd [rubygems/rubygems] Fix `bundle outdated --strict`
It should be an alias of `--filter-strict`.

`--update-strict` is essentially a dummy option with no special behavior
associated and should be deprecated.

https://github.com/rubygems/rubygems/commit/ec1e5d83c8
2022-08-03 16:33:53 +09:00
David Rodríguez 35c65e7ba6 [rubygems/rubygems] Fix conservative updates regardless of `--strict`
https://github.com/rubygems/rubygems/commit/c9a1d69a8d
2022-08-03 16:33:52 +09:00
Hiroshi SHIBATA 71794a75db Merge rubygems/bundler HEAD
Pick from 8331e63263
2022-08-03 13:14:10 +09:00
Jean Boussier e3aabe93aa Implement Queue#pop(timeout: sec)
[Feature #18774]

As well as `SizedQueue#pop(timeout: sec)`

If both `non_block=true` and `timeout:` are supplied, ArgumentError
is raised.
2022-08-02 11:04:28 +02:00
David Rodríguez 3e4fedca4e [rubygems/rubygems] Preserve the previous behavior of raising an error when in frozen mode
https://github.com/rubygems/rubygems/commit/6e35a6edfe
2022-08-02 16:10:19 +09:00
David Rodríguez bc90090672 [rubygems/rubygems] Check for errors in error stream
https://github.com/rubygems/rubygems/commit/7b0f7804f2
2022-08-02 16:10:18 +09:00
David Rodríguez f4f681463f [rubygems/rubygems] Don't discard candidates matching ruby metadata
Do dependency filtering and materialization in one step. Before,
dependency filtering would not consider ruby metadata so it would
discard variants that end up not being materializable in the end.

https://github.com/rubygems/rubygems/commit/0c0d40d417

Co-authored-by: Ian Ker-Seymer <ian.kerseymer@shopify.com>
2022-08-02 16:10:18 +09:00