Closed jlambert121 closed 9 years ago
Puppet ships its own vendored "semantic" library (https://github.com/puppetlabs/puppet/tree/master/lib/puppet/vendor/semantic) which I guess conflicts with the semantic gem used by metadata-json-lint.
I saw that on the other ticket, but why does removing puppet-blacksmith then resolve the issue if that's the issue?
puppet-blacksmith is depending on Puppet's internal module tool files (in the stack you can see it's requiring puppet/module_tool). I guess if you're only using rspec-puppet (etc) then this file might never be required.
@domcleal is right.
If metadata-json-lint had a dependency on puppet (for the vendored semantic
) instead of the semantic
gem, it would work fine.
Although a long term fix would be puppet releasing their vendored semantic under a new module and gem name if it is not going to be included upstream
Im super unwilling to make the puppet gem a dependency of metadata-json-lint. That killed puppet-librarian for me. Who can we talk to about the semantic gem at puppetlabs?
@electrical thoughts?
I can do some digging when i get back from Germany.
@jlambert121 can you supply the workflow to reproduce so i can test a solution?
Cheers.
The way I found this was having in your Gemfile:
gem 'metadata-json-lint', :require => false
gem 'puppet-blacksmith', :require => false
and in your Rakefile:
require 'puppet_blacksmith/rake_tasks'
Reverting to metadata-json-lint 0.0.4 resolves the issue.
without involving blacksmith you can reproduce with
source "https://rubygems.org"
gem 'rake', :require => false
gem 'puppet', :require => false
gem 'metadata-json-lint', :require => false
Rakefile
#require 'puppet/vendor/semantic/lib/semantic'
require 'puppet'
require 'puppet/module_tool'
If you add the line commented to the beginning of your Rakefile it should workaround the issue
So we, I think, went too far with brining in our own copy of the vendored symatic/puppetlabs library. I've reverted #9 and released 0.0.6 to the forge. That should make it possible to use metadata-json-lint without issue.
When we have a more mature implementation of dependency validation, I'll be asking you all for feedback. Thanks and sorry for breaking your shit.
Something with metadata-json-lint version 0.0.5 has broken rake when puppet-blacksmith is installed. The error is:
Reverting to metadata-json-lint 0.0.4 or removing puppet-blacksmith resolves the issue. maestrodev/puppet-blacksmith#14 also exists referencing this issue.