Closed pakosaan closed 5 days ago
I downgraded to version 2.4.0 and its woriking but hope it is fiexed soon
I should add that this issue will affect any OS due to the gem
dependency conflict on excon
.
What happened here is:
fog-core
2.6.0
just bumped the dependency on excon
from ~> 0.71
to ~> 1.0
vagrant-libvirt
depends on fog-core ~> 2
and thus now after fog/fog-core@c6bbad9, sub-dependency constraint: excon ~> 1.0
MAJOR
version constraint boundary for just excon
, while maintaining that fog-core
just incremented the MINOR
version.fog-core
's API itself has not experienced breaking changes..gemspec
, the general rule of thumb "best practice" is to keep the pessimistic version constraint operator on the major version boundary only, assuming that SemVer ensures breaking changes will increment the MAJOR
version (again, this is generally fine...)2.4.2
installation still includes the embedded version of excon
v0.112.0
: /opt/vagrant/embedded/gems/gems/excon-0.112.0/
excon ~> 1.0
, triggers here because this embedded version (0.112.0
) of the dependency doesn't satisfy the constraint: ~> 1.0
.Therefore, get this error:
Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
/opt/vagrant/embedded/lib/ruby/3.3.0/rubygems/specification.rb:2245:in `raise_if_conflicts': Unable to activate fog-core-2.6.0, because excon-0.112.0 conflicts with excon (~> 1.0)
So, while the plugins and their sub-dependencies are generally following the ideal case for specifying and bumping version constraints... due to Bundler & Ruby requiring sub-dependency gems to satisfy all the constraints, we end up with excon
straddling the MAJOR
version boundary. Thus, there's now a conflict between Vagrant's sub-dependencies and vagrant-libvirt
plugin's sub-dependencies. Unless Bundler & Ruby allowed for isolated trees of leaf sub-dependencies to have different versions across an entire project stack, we need to match the versions being used across the plugin ecosystem.
In other words: Unless Bundler & Ruby adopt a sub-dependency isolation model (e.g. similar to NPM), Vagrant + plugins will need to match compatible version constraints for their dependencies across the ecosystem.
Further details explained here
excon ~> 1.0
excon
?To figure this out, I installed the bundler-dependencies
gem and ran the following:
$ git clone https://github.com/hashicorp/vagrant.git
$ rvm gemset create vagrant
$ rvm use ruby-3.1.2@vagrant
$ bundle install
$ gem install bundler-dependencies
$ bundle dependencies find excon
1 gems depend on excon:
vagrant
* vagrant → vagrant_cloud → excon
So, the source of the dependency is vagrant_cloud
pulling in excon
.
EDIT: So, it looks like vagrant_cloud
v3.1.2
has been released, now depending on excon ~> 1.0
!
Now this just needs to bubble up into a Vagrant release and it should solve this issue! 🎉 👏
Sorry for the delay on this. As noted above, the vagrant_cloud gem was published with updated dependency constraints to loosen them and the 2.4.3 version of Vagrant has been released which will pull in this new version.
Cheers!
Debug output
Expected behavior
The plugin to be installed successfully and show it when
$ vagrant plugin list
Vagrant version
Vagrant 2.4.1
Host operating system
Steps to reproduce