emyl / vagrant-triggers

Allow the definition of arbitrary scripts that will run on the host before and/or after Vagrant commands.
MIT License
546 stars 35 forks source link

Fix Vagrant 1.9+ compatibility. #90

Closed voxik closed 6 years ago

voxik commented 7 years ago

Vagrant 1.9+ is not using Bundler for management of its dependencies, so drop the Bundler dependency.

This might compatible with Vagrant 1.7.2+. On the other hand, the missing dependency might be problem for Vagrant < 1.9

emyl commented 7 years ago

Thanks for the contribution!

It's not completely clear to me what benefit this change could bring, could you please clarify?

voxik commented 7 years ago

I am afraid, that since Vagrant is not using Bundler for its dependency management anymore, the Bundler.with_clean_env might have some side-effects. For example, I suspect that it might have something to do with #89

id-anderson commented 6 years ago
$ vagrant up
Installing the 'vagrant-triggers' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

conflicting dependencies rb-fsevent (= 0.10.2) and rb-fsevent (= 0.9.8)
  Activated rb-fsevent-0.9.8
  which does not match conflicting dependency (= 0.10.2)

  Conflicting dependency chains:
    rb-fsevent (= 0.9.8), 0.9.8 activated

  versus:
    rb-fsevent (= 0.10.2)

  Gems matching rb-fsevent (= 0.10.2):
    rb-fsevent-0.10.2
id-anderson commented 6 years ago

Hope that helps clarify things!

id-anderson commented 6 years ago

Hey guys, just checking in on this "Pull Request" - it fixes a critical issue that my team is experiencing with this wonderful plugin. Any updates? It's kind of a bummer that this plugin doesn't work with modern version of Vagrant that a lot of people are using.

id-anderson commented 6 years ago

Is this project dead? I'm going to advise my developers to fork it so that we can move forward. Thanks!

emyl commented 6 years ago

@id-anderson it's not dead, it's open source. That is, best effort. See also https://github.com/emyl/vagrant-triggers/issues/85.

If you want to take over, you're very welcome. Just let me know. Emiliano

brethash commented 6 years ago

@emyl I'd be happy to step in as a maintainer on this project as I've used it on several projects. LMK!

brethash commented 6 years ago

After doing some research, it appears that that Vagrant::Util::Env.with_clean_env was introduced at 1.7.0. Vagrant v1.7.0 was released on Nov 8, 2014. I feel like roughly 3.5 years is a reasonable amount of time to allow for compatibility updates. Hence, I'm merging this PR and will set the minimum Vagrant version requirement in the Readme to reflect this updated requirement.

https://github.com/hashicorp/vagrant/commit/f86189a2fecc32d9ffd7d8d6b46f12d372d5e28a#diff-2ff5214f9c8f6e3cfa58f32f33c4d3e0

brethash commented 6 years ago

Also thanks @voxik for your work!

voxik commented 6 years ago

YAW