Skip to content
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

rb_io_wait is declared but not implemented #2564

Closed
larskanis opened this issue Jan 9, 2022 · 5 comments
Closed

rb_io_wait is declared but not implemented #2564

larskanis opened this issue Jan 9, 2022 · 5 comments
Assignees

Comments

@larskanis
Copy link
Contributor

Truffleruby on the master branch declares rb_io_wait but doesn't implement it. It also defines RUBY_IO_READABLE without using it.

This issue leads to a build error in ruby-pg here. The extconf.rb tests for rb_io_wait and doesn't detect it, so that it enables a polyfill instead. This polyfill usually works on truffleruby, but conflicts on the definition of the function and the enum.

Truffleruby-head is currently disabled in ruby-pg, but the latest truffleruby release runs successfully.

@eregon
Copy link
Member

eregon commented Jan 10, 2022

@aardvark179 is working on implementing rb_io_wait.

The current conflict is unfortunate but expected: we import headers from CRuby, changed as little as possible to keep it maintainable.
have_func correctly detects it's not implemented, so the only issue here is those conflicts.

@larskanis
Copy link
Contributor Author

OK, so the next release will implement rb_io_wait and the current inconsistent state is just temporary.

The polyfill in ruby-pg is here, just in case it's interesting. But sure, a complete implementation needs proper integration into Fiber.scheduler, far beyond the simple polyfill.

@eregon eregon added this to the 22.1.0 milestone Jan 10, 2022
@eregon
Copy link
Member

eregon commented Jan 10, 2022

Maybe a simple workaround here is to do some renames/prefix for the polyfill?
I think that would be the fastest to solve this specific issue.

(We're also working on the Fiber scheduler, not merged yet)

larskanis added a commit to larskanis/ruby-pg that referenced this issue Jan 10, 2022
…ffleruby-head on its road to ruby-3.0 compatibility

This rename was suggested here: oracle/truffleruby#2564 (comment)

It still fails in the specs, since truffleruby-head claims to be ruby-3.0 but doesn't implement Fiber.scheduler so far.
@larskanis
Copy link
Contributor Author

OK, I prefixed the function and enums in commit ged/ruby-pg@ec09240 so that the build and all non-scheduler tests succeed.

@eregon eregon modified the milestones: 22.1.0, 22.2.0 Apr 25, 2022
@eregon eregon removed this from the 22.2.0 milestone Oct 26, 2022
@eregon eregon assigned eregon and unassigned aardvark179 Oct 26, 2022
@larskanis
Copy link
Contributor Author

rb_io_wait has been implemented in commit 58aea01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants