Giter Site home page Giter Site logo

Comments (7)

eregon avatar eregon commented on June 10, 2024

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.

from concurrent-ruby.

eregon avatar eregon commented on June 10, 2024

As you can see the CI here doesn't have this problem, so it must be something specific to your environment.

from concurrent-ruby.

eregon avatar eregon commented on June 10, 2024

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.

from concurrent-ruby.

Apteryks avatar Apteryks commented on June 10, 2024

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.

from concurrent-ruby.

eregon avatar eregon commented on June 10, 2024

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.

from concurrent-ruby.

Apteryks avatar Apteryks commented on June 10, 2024

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.

from concurrent-ruby.

eregon avatar eregon commented on June 10, 2024

so not using bundle in this context is not much risk.

Right, but it indeed misses some $LOAD_PATH entries for this case:

concurrent-ruby/Gemfile

Lines 10 to 12 in 5406c1c

gem 'concurrent-ruby', Concurrent::VERSION, options
gem 'concurrent-ruby-edge', Concurrent::EDGE_VERSION, options
gem 'concurrent-ruby-ext', Concurrent::VERSION, options.merge(platform: :mri)

from concurrent-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.