backup/backup

`dogapi` dependency using old version of `json` gem, breaking install

mcfiredrill opened this issue · 9 comments

What went wrong?

I can't install this Gem anymore, as it has a dependency a version of the Gem dogapi that has a dependency on an older version of the json Gem which doesn't work on my version of Ruby.

What steps did you follow?

I have a Gemfile :

source 'http://rubygems.org'

#Backup related gems
gem 'backup'
gem 'dotenv'

I run bundle and get this output.

Installing json 1.8.2 with native extensions                                                                            
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
                                                                                                                                      
    current directory: /home/tony/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/json-1.8.2/ext/json/ext/generator
/home/tony/.rbenv/versions/2.7.0/bin/ruby -I /home/tony/.rbenv/versions/2.7.0/lib/ruby/2.7.0 -r ./siteconf20200511-112170-1j828kb.rb
extconf.rb 
creating Makefile                                                  
                                                                   
current directory: /home/tony/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/json-1.8.2/ext/json/ext/generator
make "DESTDIR=" clean                                                                                                                 
                                                                   
current directory: /home/tony/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/json-1.8.2/ext/json/ext/generator
make "DESTDIR="
compiling generator.c                                                                                                                 
generator.c: In function ‘generate_json’:                   
generator.c:867:25: error: ‘rb_cFixnum’ undeclared (first use in this function); did you mean ‘mFixnum’?
  867 |     } else if (klass == rb_cFixnum) {
      |                         ^~~~~~~~~~
      |                         mFixnum
generator.c:867:25: note: each undeclared identifier is reported only once for each function it appears in
generator.c:869:25: error: ‘rb_cBignum’ undeclared (first use in this function); did you mean ‘mBignum’?
  869 |     } else if (klass == rb_cBignum) {                                                                                         
      |                         ^~~~~~~~~~                                                                                            
      |                         mBignum                                                                                               
generator.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
make: *** [Makefile:245: generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/tony/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/json-1.8.2 for inspection.
Results logged to /home/tony/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/extensions/x86_64-linux/2.7.0/json-1.8.2/gem_make.out

Tell us about the computer that runs the backup gem

$ ruby -v                                             
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]               

It looks like dogapi Gem is use for a notifier, I'm guessing not everyone uses this feature. Maybe this could not be a hard requirement in the gemspec, but instead raise if the Gem is not installed?

Do you think there's a more recent version of dogapi that would depend on a more recent version of the json gem ? If there isn't, we could indeed consider dropping the hard requirement

I have the same issue. What is the current version I can install on Debian 10 without this problem at the moment ? Thanks.

I'm working on a PR with an update of all those deps. I'll need you folks (@aurels & @mcfiredrill) to test it

Okay !

In the meantime I was able to install this version : -v5.0.0.beta.2

@aurels That's weird because it has dependencies on gems which depends on the wrong json

@aurels I've released v5.0.0.beta.3
That would be lovely if you were willing to give it a spin !

Yes I'll try when I'm at my computer ;-)

@elthariel I confirm that gem install backup -v5.0.0.beta.3 passes on another Debian 10 (after installing all dev dependencies one by one). Hope it helps !