summaryrefslogtreecommitdiff
path: root/spec/bundler/install
AgeCommit message (Collapse)Author
2024-11-08[rubygems/rubygems] Fix typoDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f68a2c30bb
2024-11-08[rubygems/rubygems] Simplify tests that deal with lockfile using only "ruby" ↵David Rodríguez
platform Using an old bundler version was necessary at the beginning because we checked the version of Bundler being run in order to enable the new behavior. But we removed that a long time ago and now we only look at whether the lockfile only includes "ruby" as a platform or not. https://github.com/rubygems/rubygems/commit/8fc3d38ff3
2024-11-08[rubygems/rubygems] Make sure platforms in spec lockfile are properly sortedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/99b4ac4548
2024-11-06[rubygems/rubygems] This is not about the lockfile anymoreDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f2e0a72291
2024-11-06[rubygems/rubygems] Add missing spec for materializing lockfiles with only ↵David Rodríguez
"ruby" platform https://github.com/rubygems/rubygems/commit/4168a7f488
2024-11-06[rubygems/rubygems] Fix some JRuby warnings when using `bundler/setup` with ↵David Rodríguez
Ruby's -w flag When using the `bundler/setup` entrypoint, Bundler prints the following warnings in JRuby in `-w` is passed to Ruby. ``` /path/to/bundler/shared_helpers.rb:10: warning: constant Bundler::WINDOWS is deprecated /path/to/bundler/shared_helpers.rb:11: warning: constant Bundler::FREEBSD is deprecated /path/to/bundler/lib/bundler/shared_helpers.rb:12: warning: constant Bundler::NULL is deprecated ``` This does not happen in CRuby. This seems like a JRuby bug but we can skip it by autoloading the constants. https://github.com/rubygems/rubygems/commit/761ca29fa2
2024-10-23[rubygems/rubygems] Improve Bundler errors when trying to install to a ↵David Rodríguez
protected folder in macOS ### Before ``` $ GEM_HOME=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/ bundle Fetching gem metadata from https://rubygems.org/. Source rubygems repository https://rubygems.org/ or installed locally is ignoring #<Bundler::StubSpecification name=sqlite3 version=1.3.13 platform=ruby> because it is missing extensions Source rubygems repository https://rubygems.org/ or installed locally is ignoring #<Bundler::StubSpecification name=nokogiri version=1.13.8 platform=ruby> because it is missing extensions Source rubygems repository https://rubygems.org/ or installed locally is ignoring #<Bundler::StubSpecification name=libxml-ruby version=3.2.1 platform=ruby> because it is missing extensions Resolving dependencies... Fetching ruby2_keywords 0.0.5 Retrying download gem from https://rubygems.org/ due to error (2/4): Bundler::GenericSystemCallError There was an error accessing `/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem`. The underlying system error is Errno::EPERM: Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem Retrying download gem from https://rubygems.org/ due to error (3/4): Bundler::GenericSystemCallError There was an error accessing `/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem`. The underlying system error is Errno::EPERM: Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem Retrying download gem from https://rubygems.org/ due to error (4/4): Bundler::GenericSystemCallError There was an error accessing `/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem`. The underlying system error is Errno::EPERM: Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem Bundler::GenericSystemCallError: There was an error accessing `/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem`. The underlying system error is Errno::EPERM: Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/shared_helpers.rb:119:in `rescue in filesystem_access' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/shared_helpers.rb:104:in `filesystem_access' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/rubygems_integration.rb:431:in `block in download_gem' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/retry.rb:40:in `run' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/retry.rb:30:in `attempt' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/rubygems_integration.rb:423:in `download_gem' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/source/rubygems.rb:479:in `download_gem' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/source/rubygems.rb:436:in `fetch_gem' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/source/rubygems.rb:420:in `fetch_gem_if_possible' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/source/rubygems.rb:162:in `install' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/installer/gem_installer.rb:55:in `install' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/installer/gem_installer.rb:17:in `install_from_spec' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/installer/parallel_installer.rb:133:in `do_install' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/installer/parallel_installer.rb:124:in `block in worker_pool' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/worker.rb:62:in `apply_func' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/worker.rb:57:in `block in process_queue' <internal:kernel>:187:in `loop' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/worker.rb:54:in `process_queue' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads' An error occurred while installing ruby2_keywords (0.0.5), and Bundler cannot continue. In Gemfile: ruby2_keywords ``` ### After ``` $ GEM_HOME=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/ bundle There was an error creating `/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/bundler.lock`. The underlying system error is Errno::EPERM: Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/bundler.lock ``` https://github.com/rubygems/rubygems/commit/345ec45f5a
2024-10-10[rubygems/rubygems] Fix specs with missing extensions getting activatedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/c80998a22a
2024-10-04[rubygems/rubygems] Remove outdated conditionals from testsSamuel Giddins
Signed-off-by: Samuel Giddins <[email protected]> https://github.com/rubygems/rubygems/commit/06eec6d855
2024-10-03Update default gem test for colon-style hash inspecttompng
Notes: Merged: https://github.com/ruby/ruby/pull/10924
2024-09-30[rubygems/rubygems] Fix error when changing a path source to a git source if ↵David Rodríguez
frozen mode https://github.com/rubygems/rubygems/commit/4c79ab9b2e
2024-09-30[rubygems/rubygems] Fix duplicated spec namesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/26f6600197
2024-09-26Update test dependenciesDavid Rodríguez
2024-09-26[rubygems/rubygems] Get specs to run on JRuby and make them passDavid Rodríguez
Turns out we were not running specs on JRuby, so we introduced a failure. Seems fine to skip. https://github.com/rubygems/rubygems/commit/4e2d6affb3
2024-09-20[rubygems/rubygems] Fix RubyGems warnings about pre-release dependenciesDavid Rodríguez
Nothing here relies on the dependency being on a pre-release, and Bundler does not use prereleases in the realworld. https://github.com/rubygems/rubygems/commit/96f5742ff1
2024-09-11[rubygems/rubygems] Only raise DSLError during Gemfile parsing when it's ↵David Rodríguez
actually useful DSLError prints the specific line in a Gemfile where the error was raised. That's helpful when the error was explicitly raised by the Gemfile DSL or, in the case it's implicitly raised, when the offending code lives right in the Gemfile. If it's an internal error, or something buried dowm in user code called from the Gemfile, `DSLError` is not helpful since it hides the actual culprit. This commit tries to only raise `DSLError` in the cases mentioned above and otherwise let the original error be raised. https://github.com/rubygems/rubygems/commit/b30ff5a682
2024-09-04[rubygems/rubygems] Load gemspecs in the context of its parent also when ↵David Rodríguez
using local overrides https://github.com/rubygems/rubygems/commit/0a6c1c53ce
2024-08-30[rubygems/rubygems] Don't blow up when explicit version is removed from some ↵David Rodríguez
git sources `version` is actually an attribute of the dependency, not of the git source. Sometimes it's passed to the git source to be able to fake a gemspec in case there's no gemspec in the source, but it should not be used for source comparison. https://github.com/rubygems/rubygems/commit/d936fbd78e
2024-08-30[rubygems/rubygems] Fix grammar in one spec descriptionDavid Rodríguez
https://github.com/rubygems/rubygems/commit/a1046466c9
2024-08-23[rubygems/rubygems] Fix error message when Bundler refuses to install due to ↵David Rodríguez
frozen being set without a lockfile https://github.com/rubygems/rubygems/commit/0857d62ca6
2024-08-21[rubygems/rubygems] Restore support for passing relative paths to `:git`David Rodríguez
The `file://` protocol does not really work with relative paths and it's not necessary anyways. So restore support for that by not using `file://`. https://github.com/rubygems/rubygems/commit/16a68998ce
2024-08-21[rubygems/rubygems] Add missing flag passed to `git fetch`David Rodríguez
Doesn't really change the test outcome, but I noticed it was missing. https://github.com/rubygems/rubygems/commit/ea4f9d5209
2024-08-05[rubygems/rubygems] Fix locked source not getting respected when `bundle ↵David Rodríguez
update <specific_gem>` is run https://github.com/rubygems/rubygems/commit/eec6830c04
2024-08-05[rubygems/rubygems] Extract a `build_repo3` helperDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d8cf4aa0cd
2024-08-05Fix truffleruby removing gems from lockfileDavid Rodríguez
When resolving on truffleruby, and multiple platforms are included in the lockfile, Bundler will not respect existing platforms, but always force ruby variants. That means removal of existing version specific variants, introducing lockfile churn between implementations. To prevent this, we introduce the distinction between `Dependency#force_ruby_platform`, only settable via Gemfile, and `Dependency#default_force_ruby_platform`, which is always true on truffleruby for certain dependency names. This way, when resolving lockfile gems for other platforms on truffleruby, we keep platform specific variants in the lockfile. However, that introduces the problem that if only platform specific variants are locked in the lockfile, Bundler won't be able to materialize on truffleruby because the generic variant will be missing. To fix this additional problem, we make sure the generic "ruby" platform is always added when resolving on truffleruby.
2024-07-26[rubygems/rubygems] Make all tests still pass when switching from ↵David Rodríguez
truffleruby to cruby https://github.com/rubygems/rubygems/commit/4f3d9fa3bf
2024-07-23[rubygems/rubygems] Stop using the cache path as the install locationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/ecadd02746
2024-07-23[rubygems/rubygems] Enable checksums on Bundler 3 for fresh lockfilesDavid Rodríguez
And get specs passing. https://github.com/rubygems/rubygems/commit/c23b5f5b84
2024-07-23[rubygems/rubygems] Normalize a few specs using sourcesDavid Rodríguez
Use the standard sources to avoid having to explictly pass ENV with the repo. https://github.com/rubygems/rubygems/commit/95055dba57
2024-07-23[rubygems/rubygems] Enforce passing a block to `simulate_platform`David Rodríguez
https://github.com/rubygems/rubygems/commit/0658903e25
2024-07-19mustermann depends on URI::RFC2396_PARSER behaviorHiroshi SHIBATA
It's part of dependencies for Sinatra. we should fix mustermann before final release of Ruby 3.4 Notes: Merged: https://github.com/ruby/ruby/pull/11204
2024-07-18[rubygems/rubygems] Fix another removal issueDavid Rodríguez
I failed to ignore (again) specs only considered for resolution under some platforms that are not the current one. https://github.com/rubygems/rubygems/commit/b72deec57e
2024-07-18[rubygems/rubygems] Simplify spec assertionDavid Rodríguez
All that we expect here is no changes. https://github.com/rubygems/rubygems/commit/ff984b6133
2024-07-18[rubygems/rubygems] Fix incorrect standalone script when default gems with ↵David Rodríguez
extensions are used https://github.com/rubygems/rubygems/commit/55649cd09b
2024-07-18[rubygems/rubygems] Remove unnecessary `artifice` parameterDavid Rodríguez
It's automatically detected from Gemfile. https://github.com/rubygems/rubygems/commit/72301a2e3b
2024-07-18[rubygems/rubygems] Use latest shellwords for standalone testDavid Rodríguez
https://github.com/rubygems/rubygems/commit/fcd04daf68
2024-07-18[rubygems/rubygems] Fix gemspec `require_paths` type validationDavid Rodríguez
It was not properly being detected as an Array attribute, and thus not properly validated. Fixing this allows us to remove a strange `rescue` clause in Bundler. https://github.com/rubygems/rubygems/commit/4121a32408
2024-07-10[rubygems/rubygems] Fix another strange error when running `bundle add` in ↵David Rodríguez
frozen mode If there's a lockfile, but it's out of sync with the Gemfile because a dependency has been deleted, and frozen mode is set, Bundler will print the following strange error: ``` $ bundle add rake , but the lockfile can't be updated because frozen mode is set You have deleted from the Gemfile: * rake (~> 13.2) Run `bundle install` elsewhere and add the updated Gemfile to version control. ``` This commit changes the error to: ``` Some dependencies were deleted from your gemfile, but the lockfile can't be updated because frozen mode is set You have deleted from the Gemfile: * rake (~> 13.2) Run `bundle install` elsewhere and add the updated Gemfile to version control. ``` https://github.com/rubygems/rubygems/commit/452da4048d
2024-07-09[rubygems/rubygems] Fix generic platform gems getting incorrectly removed ↵David Rodríguez
when locked for a specific platform If they are already in the lockfile as the most specific variant for a platform, we shouldn't change that unless explicitly unlocking. https://github.com/rubygems/rubygems/commit/a901660498
2024-07-09[rubygems/rubygems] Minor Bundler spec improvementsDavid Rodríguez
While working on something else I noticed: * Usage of uppercased "RUBY" and "JAVA" as platforms, when those don't really exist. * Usage of some test gems with "1.0" as gemspec version and "1.0.0" as actual version. This commit fixes both inconsistencies to make things more expectable. https://github.com/rubygems/rubygems/commit/e3ec32e247
2024-07-09[rubygems/rubygems] Test using latest rubiesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/6d6646b8bc
2024-07-05[rubygems/rubygems] Use preferred add_dependency instead of ↵Jerome Dalbert
add_runtime_dependency https://github.com/rubygems/rubygems/commit/9a08043858
2024-06-28Synchronize Bundler & RubyGems (#11071)David Rodríguez
2024-06-20[rubygems/rubygems] Fix `bundle update <gem_name>` edge caseDavid Rodríguez
When locked only to RUBY, and some locked spec does not meet locked dependencies, Bundler would remove the only locked platform and end up creating a lockfile with empty sections. We can't rely on our criteria to remove invalid platforms if locked specs are not valid in the first place. https://github.com/rubygems/rubygems/commit/1dba05cf53
2024-06-20[rubygems/rubygems] Don't validate local gemspec twiceDavid Rodríguez
Calling `remote!` or `cached!` on the source was expiring local specs for now reason. It's unnecessary to override these methods for path sources since they only deal with local specifications. https://github.com/rubygems/rubygems/commit/aa93b196a2
2024-06-20[rubygems/rubygems] Make sure to not re-resolve when a not fully specific ↵David Rodríguez
local platform is locked https://github.com/rubygems/rubygems/commit/36a02c6128
2024-06-20[rubygems/rubygems] Always resolve against the local platformDavid Rodríguez
If RUBY is the only platform in the lockfile, we were skipping adding the local platform to the list of resolution platforms. This generally works anyways, because we had some code to still add it if the RUBY platform is not valid for the set of locked gems. However, sometimes it can happen that "RUBY" is valid for the current set of locked gems, but when adding a new dependency, it becomes invalid. For example, when adding sorbet to a Gemfile, that will introduce `sorbet-static` as an indirect dependency which does not have a generic "RUBY" variant. This will cause resolution to take a long time continuously backtracking trying to find solutions that don't introduce `sorbet-static` as a dependency and will eventually fail. Instead, we can always add the local platform to the set of resolution platforms before resolving, and remove it as necessary after resolution so that we lock the correct set of platforms. https://github.com/rubygems/rubygems/commit/6ed1fe6050
2024-06-14[rubygems/rubygems] Fix funding metadata not being printed in some situationsDavid Rodríguez
Namely, when a gem has not previously been installed, and Bundler is using the compact index API, fund metadata was not getting printed because the proper delegation was not implemented in the specification class used by the compact index. https://github.com/rubygems/rubygems/commit/9ef5139f60
2024-06-12[rubygems/rubygems] Fix typoDavid Rodríguez
https://github.com/rubygems/rubygems/commit/19a0e3730c
2024-06-06[rubygems/rubygems] Reuse `git` helper when possibleDavid Rodriguez
https://github.com/rubygems/rubygems/commit/f7c7bae940