-
Notifications
You must be signed in to change notification settings - Fork 10
Do not use require_relative with native extension #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
I successfully tested it against our |
|
Thanks @Annih, it looks like there are some test failures. Can you look? |
|
OK @bryanp I'm checking, but this does not seem related to my change (I tested in local with and without my change I reproduce 100%) |
|
From my quick investigation the issue comes from |
|
OK so the project I will submit a pin of |
a3ef322 to
fc30831
Compare
|
@bryanp could you approve the workfow to validate it works well with the pin? |
|
Apologies @Annih, I got busy 😅 Just approved the workflow. Tests pass now but one minor linter issue. |
Replace `require_relative "../llhttp_ext"` by `require "llhttp_ext"` to load the native extension. This improves compatibility with Bundler and RubyGems, especially in environments using `bundle install --standalone` or other setups where the extension may not be located relative to the Ruby file. Using `require` ensures the extension is loaded from the load path, following RubyGems best practices for native extensions.
This commit is mostly here to demonstrate the tests are passing with this version of io-event. A refactor of the tests might be required.
fc30831 to
989ead6
Compare
|
No problem @bryanp I was busy too :) I should have fixed the linter issue! |
Replace
require_relative "../llhttp_ext"byrequire "llhttp_ext"to load the native extension.This improves compatibility with Bundler and RubyGems, especially in environments using
bundle install --standaloneor other setups where the extension may not be located relative to the Ruby file.Using
requireensures the extension is loaded from the load path, following RubyGems best practices for native extensions.Fix #33