-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Automatically remembering configuration options is unexpected (and inconvenient) behavior #1006
Comments
I totally agree. Normal command line options shouldn't be remembered. If you call the command again without that option/switch, you would expect it to act as if that switch were turned off. For configuration that should be remembered, we have the bundle config command. |
+1 Agreed. |
I'm not sure the best way to resolve this. @Confusion brings up some good points, but the remembered options behavior is heavily depended on at this point. Any thoughts? |
I think printing the set of remembered options being used is a nice way to reduce surprise while enjoying benefits of remembered options. An issue already exists for this: #2177 |
@Confusion is absolutely dead-on, here. I absolutely adore bundler and use it every day, but its behavior in this case is dangerously counter-intuitive. @Rohit's suggestion, while nice, does not go far enough, in my opinion. Command-line options should be transient; users can edit the config file if need be. The config file is easy enough that users who want to persist options can google the steps in a few seconds. Users who expect bundler to behave like standard unix tools (like myself) will lose hours trying to debug stack traces before they even suspect bundler to be the source of the issue. |
Just wanted to follow up and note that there's some great discussion and plans happening in #2347 around this issue that should resolve it. |
solved by #2360 |
Unix tools have, for decades, opted to use explicit configuration files, where you set the default configuration, preferably by hand. This file holds the default configuration, that you mostly want to use. If you, for whatever reason, run a command with a different set of options, you usually do not want that particular invocation to overwrite your default configuration. You just want to run that one invocation with those options.
As an example: you attempt to recreate bundlers behavior on a production machine, where some groups are excluded. Afterwards, you are stuck with those groups being excluded by default.
I think this behavior of remembering options is far from convenient. It is unexpected for a command line tool to behave this way. It has caused me to lose a lot of time searching for gems that "just wouldn't show up". I doubt I'm the only one and I think it would be a net gain for all users to not have this behavior.
The text was updated successfully, but these errors were encountered: