If pluginator searches for a file that was removed, it may find it in an older version.
Scenario: gem foo has a file called bar.rb in version 2.0. In version 3.0 the file bar.rb is removed.
The user still has both versions of the gem installed 2.0 and 3.0. When scanning for files, pluginator finds many files associated with the gem at version 3.0. However, when it comes to bar.rb, it does not find the file in version 3.0, but it does find the file in version 2.0.
When we try to activate the foo gem version 2.0, an error is raised:
~/.rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1986:in `raise_if_conflicts': can't activate foo-2.0, already activated foo-3.0 (Gem::LoadError)
from ~/.rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1235:in `activate'
from ~/.gem/ruby/2.0.0/gems/pluginator-1.0.1/lib/pluginator/autodetect.rb:52:in `load_plugin'
If pluginator searches for a file that was removed, it may find it in an older version.
Scenario: gem
foo
has a file calledbar.rb
in version2.0
. In version3.0
the filebar.rb
is removed.The user still has both versions of the gem installed
2.0
and3.0
. When scanning for files, pluginator finds many files associated with the gem at version3.0
. However, when it comes tobar.rb
, it does not find the file in version3.0
, but it does find the file in version2.0
.When we try to activate the
foo
gem version2.0
, an error is raised:cf: https://github.com/jish/pre-commit/issues/129