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

[core] Remove bundler usage for plugin management #7793

Merged
merged 9 commits into from Nov 10, 2016

Conversation

chrisroberts
Copy link
Member

Remove bundler usage for internal plugin management.

@chrisroberts chrisroberts modified the milestones: 1.9.0, Secondary Nov 8, 2016
Copy link
Contributor

@mitchellh mitchellh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I don't understand it 100% but trust you and nothing popped out as worrying.

@chrisroberts chrisroberts merged commit 2d6071a into hashicorp:master Nov 10, 2016
@chrisroberts chrisroberts deleted the enhancement/bundler-less branch November 10, 2016 00:17
puts "installed with `vagrant plugin`. Vagrant will autoload any plugins in"
puts "the 'plugins' group in your Gemfile. You can force Vagrant to take over"
puts "with VAGRANT_FORCE_BUNDLER."
puts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I bring my two cents here, after I've just noticed that the plugins auto-loading is no longer disabled when running Vagrant from a Bundler environment. This is "breaking" my Vagrant installation from source, as Vagrant now tries to load all the plugins defined in ~/.vagrant.d/plugins.json, but fails to find them in such context.

Thanks to the new VAGRANT_DISABLE_PLUGIN_INIT environment variable, I can force to disable the plugins initialisation, which is fair enough for working on the Vagrant project itself.

@chrisroberts In order to avoid misunderstanding situations for people wanting to contribute to the Vagrant project, I guess it would probably be worth to

  • consider disabling the plugin auto-loading by default when running in a "development" context (or be sure to not conflict with plugins installed in an official Vagrant setup).
  • update the related README.md section, especially the note copied below

NOTE: By default running Vagrant via bundle will disable plugins.
This is necessary because Vagrant creates its own private Bundler context
(it does not respect your Gemfile), because it uses Bundler to manage plugin
dependencies.

What do you think? Sorry if I missed something obvious, as I haven't taken time to fully understand the changes brought here. I merely wanted to report a "contributor experience" feedback. Hope it helps and makes sense for you...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gildegoma Hi! Thanks very much for the feedback. I did miss that section in the README file and will need to update it. But to the bigger issue around the behavior of package installation vs source installation around plugins, I'm really happy to get this feedback.

I'm trying to make the behavior of Vagrant from a package installation context and a source installation running via Bundler context function in mostly the same way. This unexpected breakage was "expected" from an implementation point of view, but not intentional from a usability point of view for contributors. My apologies!

I would like for plugins to remain auto loading regardless of the running context (so I'll definitely update that portion of the README, and the relevant section in the website docs). I am curious on thoughts around context specific plugins files and installations. It was something I was considering originally, and perhaps might be worthwhile. This would allow switching from a package installation context to a source installation context without needing to run a plugin repair or plugin expunge --reinstall.

Any more thoughts/feedback is very welcome. Cheers!

@Ma27
Copy link

Ma27 commented Dec 3, 2016

this seems to break the installation of vagrant-r10k.

Whenever I run vagrant plugin install vagrant-r10k with Vagrant 1.9 I get this:

/opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'faraday_middleware' (>= 0) among 45 total gem(s) (Gem::LoadError)

@gabriel403
Copy link

gabriel403 commented Dec 6, 2016

I get something similar with vagrant-librarian-puppet

/opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'faraday' (< 1.0, >= 0.7.4) among 45 total gem(s) (Gem::LoadError)

edit:
reverting to vagrant 1.8.7 seems to fix the issue

@Ma27
Copy link

Ma27 commented Dec 6, 2016 via email

@Ma27
Copy link

Ma27 commented Dec 6, 2016

ping @chrisroberts is this reproducable from your side?

@chrisroberts
Copy link
Member Author

@Ma27 yep, and has been fixed in #8068

@Ma27
Copy link

Ma27 commented Dec 6, 2016

cool, thank you :)

@ghost
Copy link

ghost commented Apr 3, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@hashicorp hashicorp locked and limited conversation to collaborators Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants