Closed Apteryks closed 1 year ago
The error you see is either because the C extension was not compiled or could not be loaded.
rake ci
is task :ci => [:compile, 'spec:ci']
.
So it should be compiled, and you should have a lib/concurrent-ruby/concurrent/concurrent_ruby_ext.so
.
You can debug using RUBYOPT=-d
or printing manually the error in try_load_c_extension
.
As you can see the CI here doesn't have this problem, so it must be something specific to your environment.
Also this is expected if on purpose you don't use concurrent-ruby-ext
: https://github.com/ruby-concurrency/concurrent-ruby#c-extensions-for-mri
But if you run bundle exec rake ci
it should compile it for you anyway.
I confirm the test suite passes when the C extensions are installed. I often do not use bundle because it has a tendency to inflate the dependencies needed to build the package and run the test suite or sometimes outright fail in the containerized environment for some reason.
rake
without bundle exec
is pretty risky, it's likely it picks the wrong version of something and e.g. doesn't add the correct gems on $LOAD_PATH.
The test suite expects the C extension to be built and on $LOAD_PATH (via bundle exec, or in installed gems). That's good to ensure the C ext classes are used if the C ext is there.
GNU Guix builds things in a clean environment; it exposes only the dependencies specified for the package it builds in a Linux networkless namespace (container); so not using bundle in this context is not much risk.
so not using bundle in this context is not much risk.
Right, but it indeed misses some $LOAD_PATH entries for this case: https://github.com/ruby-concurrency/concurrent-ruby/blob/5406c1c81d54042e4f1877e85f9fb1d9b5ab5d8c/Gemfile#L10-L12
Hi, running the test suite of concurrent-ruby-edge using rake ci`, I get the following failure, which is reproducible on each re-run:
Ruby 2.7.4 is used in a clean environment with the following dependencies: `ruby-concurrent-ruby@1.1.10 ruby-rake-compiler-dock@1.2.2 ruby-rake-compiler@1.1.1
Thanks!