rmosolgo / graphql-ruby

Ruby implementation of GraphQL
http://graphql-ruby.org
MIT License
5.38k stars 1.39k forks source link

`bundle exec rake` fails on bootsnap dependency #1425

Closed benkimball closed 6 years ago

benkimball commented 6 years ago

I forked the graphql-ruby repository, cloned it locally and started going through the developer instructions. I did not install Ragel. Installing the gem dependencies went fine, but the rake command produced 4 errors:

/Users/zubin/code/graphql-ruby/tmp/dummy/config/boot.rb:4:in `require':
  cannot load such file -- bootsnap/setup (LoadError)
from /Users/zubin/code/graphql-ruby/tmp/dummy/config/boot.rb:4:in `<top (required)>'
from bin/rails:3:in `require_relative'
from bin/rails:3:in `<main>'

I've attached a console log showing the bundle install, exceptions, and my installed versions of Ruby (2.3.5p376) and Rails (5.2.0). I've also attached a second log showing the result of running bundle exec appraisal rake, in case its output is illuminating in some way. That log shows that all test suites passed except the without_rails gemfile, which failed because spec_helper couldn't load rails/all...? confuse

rmosolgo commented 6 years ago

This is so odd ... let me try a fresh clone.

rmosolgo commented 6 years ago

I got something similar but different:

Install, some failed tests with the same load error
~/code/graphql-ruby $ git clone git@github.com:rmosolgo/graphql-ruby.git
Cloning into 'graphql-ruby'...
remote: Counting objects: 46276, done.
remote: Compressing objects: 100% (255/255), done.
remote: Total 46276 (delta 183), reused 221 (delta 120), pack-reused 45900
Receiving objects: 100% (46276/46276), 11.43 MiB | 944.00 KiB/s, done.
Resolving deltas: 100% (34306/34306), done.
~/code/graphql-ruby $ cd graphql-ruby
~/code/graphql-ruby/graphql-ruby $ bundle install
Your Gemfile lists the gem algoliasearch-jekyll (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of one of them later.
The dependency activerecord-jdbcsqlite3-adapter (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/..............
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies.....
Using rake 11.3.0
Using concurrent-ruby 1.0.5
Using i18n 0.9.5
Using minitest 5.9.1
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Fetching activesupport 5.2.0
Installing activesupport 5.2.0
Using builder 3.2.3
Using erubi 1.7.1
Using mini_portile2 2.3.0
Using nokogiri 1.8.2
Using rails-dom-testing 2.0.3
Using crass 1.0.4
Using loofah 2.2.2
Using rails-html-sanitizer 1.0.4
Fetching actionview 5.2.0
Installing actionview 5.2.0
Using rack 2.0.4
Using rack-test 1.0.0
Fetching actionpack 5.2.0
Installing actionpack 5.2.0
Using nio4r 2.3.0
Using websocket-extensions 0.1.3
Using websocket-driver 0.7.0
Fetching actioncable 5.2.0
Installing actioncable 5.2.0
Using globalid 0.4.1
Fetching activejob 5.2.0
Installing activejob 5.2.0
Using mini_mime 1.0.0
Using mail 2.7.0
Fetching actionmailer 5.2.0
Installing actionmailer 5.2.0
Fetching activemodel 5.2.0
Installing activemodel 5.2.0
Using arel 9.0.0
Fetching activerecord 5.2.0
Installing activerecord 5.2.0
Using mimemagic 0.3.2
Using marcel 0.3.2
Fetching activestorage 5.2.0
Installing activestorage 5.2.0
Using public_suffix 3.0.2
Using addressable 2.5.2
Using httpclient 2.8.3
Using json 2.1.0
Using algoliasearch 1.19.2
Using bundler 1.16.0
Using thor 0.20.0
Using appraisal 2.1.0
Using awesome_print 1.8.0
Using verbal_expressions 0.1.5
Using algoliasearch-jekyll 0.9.1
Using ansi 1.5.0
Using ast 2.4.0
Using benchmark-ips 2.7.2
Using debug_inspector 0.0.3
Using binding_of_caller 0.8.0
Using docile 1.3.0
Using simplecov-html 0.10.2
Using simplecov 0.16.1
Using codeclimate-test-reporter 0.6.0
Using coderay 1.1.2
Using colorator 1.1.0
Using eventmachine 1.2.5
Using http_parser.rb 0.6.0
Using em-websocket 0.5.1
Using ffi 1.9.23
Using formatador 0.2.5
Using forwardable-extended 2.6.0
Using graphql 1.8.0.pre10 from source at `.`
Using rb-fsevent 0.10.3
Using rb-inotify 0.9.10
Using listen 3.0.8
Using lumberjack 1.0.13
Using nenv 0.3.0
Using shellany 0.0.1
Using notiffany 0.1.1
Using method_source 0.9.0
Using pry 0.11.3
Using guard 2.14.2
Using guard-compat 1.2.1
Using guard-bundler 2.1.0
Using guard-minitest 2.4.6
Using guard-rake 1.0.0
Using parallel 1.12.1
Using parser 2.5.1.0
Using powerpack 0.1.1
Using rainbow 3.0.0
Using ruby-progressbar 1.9.0
Fetching unicode-display_width 1.3.2
Installing unicode-display_width 1.3.2
Using rubocop 0.55.0
Using guard-rubocop 1.3.0
Using sass-listen 4.0.0
Using sass 3.5.6
Using jekyll-sass-converter 1.5.2
Using jekyll-watch 2.0.0
Using kramdown 1.16.2
Using liquid 4.0.0
Using mercenary 0.3.6
Using pathutil 0.16.1
Using rouge 3.1.1
Using safe_yaml 1.0.4
Fetching jekyll 3.8.0
Installing jekyll 3.8.0
Using memory_profiler 0.9.10
Using minitest-focus 1.1.2
Using minitest-reporters 1.2.0
Using pg 0.21.0
Using pry-stack_explorer 0.4.9.2
Using racc 1.4.14
Fetching railties 5.2.0
Installing railties 5.2.0
Using sprockets 3.7.1
Using sprockets-rails 3.2.1
Fetching rails 5.2.0
Installing rails 5.2.0
Using ruby-prof 0.17.0
Using sequel 5.7.1
Using sqlite3 1.3.13
Using yard 0.9.12
Bundle complete! 30 Gemfile dependencies, 110 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
~/code/graphql-ruby/graphql-ruby $ be rake test
Middleware that takes a next_middleware parameter is deprecated (GraphQL::Compatibility::ExecutionSpecification::SpecificationSchema::TestMiddleware); instead, accept a block and use yield.
Middleware that takes a next_middleware parameter is deprecated (GraphQL::Compatibility::ExecutionSpecification::SpecificationSchema::TestMiddleware); instead, accept a block and use yield.
warning: parser/current is loading parser/ruby24, which recognizes
warning: 2.4.4-compliant syntax, but you are running 2.4.1.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.

# Running tests with run options --seed 41132:

.............................................................../Users/rmosolgo/code/graphql-ruby/graphql-ruby/tmp/dummy/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError)
    from /Users/rmosolgo/code/graphql-ruby/graphql-ruby/tmp/dummy/config/boot.rb:4:in `'
    from bin/rails:3:in `require_relative'
    from bin/rails:3:in `
' /Users/rmosolgo/code/graphql-ruby/graphql-ruby/tmp/dummy/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError) from /Users/rmosolgo/code/graphql-ruby/graphql-ruby/tmp/dummy/config/boot.rb:4:in `' from bin/rails:3:in `require_relative' from bin/rails:3:in `
' E/Users/rmosolgo/code/graphql-ruby/graphql-ruby/tmp/dummy/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError) from /Users/rmosolgo/code/graphql-ruby/graphql-ruby/tmp/dummy/config/boot.rb:4:in `' from bin/rails:3:in `require_relative' from bin/rails:3:in `
' /Users/rmosolgo/code/graphql-ruby/graphql-ruby/tmp/dummy/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError) from /Users/rmosolgo/code/graphql-ruby/graphql-ruby/tmp/dummy/config/boot.rb:4:in `' from bin/rails:3:in `require_relative' from bin/rails:3:in `
' E................................................................................................................................................................................................................................................................................................................................................

there were several fails with the same issue. Let's see!

rmosolgo commented 6 years ago

Ok, I updated the rails gem by putting the version string in the gemfile, then I got 5.2.0 locally and got the fail.

One thing I was overlooking was where the failure is. There's an app in the test suite for testing action cable, in spec/dummy, I mistakenly thought that the error was coming from there. But then I looked again and saw it was actually coming from tmp/, which is where we generate some Rails apps in order to run our graphql-related generators inside them. So, those generated apps were loading bootsnap.

I'll see what I can do to make it not-break.