Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation messages recommending bundle config don't have the same effect as the old persisted flags #3916

Closed
eregon opened this issue Aug 30, 2020 · 7 comments · Fixed by #3917
Labels

Comments

@eregon
Copy link
Contributor

eregon commented Aug 30, 2020

Describe the problem as clearly as you can

bundle config key value is --global by default (stored in ~/.bundle/config), while I think most usages would benefit from being local.

For instance, typical mistakes are bundle config path vendor/bundle, bundle config without db, etc.

Which unfortunately is also what is shown by deprecation messages, and I believe that part is an outright bug (Bundler 2.1.4) because the old flags did write to .bundle/config (= --local), fixed by #3917:

$ bundle install --path vendor/bundle
[DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path 'vendor/bundle'`, and stop using this flag

$ bundle install --without db
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'db'`, and stop using this flag

Note also that the very similar command git config key value defaults to --local.

I think it would be much safer and intuitive to change bundle config key value to also default to --local.
Most of Bundler configuration is project-specific and doing it globally makes often little sense, especially when not stating explicitly one wants it to be global.

@eregon eregon added the Bundler label Aug 30, 2020
@deivid-rodriguez
Copy link
Member

I agree, we should fix the deprecation messages and consider changing bundle config default to be local 👍.

eregon added a commit to eregon/rubygems that referenced this issue Aug 30, 2020
…d be --local as before

* See rubygems#3916
* Always show --local or --global for `bundle config set` commands as
  the default is global which can be not intuitive (rubygems#3916).
@eregon
Copy link
Contributor Author

eregon commented Aug 30, 2020

PR to fix the deprecation messages and always show --local/--global explicitly for bundle config set commands: #3917

@eregon
Copy link
Contributor Author

eregon commented Aug 30, 2020

cc @chrisseaton since you ran into this bug (but I'm sure you're not the only one, this exists since Bundler 2 IIRC).

eregon added a commit to eregon/rubygems that referenced this issue Aug 30, 2020
…d be --local as before

* See rubygems#3916
* Always show --local or --global for `bundle config set` commands as
  the default is global which can be not intuitive (rubygems#3916).
eregon added a commit to eregon/rubygems that referenced this issue Aug 30, 2020
…d be --local as before

* See rubygems#3916
* Always show --local or --global for `bundle config set` commands as
  the default is global which can be not intuitive (rubygems#3916).
eregon added a commit to eregon/rubygems that referenced this issue Aug 30, 2020
…d be --local as before

* See rubygems#3916
* Always show --local or --global for `bundle config set` commands as
  the default is global which can be not intuitive (rubygems#3916).
eregon added a commit to eregon/rubygems that referenced this issue Aug 30, 2020
…d be --local as before

* See rubygems#3916
* Always show --local or --global for `bundle config set` commands as
  the default is global which can be not intuitive (rubygems#3916).
@eregon
Copy link
Contributor Author

eregon commented Sep 2, 2020

Could we reopen to track changing the default? Or should I file a new issue?

@deivid-rodriguez
Copy link
Member

I prefer a new ticket referencing this one.

@eregon
Copy link
Contributor Author

eregon commented Sep 2, 2020

OK, #3926

@deivid-rodriguez deivid-rodriguez changed the title bundle config key value is --global by default Deprecation messages recommending bundle config does not have the same effect as the old persisted flags Sep 2, 2020
@deivid-rodriguez deivid-rodriguez changed the title Deprecation messages recommending bundle config does not have the same effect as the old persisted flags Deprecation messages recommending bundle config don't have the same effect as the old persisted flags Sep 2, 2020
@deivid-rodriguez
Copy link
Member

Thanks, I also edited the title of this ticket to reflect what we fixed in the PR that closed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants