-
-
Notifications
You must be signed in to change notification settings - Fork 2k
[bundle add] Add version prefix flexibility #6556
Conversation
323fd2a
to
ec36d07
Compare
lib/bundler/cli.rb
Outdated
@@ -335,6 +335,8 @@ def binstubs(*gems) | |||
method_option "source", :aliases => "-s", :type => :string | |||
method_option "skip-install", :type => :boolean, :banner => | |||
"Adds gem to the Gemfile but does not install it" | |||
method_option "optimistic", :type => :boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these need banner
s
end | ||
end | ||
|
||
describe "with --strict option" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we error when passing both --optimistic
and --strict
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. adding it.
If I specify version then a strict declaration is added and these options have no affect. Should we disable the use of these options when version is specified? or inco-oporate these flags with the version also? |
I think it’s fine to allow the specific requirement given to override the flags? |
But if we provide flexibility then I think we should allow 🤔 , any side effects for this? |
For what ? |
I meant something like this bundle add rack --version=1.1 --optimistic This would do something like this gem "rack", ">= 1.1" Or a few more commands like |
Great! This looks amazing! @bundlerbot r+ |
📌 Commit 9250dbc has been approved by |
[bundle add] Add version prefix flexibility ### What was the end-user problem that led to this PR? By default, on `bundle add` we use "pessimistic" way (~>) of versions. According to this [comment](https://github.com/bundler/bundler/issues/6553#issue-326023952) some users face problems. ### What was your diagnosis of the problem? Adding flags to provide flexibility to change this declaration namely `optimistic` and `strict` ### What is your fix for the problem, implemented in this PR? Adding flags to opt for other declarations. ### Why did you choose this fix out of the possible options? Currently, its an experiment and I have added it to only `bundle add` but still the version locked in lockfile are "pessimistic". Need suggestions on this and on how to proceed. Addresses #6553
☀️ Test successful - status-travis |
[bundle add] Add version prefix flexibility ### What was the end-user problem that led to this PR? By default, on `bundle add` we use "pessimistic" way (~>) of versions. According to this [comment](https://github.com/bundler/bundler/issues/6553#issue-326023952) some users face problems. ### What was your diagnosis of the problem? Adding flags to provide flexibility to change this declaration namely `optimistic` and `strict` ### What is your fix for the problem, implemented in this PR? Adding flags to opt for other declarations. ### Why did you choose this fix out of the possible options? Currently, its an experiment and I have added it to only `bundle add` but still the version locked in lockfile are "pessimistic". Need suggestions on this and on how to proceed. Addresses #6553 (cherry picked from commit 43b4fa9)
[bundle add] Add version prefix flexibility ### What was the end-user problem that led to this PR? By default, on `bundle add` we use "pessimistic" way (~>) of versions. According to this [comment](https://github.com/bundler/bundler/issues/6553#issue-326023952) some users face problems. ### What was your diagnosis of the problem? Adding flags to provide flexibility to change this declaration namely `optimistic` and `strict` ### What is your fix for the problem, implemented in this PR? Adding flags to opt for other declarations. ### Why did you choose this fix out of the possible options? Currently, its an experiment and I have added it to only `bundle add` but still the version locked in lockfile are "pessimistic". Need suggestions on this and on how to proceed. Addresses #6553 (cherry picked from commit 43b4fa9)
[bundle add] Add version prefix flexibility ### What was the end-user problem that led to this PR? By default, on `bundle add` we use "pessimistic" way (~>) of versions. According to this [comment](https://github.com/bundler/bundler/issues/6553#issue-326023952) some users face problems. ### What was your diagnosis of the problem? Adding flags to provide flexibility to change this declaration namely `optimistic` and `strict` ### What is your fix for the problem, implemented in this PR? Adding flags to opt for other declarations. ### Why did you choose this fix out of the possible options? Currently, its an experiment and I have added it to only `bundle add` but still the version locked in lockfile are "pessimistic". Need suggestions on this and on how to proceed. Addresses #6553 (cherry picked from commit 43b4fa9)
What was the end-user problem that led to this PR?
By default, on
bundle add
we use "pessimistic" way (~>) of versions. According to this comment some users face problems.What was your diagnosis of the problem?
Adding flags to provide flexibility to change this declaration namely
optimistic
andstrict
What is your fix for the problem, implemented in this PR?
Adding flags to opt for other declarations.
Why did you choose this fix out of the possible options?
Currently, its an experiment and I have added it to only
bundle add
but still the version locked in lockfile are "pessimistic". Need suggestions on this and on how to proceed.Addresses #6553