Code Monkey home page Code Monkey logo

Comments (4)

ntkme avatar ntkme commented on July 2, 2024

Linux:

Don't know how to build task 'x86_64-linux/libruby-upb.so' (See the list of available tasks with `rake --tasks`)
Did you mean?  x86_64-linux/ruby-upb.o

Mac:

Don't know how to build task 'x86_64-darwin/libruby-upb.bundle' (See the list of available tasks with `rake --tasks`)
Did you mean?  x86_64-darwin/ruby-upb.o

Windows:

Don't know how to build task 'x86_64-windows/ruby-upb.dll' (See the list of available tasks with `rake --tasks`)
Did you mean?  x86_64-windows/ruby-upb.o

I guess the tasks has been renamed in a way that is no backward compatible?

from ffi-compiler.

ntkme avatar ntkme commented on July 2, 2024

Regression is introduced by 592f1ba

The issue is that in previous version when task is created under a rake namespace, the task would still be created at top level namespace, but in new version the task is now created under the namespace:

Old version:

$ rake -C vendor/bundle/jruby/3.1.0/gems/google-protobuf-4.26.0-java/ext/google/protobuf_c --tasks
rake aarch64-darwin                           # Compile UPB library for FFI
rake aarch64-darwin/libprotobuf_c_ffi.bundle  # Build dynamic library
rake aarch64-darwin/libruby-upb.bundle        # Build dynamic library
rake clean                                    # Remove any temporary products
rake clobber                                  # Remove any generated files

New version:

$ rake -C vendor/bundle/jruby/3.1.0/gems/google-protobuf-4.26.0-java/ext/google/protobuf_c --tasks
rake aarch64-darwin                                          # Compile UPB library for FFI
rake clean                                                   # Remove any temporary products
rake clobber                                                 # Remove any generated files
rake ffi-protobuf:aarch64-darwin/libprotobuf_c_ffi.bundle    # Build dynamic library
rake ffi-protobuf:ffi-upb:aarch64-darwin/libruby-upb.bundle  # Build dynamic library

from ffi-compiler.

ntkme avatar ntkme commented on July 2, 2024

I can confirm that ffi-compiler 1.3.2 fixed this issue.

from ffi-compiler.

davispuh avatar davispuh commented on July 2, 2024

Yeah I found that aswell. It's legacy all the way... FileTask is special in Rake as it doesn't respect namespaces at all... See https://github.com/ruby/rake/blob/master/lib/rake/file_task.rb#L52
That feature shouldn't have changed anything but who could have known this 😄

I just pushed a fix and released ffi-compiler 1.3.2

Also by the way that looks like very hacky/fragile approach... https://github.com/protocolbuffers/protobuf/blob/main/ruby/lib/google/tasks/ffi.rake#L88 I mean relying on some global tasks. FFI-Compiler probably should have some API for this rather than going thru Rake. Especially because you're relying on side-effect since FFI::Compiler::CompileTask.new was already created/closed earlier.

from ffi-compiler.

Related Issues (12)

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.