summaryrefslogtreecommitdiff
path: root/lib/rubygems/resolver
AgeCommit message (Collapse)Author
2025-05-21[rubygems/rubygems] Copy prerelease attribute to dependency resolver setsNathan Ladd
https://.com/rubygems/rubygems/commit/5956e7f8e5
2025-04-01[rubygems/rubygems] Let compact index response parser consistently return a ↵David Rodríguez
mutable dependencies array That restores support for compact index dummy implementations that only lists versions, without checksums or dependencies. This format is undocumented, so we may want to get rid of it in the future. However, some of our tests rely on it, and some implementations did use it (gems.mutant.dev at least). And the way the code was written suggest that support was intentional. So for now, we should restore it. https://.com/rubygems/rubygems/commit/0427d8c983
2024-12-05[rubygems/rubygems] Stop storing executable names in ivarsSamuel Giddins
Removes usage of these classes as ACE gadgets See https://nastystereo.com/security/ruby-3.4-deserialization.html Signed-off-by: Samuel Giddins <[email protected]> https://.com/rubygems/rubygems/commit/89ad04db86
2024-11-26[rubygems/rubygems] More aggressive `Performance/FlatMap` cop configurationDavid Rodríguez
https://.com/rubygems/rubygems/commit/d8d68cc00e
2024-10-02[rubygems/rubygems] Fix error in one source when fetching dependency APIs ↵David Rodríguez
clearing results from all sources https://.com/rubygems/rubygems/commit/0549ddbcc5
2024-09-11[rubygems/rubygems] Fix `bundle exec rake install` failing when local gem ↵David Rodríguez
has extensions and `gemspec` DSL is being used In a `bundle exec` context, the local specification will actually be part of the known specifications, so RubyGems will assume it has already been installed, which is not actually true. This will cause `RequestSet` to rebuild extensions for a gem that's not actually installed, causing errors. The fix is to make sure detection of installed activation requests considers not only that there's a known spec with the same full name as the one being installed, but also that this spec is installed in the same gem_home were pretend to install the new gem. https://.com/rubygems/rubygems/commit/a8ef1286a6
2024-09-06[rubygems/rubygems] Fix `gem install does-not-exist` being super slowDavid Rodríguez
Every time a gem is not found in the Compact Index API, RubyGems will fallback to the full index, which is very slow. This is unnecessary because both indexes should be providing the same gems, so if a gem can't be found in the Compact Index API, it won't be found in the full index. We _do_ want a fallback to the full index, whenever the Compact Index API is not implemented. To detect that, we check that the API responds to the "/versions" endpoint, just like Bundler does. Before: ``` $ time gem install fooasdsfafs ERROR: Could not find a valid gem 'fooasdsfafs' (>= 0) in any repository gem 20,77s user 0,59s system 96% cpu 22,017 total ``` After: ``` $ time gem install fooasdsfafs ERROR: Could not find a valid gem 'fooasdsfafs' (>= 0) in any repository gem 5,02s user 0,09s system 91% cpu 5,568 total ``` https://.com/rubygems/rubygems/commit/c0d6b9eea7
2024-03-25[rubygems/rubygems] Fix resolver bug where ActivationRequest objects were ↵David Rodriguez
not properly compared They were delegating their `#hash` value to a class not overriding that method, and so were returning inconsistent results. https://.com/rubygems/rubygems/commit/723e4ee0fc
2024-01-30[rubygems/rubygems] Rename molinillo wrapper file to vendored_molinillo.rbHiroshi SHIBATA
https://.com/rubygems/rubygems/commit/d7c15f6fd7
2024-01-30Move molinillo under the vendor directoryHiroshi SHIBATA
2024-01-29Vendor uri gem in RubyGemsDavid Rodríguez
2023-12-15[rubygems/rubygems] Refactor vendoring to allow validating vendoring is ↵Samuel Giddins
reproducible Helps ensure that unsuspecting diffs to the vendored code arent accidentally introduced https://.com/rubygems/rubygems/commit/7c425d49dd
2023-10-08[rubygems/rubygems] Reduce allocations when parsing compact indexSamuel Giddins
This still allocates a ton (a string for each line, plus a bunch of splits into arrays), but it helps a bit when Bundler has to go through dependency resolution. ``` ==> memprof.after.txt <== Total allocated: 194.14 MB (2317172 objects) Total retained: 60.81 MB (593164 objects) ==> memprof.before.txt <== Total allocated: 211.97 MB (2404890 objects) Total retained: 62.85 MB (640342 objects) ``` https://.com/rubygems/rubygems/commit/c68b41b0e5
2023-10-03[rubygems/rubygems] Fix invalid links in documentation. - wrap ENV variables ↵Josef Šimánek
in <code> - fix rubygems.org link - fix zenspider.com link https://.com/rubygems/rubygems/commit/9eaac94a63
2023-07-24[rubygems/rubygems] Avoid unnecessary network requests for local gemDavid Rodríguez
https://.com/rubygems/rubygems/commit/ec5f04f7b1
2023-06-15[rubygems/rubygems] auto-correct Style/YodaConditionHiroshi SHIBATA
https://.com/rubygems/rubygems/commit/6d9e8025dc
2023-04-07[rubygems/rubygems] util/rubocop -A --only Style/FormatStringHiroshi SHIBATA
https://.com/rubygems/rubygems/commit/132a56569d
2023-04-06[rubygems/rubygems] util/rubocop -A --only Style/LineEndConcatenationHiroshi SHIBATA
https://.com/rubygems/rubygems/commit/67ece7b8b6
2023-03-23util/rubocop -A --only Layout/EmptyLineAfterMagicCommentHiroshi SHIBATA
Notes: Merged: https://.com/ruby/ruby/pull/7582
2023-03-23util/rubocop -A --only Style/FrozenStringLiteralCommentHiroshi SHIBATA
Notes: Merged: https://.com/ruby/ruby/pull/7582
2023-03-23[rubygems/rubygems] util/rubocop -A --only Style/NextHiroshi SHIBATA
https://.com/rubygems/rubygems/commit/e5868e92f7 Notes: Merged: https://.com/ruby/ruby/pull/7582
2023-03-17util/rubocop -A --only Style/SymbolProcHiroshi SHIBATA
2023-03-17[rubygems/rubygems] util/rubocop -A --only Style/RedundantBeginHiroshi SHIBATA
https://.com/rubygems/rubygems/commit/b595d3cf0f
2023-03-17[rubygems/rubygems] util/rubocop -A --only Style/SelfAssignmentHiroshi SHIBATA
https://.com/rubygems/rubygems/commit/7c1168c623
2023-03-17[rubygems/rubygems] util/rubocop -A --only Style/RedundantInterpolationHiroshi SHIBATA
https://.com/rubygems/rubygems/commit/add44e56eb
2023-03-17[rubygems/rubygems] util/rubocop -A --only Style/ClassCheckHiroshi SHIBATA
https://.com/rubygems/rubygems/commit/1c3356a872
2023-03-17[rubygems/rubygems] util/rubocop -A --only Style/ParallelAssignmentHiroshi SHIBATA
https://.com/rubygems/rubygems/commit/5c88c77873
2023-03-17[rubygems/rubygems] util/rubocop -A --only Layout/MultilineMethodCallBraceLayoutHiroshi SHIBATA
https://.com/rubygems/rubygems/commit/acb0548bf6
2023-01-10Merge RubyGems and Bundler masterHiroshi SHIBATA
from https://.com/rubygems/rubygems/commit/0635c1423db5d7c461d53bf0c3329bca75de7609 Notes: Merged: https://.com/ruby/ruby/pull/7094
2022-12-11[rubygems/rubygems] Bump Molinillo and tsortDavid Rodríguez
And configure tsort to be vendored as a dependency of Molinillo. https://.com/rubygems/rubygems/commit/8ec749f891
2022-12-08[rubygems/rubygems] Avoid deprecated Gem::Platform.match in ↵Benoit Daloze
Gem::Resolver::InstallerSet https://.com/rubygems/rubygems/commit/05cb5410cb
2022-08-09Merge rubygems/bundler HEAD.Hiroshi SHIBATA
Pick from https://.com/rubygems/rubygems/commit/dfbb5a38114640e0d8d616861607f3de73ee0199 Notes: Merged: https://.com/ruby/ruby/pull/6224
2022-08-03[rubygems/rubygems] fix platform matching for index specsIlya Dyakonov
https://.com/rubygems/rubygems/commit/f087f1b590
2022-07-22RubyGems: Enable Style/StringLiterals copTakuya Noguchi
Signed-off-by: Takuya Noguchi <[email protected]>
2022-01-06[rubygems/rubygems] Fix `gem install <non-existent-gem> --force` crashDavid Rodríguez
Before: ``` $ gem install sfdsfdsfsdide --force ERROR: While executing gem ... (NoMethodError) undefined method `spec' for nil:NilClass @always_install << newest.spec ^^^^^ ``` After: ``` $ gem install sfdsfdsfsdide --force ERROR: Could not find a valid gem 'sfdsfdsfsdide' (>= 0) in any repository ``` https://.com/rubygems/rubygems/commit/4e2bfd1101
2021-10-29[rubygems/rubygems] Vendor tsort into rubygemsFrederik Dudzik
So that it loads a consistent version of the library and `rubygems` is never affected by gem activation conflicts related to `tsort`. Getting CI green required updating one `bundler` spec, because `tsort` is no longer loaded by `bundle clean` until after `BUNDLE_PATH` has been changed, so to ensure it is found, it needs to be installed under `BUNDLE_PATH` as well (which will be different from the global system path on Bundler 3, meaning installing `tsort` to the global system path is not enough there). This spec workaround can be removed once we also vendor `tsort` inside `bundler`. https://.com/rubygems/rubygems/commit/d326880999
2021-09-22[rubygems/rubygems] Avoid loading URI unnecessarily when activating gemsDavid Rodríguez
https://.com/rubygems/rubygems/commit/ef5f30cba7
2021-08-31[rubygems/rubygems] Refactor Ruby platform priority condition to its own methodDaniel Niknam
The `Gem::Platform::RUBY ? -1 : 1` has been used multiple times in different places and could be refactored to a method (DRY). https://.com/rubygems/rubygems/commit/9d43ca8f0c Notes: Merged: https://.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Pick the last founded gems when fetching metadataDaniel Niknam
https://.com/rubygems/rubygems/commit/e3d150d822 Co-authored-by: David Rodríguez <[email protected]> Notes: Merged: https://.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Prefer `require_relative` to `require` for internal requiresDavid Rodríguez
https://.com/rubygems/rubygems/commit/c74fc58695 Notes: Merged: https://.com/ruby/ruby/pull/4789
2021-05-11Sync bundler & rubygemsDavid Rodríguez
Notes: Merged: https://.com/ruby/ruby/pull/4367
2021-03-08Sync latest development version of bundler & rubygemsDavid Rodríguez
Notes: Merged: https://.com/ruby/ruby/pull/4143
2021-01-23[rubygems/rubygems] Replace "iff" with "whether" and "if and only if"Gannon McGibbon
iff means if and only if, but readers without that knowledge might assume this to be a spelling mistake. To me, this seems like exclusionary language that is unnecessary. Simply using "if and only if" or "whether" should suffice. https://.com/rubygems/rubygems/commit/88318ebc6d
2021-01-04Track RubyGems master(3.3.0.dev) branch at ↵Hiroshi SHIBATA
55634a8af18a52df86c4275d70fa1179118bcc20 Notes: Merged: https://.com/ruby/ruby/pull/4021
2020-12-23Merge RubyGems 3.2.3 and Bundler 2.2.3Hiroshi SHIBATA
Notes: Merged: https://.com/ruby/ruby/pull/3982
2020-12-15Prepare to release rubygems-3.2.1 and bundler-2.2.1Hiroshi SHIBATA
Notes: Merged: https://.com/ruby/ruby/pull/3901
2020-12-08Merge prepare version of RubyGems 3.2.0Hiroshi SHIBATA
Notes: Merged: https://.com/ruby/ruby/pull/3864
2020-09-28[rubygems/rubygems] Avoid duplicated generation of APISpecification objectsYusuke Endoh
As far as I could see, `Gem::Resolver::APISpecification` objects are supposed to be immutable. If my guessing is correct, then we can cache and reuse its instances for performance. At least, `rake` passes on my machine. Before this change: ``` $ time ruby -I lib bin/gem install --no-doc aws-sdk Successfully installed aws-sdk-3.0.1 1 gem installed real 0m37.104s user 0m36.952s sys 0m0.333s ``` After this change: ``` $ time ruby -I lib bin/gem install --no-doc aws-sdk Successfully installed aws-sdk-3.0.1 1 gem installed real 0m23.905s user 0m23.740s sys 0m0.365s ``` https://.com/rubygems/rubygems/commit/7e8fbba85c Notes: Merged: https://.com/ruby/ruby/pull/3599
2020-09-23Revert "Manually merged from https://.com/rubygems/rubygems/pull/2636"Hiroshi SHIBATA
31a6eaabc165d8a222e176f2c809d90622d88ec2 is obsoleted with https://.com/rubygems/rubygems/pull/3820
2020-09-23Manually merged from https://.com/rubygems/rubygems/pull/2636Hiroshi SHIBATA
Enable Style/EmptyLinesAroundClassBody rubocop cop.