ffi / ffi-compiler

Apache License 2.0
32 stars 10 forks source link

Fix load library order #21

Closed alexeymorozov closed 2 years ago

alexeymorozov commented 2 years ago

The following method takes any file matching any pattern provided with no intentional order.

 Dir.glob("#{path}/**/{#{FFI::Platform::ARCH}-#{FFI::Platform::OS}/#{library},#{library}}")

In particular on the x86_64 Windows it chooses i386-windows/libmspack.dll instead of x86_64-windows/libmspack.dll.

This PR fixes the issue. What do you think?

Follows https://github.com/davispuh/ffi-compiler/pull/2

davispuh commented 2 years ago

Looks good! :+1:

ronaldtse commented 2 years ago

Hi @davispuh , would the PR be merged soon? We're waiting for it in metanorma/packed-mn#142 . Thanks!

davispuh commented 2 years ago

Hi @davispuh , would the PR be merged soon? We're waiting for it in metanorma/packed-mn#142 . Thanks!

Hi, while I have permissions to merge, I don't consider myself as maintainer :D So I would want that someone else takes a look too and I've no idea who even can publish releases. Maybe @enebo

ronaldtse commented 2 years ago

Thank you @davispuh ! I believe @enebo and @stakach are the releasers. https://rubygems.org/gems/ffi-compiler

Look forward to have this merged soon!

ronaldtse commented 2 years ago

Pinging @enebo and @stakach for a review. Thanks!

ronaldtse commented 2 years ago

Following up on this PR, pinging @enebo @stakach

davispuh commented 2 years ago

I just merged.

ronaldtse commented 2 years ago

Thank you @davispuh ! Now the challenge is on whether a new release is possible... Seems like only @enebo and @stakach can release?

davispuh commented 2 years ago

Yeah, I don't have permissions on RubyGems so can't. But you can just use my fork ffi-compiler2

ronaldtse commented 2 years ago

Thank you @davispuh , we are actually already using your ffi-compiler2 fork 😉

Would it be possible to update your fork to reflect this change? Thanks!

ronaldtse commented 2 years ago

Actually this was already merged to ffi-compiler2 in 2020 (https://github.com/davispuh/ffi-compiler/pull/2), thanks!