summaryrefslogtreecommitdiff
path: root/lib/bundler
AgeCommit message (Collapse)Author
2021-12-04[rubygems/rubygems] Let original EACCES error be raisedDavid Rodríguez
This block of code already wraps file operations with `SharedHelpers.filesystem_access`, which rescues and re-raises more friendly errors. Also, I'm not fully sure creating a temporary directory can end up raising an `Errno::EACCES` error from reading `tmpdir` sources. Finally, this rescue block apparently leads to some false positives when firewall is blocking the ruby executable on Windows, or at least that's what we've got reported. In any case, I think it's best to let the original error be raised. https://github.com/rubygems/rubygems/commit/f7dbe54404
2021-12-03[rubygems/rubygems] Don't unnecessarily loop twice through dependenciesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/06b4a7994d
2021-12-03[rubygems/rubygems] Improve source gemfile/lockfile equivalence checksDavid Rodríguez
Since we no longer have multiple global sources, each top level dependency is always pinned to a single source, so it makes little sense to talk about adding or removing a source. Instead, source changes always mean to change the source one or more dependencies are pinned to. This logic can now be much simpler. https://github.com/rubygems/rubygems/commit/f1d33fa0df
2021-12-03[rubygems/rubygems] Improve sources representationDavid Rodríguez
We have two representations of a source. Once used for sorting, which should not depend on the source's state, but solely on its static information, like remotes. Another one used for error and informational messages, which should properly inform about the exact state of the source when the message is printed. This commit makes the latter be the default implementation of `to_s`, so that error and informational messages are more accurate by default. https://github.com/rubygems/rubygems/commit/b5f2b88957
2021-12-03[rubygems/rubygems] Don't overwrite locked dependency sources too earlyDavid Rodríguez
Otherwise we hide some useful message about dependency source changes. https://github.com/rubygems/rubygems/commit/c926673c5b
2021-12-03[rubygems/rubygems] Fix incorrect order in changed sources messageDavid Rodríguez
https://github.com/rubygems/rubygems/commit/6f1b5f68de
2021-12-03[rubygems/rubygems] Remove unnecessary codeDavid Rodríguez
Somehow this is trying to relax frozen mode constraints for path sources. It doesn't make sense to me and it's not covered by any spec so I'm killing it. https://github.com/rubygems/rubygems/commit/17c978e161
2021-12-03[rubygems/rubygems] Reuse `locked_dependencies` helperDavid Rodríguez
It makes the code more consistent with the above line. https://github.com/rubygems/rubygems/commit/f28d05a548
2021-12-03[rubygems/rubygems] Reformat for consistency with the above lineDavid Rodríguez
https://github.com/rubygems/rubygems/commit/11193be3f1
2021-12-03[rubygems/rubygems] Remove unnecessary nil checksDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d047b8935d
2021-12-02[rubygems/rubygems] This warrants a commentDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8fa29e5e55
2021-12-02[rubygems/rubygems] Fix gemspec source unlocking also for prereleases like ↵David Rodríguez
0.0.0.SNAPSHOT The default prerelease requirement in rubygems doesn't actually match things like "0.0.0.SNAPSHOT". https://github.com/rubygems/rubygems/commit/711498b342
2021-12-02[rubygems/rubygems] Fix materialization of locked 0 prereleasesDavid Rodríguez
Since the default requirement in rubygems is ">= 0", it was failing to match 0 prereleases. Changing the default globally to be ">= 0.a" instead is a major refactoring that's quite tricky to make backwards compatible, so I'm special casing this where needed for now to fix the regression. https://github.com/rubygems/rubygems/commit/68fe37937c
2021-12-02Ignore to generate the documentation from vendored librariesHiroshi SHIBATA
2021-12-01Merge rubygems master fd676ac464491afaa0baf5435cb11b3f86229cbdHiroshi SHIBATA
2021-12-01[rubygems/rubygems] Update ↵Olle Jonsson
bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt https://github.com/rubygems/rubygems/commit/8836fe157b Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2021-12-01[rubygems/rubygems] Update main.yml.ttOlle Jonsson
https://github.com/rubygems/rubygems/commit/3260173c59
2021-12-01[rubygems/rubygems] newgem tmpl: ruby as "2.7" in GH Actions matrixOlle Jonsson
https://github.com/rubygems/rubygems/commit/f5bead5634
2021-12-01[rubygems/rubygems] newgem templ: Avoid Float 3.0 -> "3" in GH ActionOlle Jonsson
This change avoids a YAML Float-to-String conversion, which turns a 3.0 into a "3". That can make names of builds less clear. In order to use this new capability, I added a "name" descriptor to the matrix-created Job. https://github.com/rubygems/rubygems/commit/6221241ad4
2021-11-30[rubygems/rubygems] Fix escape of filenames in `bundle doctor`ooooooo-q
https://github.com/rubygems/rubygems/commit/3ede1435ea
2021-11-27[rubygems/rubygems] Fix missing locked specs when depended on other platformDavid Rodríguez
https://github.com/rubygems/rubygems/commit/0396e899db
2021-11-26[rubygems/rubygems] Fix `bundle info` sometimes claiming that bundler has ↵David Rodríguez
been deleted https://github.com/rubygems/rubygems/commit/fe1a31db31
2021-11-25[rubygems/rubygems] Don't replace ENV twice on non Windows platformsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8dc86b7096
2021-11-22[rubygems/rubygems] Clarify `bundle viz` deprecationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7f22fe56b3
2021-11-19[rubygems/rubygems] Previous logic can mostly go nowDavid Rodríguez
https://github.com/rubygems/rubygems/commit/3241b34055
2021-11-19[rubygems/rubygems] Allow `bundle update` to downgrade gems by changing the ↵David Rodríguez
Gemfile https://github.com/rubygems/rubygems/commit/6a19cca7e5
2021-11-19[rubygems/rubygems] Extract a converge_specs method for later reusing itDavid Rodríguez
https://github.com/rubygems/rubygems/commit/e896e63ac3
2021-11-19[rubygems/rubygems] Avoid unnecessary loopDavid Rodríguez
https://github.com/rubygems/rubygems/commit/afaf868b68
2021-11-16Merge the master branch of rubygems repoHiroshi SHIBATA
Picked from https://github.com/rubygems/rubygems/commit/4b498709a015a94e14a3852a1841a7a3e669133d
2021-11-09[rubygems/rubygems] Use `shellsplit` instead of array of stringsNicholas Lee
Previously, the command string to be used for the shell command was first generated and then split using shellsplit. This change reverts the current behavior as it breaks if the value of remote contains a space. https://github.com/rubygems/rubygems/commit/6649ee10b0
2021-11-08[rubygems/rubygems] Use bundler-graph instead of bundler-vizHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/a54cca13db
2021-11-06[rubygems/rubygems] Fix urlharuuzion
https://github.com/rubygems/rubygems/commit/6a5a80eff7
2021-11-04[rubygems/rubygems] Fix typosNobuyoshi Nakada
https://github.com/rubygems/rubygems/commit/f328ef6f77
2021-11-02[rubygems/rubygems] Leave ":" after MANPATH when not setDavid Rodríguez
So that system man pages still work after a gem with man pages overrides it. https://github.com/rubygems/rubygems/commit/1031879b87
2021-11-01[rubygems/rubygems] Memoize materialized specs when requiring `bundler/setup`David Rodríguez
Calling `Bundler.definition.specs` will memoize materialized specs. However, requiring `bundler/setup` will end up materializing the same set of specs, but not memoize them. This change makes things consistent. https://github.com/rubygems/rubygems/commit/e4c2b52824
2021-10-30[rubygems/rubygems] Better error when installing a git lockfile and git not ↵David Rodríguez
present https://github.com/rubygems/rubygems/commit/28f4842196
2021-10-29Support gemification of tsortFrederik Dudzik
Co-authored-by: Frederik Dudzik <frederik.dudzik@shopify.com> Co-authored-by: Jacques Chester <jacques.chester@shopify.com>
2021-10-29[rubygems/rubygems] Only delete cached gem when it's corruptedDavid Rodríguez
Rescuing all errors here might end up hiding other errors if the deletion of the cached gem itself raises an error for some reason. Let's be more conservative. https://github.com/rubygems/rubygems/commit/3d80dfba08
2021-10-27[rubygems/rubygems] Don't warn when a lockfile is locked to a dev versionDavid Rodríguez
Even if it's newer than the running versions. Dev versions are not released to rubygems.org, so the warning message suggests a command that doesn't work. And dev versions are currently non deterministic (2.3.0.dev can be many different versions), so the warning doesn't really make sense at the moment. https://github.com/rubygems/rubygems/commit/6f31af27ef
2021-10-26[rubygems/rubygems] Fix Bundler::Digest#sha1 on big-endian systemsJean Boussier
As noticed by @nobu https://github.com/rubygems/rubygems/pull/4989#discussion_r735674633 From wikipedia: https://en.wikipedia.org/wiki/SHA-1#SHA-1_pseudocode > append ml, the original message length in bits, as a 64-bit big-endian integer. `Q` is native endian, so little-endian on most modern hardware. The original code from RubyDigest reverses the bytes: https://github.com/Solistra/ruby-digest/blob/d15f906caf09171f897efc74645c9e31373d7fd1/lib/ruby_digest.rb#L521 But that makes the code non-portable, the correct way is to directly ask for a big-endian representation. https://github.com/rubygems/rubygems/commit/ba2be01ea4
2021-10-25Unify issue template and ISSUES.md documentDavid Rodriguez
Some crucial information to ease maintainers work, like the advice of upgrading rubygems and bundler, was one step away from the issue template, making it easier for some users to miss. Now all relevant information is written directly in the bug report template.
2021-10-25[rubygems/rubygems] Show proper error when previous installation of gem ↵David Rodriguez
can't be deleted Instead of showing the bug report template with an error at a random place. https://github.com/rubygems/rubygems/commit/882ad3ab57
2021-10-25[rubygems/rubygems] Show a proper error if gem path is not writableDavid Rodriguez
Instead of showing the bug report place with an error at a randome place. https://github.com/rubygems/rubygems/commit/241854ce73
2021-10-25[rubygems/rubygems] Improve readability by splitting updating the cache and ↵David Rodriguez
searching it https://github.com/rubygems/rubygems/commit/d0df25bb0f
2021-10-25[rubygems/rubygems] Manage global gem cache directlyDavid Rodriguez
Previously, it was maintained in sync with the standard cache. That was less efficient, and it caused some error messages to point to non existent files. https://github.com/rubygems/rubygems/commit/931f8cb8a9
2021-10-25[rubygems/rubygems] Cached gem path resolution should consider default gemsDavid Rodriguez
https://github.com/rubygems/rubygems/commit/83b2b845b3
2021-10-25[rubygems/rubygems] Simplify gem downloading inside bundlerDavid Rodriguez
We can skip most stuff in `Gem::RemoteFetcher#download`, and use `Gem::RemoteFetcher#update_cache_path` directly. This has the benefit of allowing us to remove some workarounds to support several rubygems versions, but also allows us to pass the target folder where the gem should be downloaded directly and skip the logic inside `Gem::RemoteFetcher#download` to infer the cache path. This will be useful later to fix some issues with the `global_gem_cache` feature flag. https://github.com/rubygems/rubygems/commit/8fe74a77e4
2021-10-25[rubygems/rubygems] Raise original exceptionDavid Rodriguez
https://github.com/rubygems/rubygems/commit/3c93b9fd21
2021-10-25[rubygems/rubygems] Add missing requiresDavid Rodriguez
These methods rescue a constant defined by `rubygems/remote_fetcher`, so they should technically require it. The require is provided by `gem_remote_fetcher` anyways but I was running a unit spec that stubs that method, so I was getting an undefined constant error hiding another error. https://github.com/rubygems/rubygems/commit/8bedae4034
2021-10-25[rubygems/rubygems] Use `Gem::Specification#file_name` consistentlyDavid Rodriguez
https://github.com/rubygems/rubygems/commit/13b933f49a