Treetop gemspec and dependencies

18 views
Skip to first unread message

Jerome Foret

unread,
Mar 20, 2018, 7:47:32 AM3/20/18
to Treetop Development
Hi

I'm using treetop behind docker and bundler
my package has a dependency on treetop in it's gemspec
when running
bundle exec rake install:local

in my Dockerfile to gem install my package the bunlder complains with an invalid gem specification


usr
/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/rubygems_integration.rb:64:in `rescue in validate': The gemspec at /usr/local/bundle/specifications/treetop-1.4.15.gemspec is not valid. Please fix this gemspec. (Gem::InvalidSpecificationException)
The validation error was 'duplicate dependency on polyglot (>= 0.3.1), (>= 0) use:
    add_runtime_dependency 'polyglot', '>= 0.3.1', '>= 0'
'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/rubygems_integration.rb:60:in `
validate'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/source/path.rb:158:in `validate_spec'

       
from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/source/path.rb:172:in `block in load_spec_files'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/source/path.rb:166:in `
each'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/source/path.rb:166:in `load_spec_files'

       
from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/source/path.rb:97:in `local_specs'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/source/path.rb:105:in `
specs'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:587:in `specs_for_source_changed?'

       
from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:572:in `specs_changed?'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:613:in `
block in converge_paths'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:612:in `any?'

       
from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:612:in `converge_paths'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:108:in `
initialize'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/dsl.rb:200:in `new'

       
from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/dsl.rb:200:in `to_definition'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/dsl.rb:12:in `
evaluate'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:33:in `build'

       
from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler.rb:129:in `definition'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler.rb:95:in `
setup'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/setup.rb:19:in `<top (required)>'

       
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `require'
        from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `
rescue in require'
        from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'

       
from /usr/local/bundle/bin/rake:15:in `<main>'


I had to patch my dockerfile with a sed .... 

Any way you coul'd fix this ?

Thank's a lot 
Best regards

Clifford Heath

unread,
Mar 20, 2018, 7:59:58 AM3/20/18
to treetop-dev@googlegroups.com Development
Not sure I understand the cause here, but I did a bundle update
and re-released Treetop as version 1.6.10.

Please let me know whether or not that fixes it.

Clifford Heath.
> --
> You received this message because you are subscribed to the Google Groups "Treetop Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to treetop-dev...@googlegroups.com.
> To post to this group, send email to treet...@googlegroups.com.
> Visit this group at https://groups.google.com/group/treetop-dev.
> For more options, visit https://groups.google.com/d/optout.

Jerome Foret

unread,
Mar 20, 2018, 9:10:10 AM3/20/18
to Treetop Development
thank's a lot i'll check this out 

to my understanding the cause is the fact that there are tow lines in the gemspec specifying the dependency on polyglot one with >=0 and the other with >=3.1

besides, do you think it is possible to move to activesupport ~>5.1 instead of 4.2 ?

regards

Jerome Foret

unread,
Mar 20, 2018, 9:19:23 AM3/20/18
to Treetop Development
ok ok .... my bad ... i had a legacy gem that installed the 1.4 version of treetop.... sorry for the bothering you 


On Tuesday, March 20, 2018 at 12:59:58 PM UTC+1, Clifford Heath wrote:
Reply all
Reply to author
Forward
0 new messages