-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Please do not deprecate "--without development test" flag #7531
Comments
This equally applies to |
We're definitely open for feedback here, thanks! Note that you can also use global configurations with We definitely need to document all the options in the deprecation message, I'll work on this as soon as possible. Do you think, even knowing these alternatives are available, that your suggestion will be less disruptive?
Well, this is exactly what we're doing, but since things are going to break when we do this, we are deprecating the things that will break first and provide alternatives that won't break. For example, if we stop remembering CLI flags, |
What is the motivation for this change? |
The motivation is that silently remembering CLI flags has historically caused a lot of issues for both beginner and experienced users of bundler. I think that's because this is not how CLI tools usually work, so it breaks user expectations. CLI flags are supposed to apply to the current command, nobody expects that they are remembered. |
@deivid-rodriguez, thanks for the reply and additional details. Of course, I cannot pretend like I know the nuances and complexities of bundler, and I am sure there are good reasons for these deprecations. I did not consider the fact that bundler actually needs to know its "without" config for subsequent commands, coming after The environment variable is indeed a good option for docker, and other environment specific config, and it allows the user to configure without polluting the working directory or source control with possibly invalid configuration files. Although |
I think everyones agrees with that, and there's definitely a case for deprecating that remembering behavior. However that doesn't make On various CI or build system, being able to do the entire bundler thing in just one command rather than 4 or 5 is really important. Is there any chance these flags would be kept, but simply not be remembered anymore ? Edit: sorry looks like I missed part of one of your previous comments:
So I know understand why they can't be kept :/ It's really a shame. |
I totally agree that CI is a big part of my concerns as well, but why do you say 4 or 5 steps? Old way $ bundle install --without development test New way # temporary, for this command only
$ BUNDLER_WITHOUT="development test" bundle install
# similar to: RAILS_ENV=production rails server
# permanent, for the environment
$ export BUNDLER_WITHOUT="development test"
$ bundle install New way in docker-land ENV BUNDLER_WITHOUT development test
RUN bundle install It looks like we are all in agreement that command line flags should be stateless, but we now also learn that bundler is stateful. So these two notions, yield the conclusion that the minimum number of possible "moves" is 2:
And therefore, the two proposed options - No? (Of course, there is that other option, to make bundler stateless - but that's a story for another "what if"...) |
Because even though the issue mainly talk about
So following the deprecation advice, that would be 3
Sure, it works. It's just that it's much more involved than the previous one command line. On some system invoking multiple command is complicated, on other it's setting ENV that ain't super easy. And all that is much less discoverable than some flags in |
I totally agree that this should not take more than 2 commands at most, since it is a common need to have more than one bundler environments. Perhaps the reasonable conclusion should then be, to have a single environment variable, that simply points to a config file? I was skimming this manual page and didn't find anything. Maybe: $ export BUNDLE_CONFIG=bundler-production.conf
$ bundle install and then, we can commit these configs to git repositories without harming anything, and still have 2 commands at most, and environment persistence? This achieves all of the goals, and even provides improved clarity to beginners. No? |
I'm trying to adjust to the changes upgrading from 1.x to 2.1.x and here's some findings: previous
current:
the problem I see with this is that if this code runs in a
overriding I also tried with |
Official docker images no longer set the |
I'm just trying to get my head around these changes.
Shouldn't some kind of config file be created? |
I figured out I need to add
This is what I added to my automated server setup script. Does that seem right? Then, I should change my post-update hook from:
to
|
Now that I grok this change, I fully support it. I've updated my deployment scripts... so I no longer use the flag variant. Wondering if I should also use config to set jobs and retry parameters? |
Yeah, if you want them to be applied to all |
how do you persist those flags? (--jobs=4 --retry=2) |
Can we please keep this on topic, and not turn it into a support thread? People are getting notified with every post... |
@ioquatix yes, you can persist settings for those flags those via @DannyBen asking questions about how to handle the deprecation is on topic in a thread discussing the deprecation, imo. Thanks for opening this issue, since the thread has helped make it clear that we'll need to write some more documentation explaining the reason for the change and making it clearer how to resolve the deprecation warning. Since we aren't planning to add stateful flags back to Bundler, I'm going to close this ticket. |
Removing this flag will complicate things in certain scenarios.
Consider this:
You have a docker-based Ruby application, and you are mounting the current folder to the container - as is a common practice when developing.
When the image is built, when using the
bundle config without ...
option, it creates the.bundle
folder, not only in the docker container, but also in the host.I believe that it would be less disruptive to keep these flags, and if you need to remove any complications in this flag that arise from it "remembering its state" - then do not remember its state. Let it generate the proper
Gemfile.lock
, without the requested groups, and the users should know that if they run it again, without these--without
flags, they will get the full installation.In other words - instead of removing the flag, make it non persistent.
The text was updated successfully, but these errors were encountered: