summaryrefslogtreecommitdiff
path: root/lib/bundler/dsl.rb
AgeCommit message (Collapse)Author
2025-11-20[ruby/rubygems] Keep legacy windows platform, not removed themHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/f360af8e3b
2025-11-20[ruby/rubygems] Add support for lockfile in GemfileJeremy Evans
This allows you to specify the lockfile to use. This is useful if you want to use different lockfiles for different ruby versions or platforms. You can also skip writing the lockfile by using a false value. https://github.com/ruby/rubygems/commit/2896aa3fc2 Co-authored-by: Colby Swandale <996377+colby-swandale@users.noreply.github.com>
2025-10-15[rubygems/rubygems] Replaced Bundler::SharedHelpers.major_deprecation to ↵Hiroshi SHIBATA
feature_removed! or feature_deprecated! https://github.com/rubygems/rubygems/commit/b1b963b34a Co-authored-by: David Rodríguez <2887858+deivid-rodriguez@users.noreply.github.com>
2025-10-14[rubygems/rubygems] Removed deprecated legacy windows platform supportHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/7d910dd94c Co-authored-by: David Rodríguez <2887858+deivid-rodriguez@users.noreply.github.com>
2025-09-16[rubygems/rubygems] Completely remove multisources supportDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8f9d6c54a1
2025-09-05[rubygems/rubygems] Improve error message when `path` and `gemspec` point to ↵manabeai
the same gem in Gemfile https://github.com/rubygems/rubygems/commit/e47a9064be
2025-06-19Skip to Bundler 4 directlyDavid Rodríguez
2025-06-06Move most of Bundler::GemHelpers to Gem::PlatformSamuel Giddins
This will help centralize wheel platform selection logic eventually Signed-off-by: Samuel Giddins <segiddins@segiddins.me>
2025-03-24[rubygems/rubygems] Simplify passing "gemspec" option to path sourcesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/9c6b57c01d Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Change behavior when gemfile and gemspec dep deps conflictDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7026b5f2e5 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Use `name` argument consistentlyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/4e66fe4208 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-02-17[rubygems/rubygems] Make Bundler never instantiate development dependenciesDavid Rodríguez
Bundler does not really have a concept of "development dependencies", like RubyGems has. Bundler has the more generic concept of "groups". Under the hood, the `gemspec` DSL will put gemspec development dependencies under a `:development` Gemfile group, but there's no reason to instantiate these as development dependencies, they are regular runtime dependencies, except that they belong in a group named :development. By never instantiating development dependencies at all, we avoid having to introduce hacks to "undo" the type Bundler does not know about, and I also think the error messages read better. https://github.com/rubygems/rubygems/commit/9a06fa5bda
2025-02-14[rubygems/rubygems] Deprecate legacy windows platforms (mswin, mingw) in the ↵johnnyshields
Bundler DSL, in favor of using `platform :windows` This commit is only deprecation and does not change/remove any actual functionality. https://github.com/rubygems/rubygems/commit/0ca6dc3984
2025-02-13[rubygems/rubygems] Fix `type` and `gemfile` not getting reported as invalid ↵David Rodríguez
options https://github.com/rubygems/rubygems/commit/5b6077a1e8
2025-01-31[rubygems/rubygems] Consolidate the platform into a single list:Edouard CHIN
- Similar change than https://github.com/rubygems/rubygems/commit/29a1be0008e6, keep a single source of truth where we store the platform. The only change worth highlighing is the platform "maglev". It was not part of the supported platform of dependencies, so calling `gem 'foo', plaftorm: 'maglev'` would not work. However, it was supposed to according to https://github.com/rubygems/rubygems/commit/45ec86e2e528. That's why it was possible to do `Bundler.current_ruby.maglev?` or `Bundler.current_ruby.maglev_30?`. I didn't change the current behaviour and maglev is not supported, though I kept the `*maglev` methods as I believe CurrentRuby is public API. https://github.com/rubygems/rubygems/commit/29e219ebcf
2024-11-26[rubygems/rubygems] Enable `Performance/MapCompact` copDavid Rodríguez
https://github.com/rubygems/rubygems/commit/0c3a65871a
2024-11-07[rubygems/rubygems] Undeprecate Gemfiles without a global sourceDavid Rodríguez
After having a second look at this deprecation, the explanation that we're giving does not make a lot of sense. When working only with local gems, Bundler will indeed generate a different lockfile depending on the latest installed version of each gem is at `bundle install` time. That's the same situation that happens with remote sources: Bundler will generate a different lockfile depending on the latest version of each gem available remotely. So, I don't think "a consistent lockfile not getting generated" is a good motivation for deprecating this. Also, this deprecation brings additional challenges, since for example, it should arguably not get printed when using `bundle install --local`? The original problem when this deprecation was introduced was an incorrect message about a missing gem having been yanked. So, I think a better solution is to, as long as we give proper error messages when things go wrong, let users do what's best for them and undo the deprecation. https://github.com/rubygems/rubygems/commit/17499cb83f
2024-10-17[rubygems/rubygems] Allow using `gemspec` DSL twice with same dependency and ↵David Rodríguez
compatible requirements https://github.com/rubygems/rubygems/commit/a8d14c1fc2
2024-10-09Fix spellingJohn Bampton
Notes: Merged: https://github.com/ruby/ruby/pull/11835
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-11[rubygems/rubygems] Don't rescue Exception when evaluating GemfileDavid Rodríguez
Things like OOM, or StackOverflow should be raised immediately. https://github.com/rubygems/rubygems/commit/11691ce492
2024-09-11[rubygems/rubygems] Refactor setting current gemfile in DSLDavid Rodríguez
https://github.com/rubygems/rubygems/commit/b4ecb66224
2024-09-11[rubygems/rubygems] The `dsl_path` parameter in DSLError is documented as a ↵David Rodríguez
string https://github.com/rubygems/rubygems/commit/ab44fa9ee4
2024-02-16[rubygems/rubygems] Add `gitlab:` Git source shorthandJason Garber
This new shorthand, similar to the existing `github:` shorthand, adds support for Gitlab repositories with a notable difference. Gitlab projects may be organized into projects and subprojects. An example Ruby gem exists at: https://gitlab.com/gitlab-org/analytics-section/product-analytics/gl-application-sdk-rb With the new shorthand, a user may install this gem from its repository by adding: ```ruby gem "gitlab-sdk", gitlab: "gitlab-org/analytics-section/product-analytics/gl-application-sdk-rb" ``` As with the `github:` shorthand, a supplied string with no `/` will be interpreted as `example/example`. Also in keeping with the utility of the `github:` shorthand, the new `gitlab:` shorthand also supports Merge Request URLs. ```ruby gem "gitlab-sdk", gitlab: "https://gitlab.com/gitlab-org/analytics-section/product-analytics/gl-application-sdk-rb/-/merge_requests/27" ``` The `gitlab:` gem source shortcut is modeled on the existing `github:` shortcut, so the new specs mimic the existing examples. https://github.com/rubygems/rubygems/commit/f4399018c0
2024-02-15[rubygems/rubygems] use full path for instance_evalCody Cutrer
so that __dir__ and __FILE__ will work properly from within that gemfile fragment, if eval_gemfile is given a relative path https://github.com/rubygems/rubygems/commit/d521bf9790
2024-01-11[rubygems/rubygems] Fix development dependency not being added if introduced ↵David Rodríguez
by two gemspecs https://github.com/rubygems/rubygems/commit/adc05bf1c3
2023-12-23Merge RubyGems-3.5.3 and Bundler-2.5.3Hiroshi SHIBATA
2023-12-16[rubygems/rubygems] Fix Ruby DSL no longer working as expectedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f6258e5679 Co-authored-by: AndrewSwerlick <andrew.swerlick@gmail.com>
2023-12-15[rubygems/rubygems] Save array allocation for every dependency in GemfileSamuel Giddins
Only need to check for lack of git key when branch option is present https://github.com/rubygems/rubygems/commit/ebfca1b389
2023-12-07[rubygems/rubygems] Use modern hashes consistentlyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bb66253f2c
2023-12-05[rubygems/rubygems] Fix crash when duplicating a dev dependency in Gemfile & ↵David Rodríguez
gemspec https://github.com/rubygems/rubygems/commit/e78c0a4a48
2023-12-01[rubygems/rubygems] Many major_deprecations supply :removed_messageEric Mueller
Generally the removed message is very similar, but often it needs to specify that the feature has "been removed" instead of "will be removed", or "been deprecated". And a few chunks of text needed more substantial updates. And a number of them seemed to have been carefully crafted to make sense in either context, so I left those alone. https://github.com/rubygems/rubygems/commit/8d42cf9104
2023-11-13[rubygems/rubygems] Add a warning in an edge case of using `gemspec` DSLDavid Rodríguez
If a Gemfile duplicates a development dependency also defined in a local gemspec with a different requirement, the requirement in the local gemspec will be silently ignored. This surprised me. I think we should either: * Make sure both requirements are considered, like it happens for runtime dependencies (I added a spec to illustrate the current behavior here). * Add a warning that the requirement in the gemspec will be ignored. I think the former is slightly preferable, but it may cause some bundle's that previously resolve to no longer resolver. I went with the latter but the more I think about it, the more this seems like it should behave like the former. https://github.com/rubygems/rubygems/commit/ad6843972f
2023-11-13[rubygems/rubygems] Remove now unnecessary dupDavid Rodríguez
https://github.com/rubygems/rubygems/commit/3c1a6a7dfa
2023-11-13[rubygems/rubygems] Let RuboCop target Ruby 3.0David Rodríguez
https://github.com/rubygems/rubygems/commit/70243b1d72
2023-11-13[rubygems/rubygems] Drop support for Ruby 2.6 and Ruby 2.7 in BundlerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/93619c97ff
2023-01-10Merge RubyGems and Bundler masterHiroshi SHIBATA
from https://github.com/rubygems/rubygems/commit/0635c1423db5d7c461d53bf0c3329bca75de7609 Notes: Merged: https://github.com/ruby/ruby/pull/7094
2022-12-26Merge RubyGems/Bundler masterHiroshi SHIBATA
from https://github.com/rubygems/rubygems/commit/72fd3dd2096af16d797ad0cd8e0d2a8869e240b3 Notes: Merged: https://github.com/ruby/ruby/pull/7025
2022-12-12Merge RubyGems/Bundler masterHiroshi SHIBATA
from https://github.com/rubygems/rubygems/commit/bfb0ae69776069155d2092702bfbb5a12617d85a Notes: Merged: https://github.com/ruby/ruby/pull/6906
2022-09-12[rubygems/rubygems] This sorting seems unnecessary tooDavid Rodríguez
https://github.com/rubygems/rubygems/commit/823cb1fef9
2022-07-19[rubygems/rubygems] Bundler: change error/warning message for multiple ↵Takuya Noguchi
global sources Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com> https://github.com/rubygems/rubygems/commit/316564b8fc
2022-07-13Merge RubyGems and Bundler masterHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/6124
2022-06-24Sync RubyGems & Bundler with upstream repoDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/6054
2022-06-01[rubygems/rubygems] Skip duplicated dependency warning for gemspec dev depsDavid Rodríguez
Generally this warning is skipped for gemspec development dependencies. I think because it's common to override them in the Gemfile to change the source, for example. But the order of conditions was not correct and the warning was still being printed in one case. https://github.com/rubygems/rubygems/commit/da9d1d6a3f
2022-05-20Merge RubyGems and Bundler HEADHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/125415593ead9ab69a9f0bb5392c9d7ec61b1f51
2021-12-27Track RubyGems 3.4.0dev and Bundler 2.4.0devHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5350
2021-12-27Check if `Kernel#untaint` is defined instead of version comparisonNobuyoshi Nakada
Probably `RUBY_VERSION` seems overwritten somewhere in the tests. Notes: Merged: https://github.com/ruby/ruby/pull/5349 Merged-By: nobu <nobu@ruby-lang.org>
2021-12-08[rubygems/rubygems] Cancel deprecation of custom git sourcesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/99cd6e0627
2021-12-06[rubygems/rubygems] Feature: accept pull request URLs as github sourceJean Boussier
Very often github source is used to temporarily use a modified gem while a PR upstream is being reviewed. So for instance https://github.com/ruby/bigdecimal/pull/211 will look like: ```ruby gem "bigdecimal", github: "casperisfine/bigdecimal", branch: "git-gem" # https://github.com/ruby/bigdecimal/pull/200 ``` It's annoying because you have to fiddle with the branch name, which is copied as `casperisfine:git-gem`, etc etc. If I could simply use the PR URL like this: ``` gem "bigdecimal", github: "https://github.com/ruby/bigdecimal/pull/211" ``` It would make a very common task for me so much simpler. https://github.com/rubygems/rubygems/commit/517c527751
2021-08-31[rubygems/rubygems] typos in UI messages: fix a couple missing spaces ↵Tim Sutton
between sentence breaks https://github.com/rubygems/rubygems/commit/5cdda53382 Notes: Merged: https://github.com/ruby/ruby/pull/4789