lutaml / expressir

Ruby parser for the ISO EXPRESS language
3 stars 3 forks source link

tzinfo versioning problem #20

Closed opoudjis closed 3 years ago

opoudjis commented 3 years ago

While metanorma does not use tzinfo directly, it uses gems that do, such as twitter_cldr

Activesupport is using tzinfo 1.1, and will only use 2.0 as of 6.1, which has only been pre-released a week ago.

While my Gemfile.lock seems to have dealt with tzinfo correctly (1.2.8), I've just started getting errors like this:

Traceback (most recent call last):
    10: from /Users/nickn/.rvm/gems/ruby-2.6.6/bin/asciidoctor:23:in `<main>'
     9: from /Users/nickn/.rvm/gems/ruby-2.6.6/bin/asciidoctor:23:in `load'
     8: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/asciidoctor-2.0.12/bin/asciidoctor:13:in `<top (required)>'
     7: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/asciidoctor-2.0.12/bin/asciidoctor:13:in `new'
     6: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/asciidoctor-2.0.12/lib/asciidoctor/cli/invoker.rb:24:in `initialize'
     5: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/asciidoctor-2.0.12/lib/asciidoctor/cli/options.rb:34:in `parse!'
     4: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/asciidoctor-2.0.12/lib/asciidoctor/cli/options.rb:274:in `parse!'
     3: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/asciidoctor-2.0.12/lib/asciidoctor/cli/options.rb:274:in `each'
     2: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/asciidoctor-2.0.12/lib/asciidoctor/cli/options.rb:276:in `block in parse!'
     1: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- metanorma-iso (LoadError)
    44: from /Users/nickn/.rvm/gems/ruby-2.6.6/bin/asciidoctor:23:in `<main>'
    43: from /Users/nickn/.rvm/gems/ruby-2.6.6/bin/asciidoctor:23:in `load'
    42: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/asciidoctor-2.0.12/bin/asciidoctor:13:in `<top (required)>'
    41: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/asciidoctor-2.0.12/bin/asciidoctor:13:in `new'
    40: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/asciidoctor-2.0.12/lib/asciidoctor/cli/invoker.rb:24:in `initialize'
    39: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/asciidoctor-2.0.12/lib/asciidoctor/cli/options.rb:34:in `parse!'
    38: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/asciidoctor-2.0.12/lib/asciidoctor/cli/options.rb:274:in `parse!'
    37: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/asciidoctor-2.0.12/lib/asciidoctor/cli/options.rb:274:in `each'
    36: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/asciidoctor-2.0.12/lib/asciidoctor/cli/options.rb:276:in `block in parse!'
    35: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
    34: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
    33: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
    32: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/metanorma-iso-1.5.12/lib/metanorma-iso.rb:2:in `<top (required)>'
    31: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/metanorma-iso-1.5.12/lib/metanorma-iso.rb:2:in `require_relative'
    30: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/metanorma-iso-1.5.12/lib/asciidoctor/iso/converter.rb:2:in `<top (required)>'
    29: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:117:in `require'
    28: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:117:in `require'
    27: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/metanorma-standoc-1.6.3/lib/metanorma-standoc.rb:3:in `<top (required)>'
    26: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/metanorma-standoc-1.6.3/lib/metanorma-standoc.rb:3:in `require_relative'
    25: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/metanorma-standoc-1.6.3/lib/asciidoctor/standoc/converter.rb:15:in `<top (required)>'
    24: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/metanorma-standoc-1.6.3/lib/asciidoctor/standoc/converter.rb:15:in `require_relative'
    23: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/metanorma-standoc-1.6.3/lib/asciidoctor/standoc/macros.rb:9:in `<top (required)>'
    22: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in `require'
    21: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in `require'
    20: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/metanorma-plugin-lutaml-0.1.0/lib/metanorma-plugin-lutaml.rb:2:in `<top (required)>'
    19: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in `require'
    18: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in `require'
    17: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/metanorma-plugin-lutaml-0.1.0/lib/metanorma/plugin/lutaml/lutaml_preprocessor.rb:6:in `<top (required)>'
    16: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in `require'
    15: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in `require'
    14: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/lutaml-0.3.0/lib/lutaml.rb:2:in `<top (required)>'
    13: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in `require'
    12: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in `require'
    11: from /Users/nickn/.rvm/gems/ruby-2.6.6/gems/lutaml-0.3.0/lib/lutaml/parser.rb:1:in `<top (required)>'
    10: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:113:in `require'
     9: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
     8: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
     7: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
     6: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/specification.rb:1452:in `block in activate_dependencies'
     5: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
     4: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
     3: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
     2: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/specification.rb:1452:in `block in activate_dependencies'
     1: from /Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/specification.rb:1418:in `activate'
/Users/nickn/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/specification.rb:2302:in `raise_if_conflicts': Unable to activate activesupport-5.2.4.4, because tzinfo-2.0.0 conflicts with tzinfo (~> 1.1) (Gem::ConflictError)

And the only way I could get rid of them was to uninstall tzinfo 2.0.* from my machine.

This is not great. Moreover, broad-ranging gems like activesupport will tend to introduce such compatibility problems.

i don't know if much can be done with this. My preference would be to remove the dependency on activesupport, and the upgrade to activesupport 6.1 is going to take some weeks.

To replicate, check out any metanorma flavour, e.g. metanorma-iso, and compile a document, e.g. asciidoctor --trace -b iso -r metanorma-iso a.adoc on the attached.

a.adoc.zip

w00lf commented 3 years ago

It turns out that expressir does not use ActiveSupport features, I have removed it from deps.

opoudjis commented 3 years ago

Thank you!