-
-
Notifications
You must be signed in to change notification settings - Fork 904
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
dep: add ruby 3.2 support #2732
Conversation
867dc05
to
22df30c
Compare
2ab9a70
to
601f90b
Compare
601f90b
to
3a631c4
Compare
Getting really close. I think only rake-compiler/rake-compiler-dock#87 is blocking us from being completely green. |
0894f7c
to
7530879
Compare
c1f36c3
to
7fdc570
Compare
7fdc570
to
1714e77
Compare
It's been a long time since I've thought about Maybe a better question is what is different when compiling ruby with |
OK, worth noting that we're jumping through hoops quite a bit with this version to make Darwin work. Here's the story, for posterity:
I'm concerned that we're now "hiding" the libxml2 and libxslt functions which may break extensions like |
To answer my own question,
|
@stevecheckoway there's additional context at rake-compiler/rake-compiler-dock#87 if you haven't seen it |
@stevecheckoway I've revised this PR to remove the |
db55183
to
841f5a5
Compare
@flavorjones I’m starting to wonder if other extensions relying on symbols exported from Nokogiri ever worked correctly. E.g., was Nokogumbo calling the correct libxml2 functions if Nokogiri was compiled with a vendored libxml2 but the system libxml2 was also loaded? |
OK, removing See https://github.com/sparklemotion/nokogiri/actions/runs/3771991414/jobs/6412764421 for the failure, notably this output:
See https://github.com/sparklemotion/nokogiri/actions/runs/3771991414/jobs/6412682822 for the build, notably this output:
Note that the linker flags used in the makefile at build time are a concatenation of
Should I also try to remove |
68cd4b4
to
6ed0579
Compare
@stevecheckoway Removing both @kateinoigakukun @larskanis can you think of a reason why we shouldn't use this approach, at least short-term until we have a more permanent fix? |
I did experiment a bit with two bundles, one of which wants to call a function defined in the other but the same symbol is also defined in dylib linked by the main executable. This is the Nokogumbo situation. It was definitely calling the wrong function. By switching from Mach-o bundles ( Actually, that's not true, a dependent extension should be able to
I think that makes sense. It doesn't solve the dependent gems problem, but if we had never solved that, this isn't worse. |
OK, well I posted a PR at stevecheckoway/bundle_test#1 to demonstrate that we can use At this point, it seems like I'm not going to get to an RC today, anyway, so maybe we can wait for other folks to chime in. |
I think I have a slight preference for the The (It looks like If we only break that compatibility on Darwin for Ruby 3.2+, it would also give us a chance to do a "scream test" to get to know who's relying on the C APIs, to understand their needs, and perhaps design a better solution with them in mind. |
FYI: ruby/ruby@c5eefb7 was reverted for Ruby 3.2 because It broke So, rbs uses |
@hsbt Thank you for telling us. I agree it's better to drop |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
The two options I know of to resolve symbol resolution on Darwin on Ruby 3.2 are described here: rake-compiler/rake-compiler-dock#92 (comment) |
note we're using snapshots from rake-compiler-dock, that will all be removed once ruby 3.2.0 ships and we can cut a rake-compiler-dock release.
> fatal: detected dubious ownership Not sure why this started, but it's annoying
this version will be changing in next rake-compiler-dock
6ed0579
to
82c3d9e
Compare
I've opted for setting I think I'm going to merge this and then cut a release candidate so people can kick the tires. |
I've written up a decision record ("ADR") for the symbol resolution workaround being adopted, it's in this PR: |
What problem is this PR intended to solve?
Have you included adequate test coverage?
Yes.
Does this change affect the behavior of either the C or the Java implementations?
Yes, the CRuby precompiled extension for Darwin Ruby 3.2 will no longer export libxml2 or lbxslt symbols. See the decision record in this PR for details.