-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Ruby: Output a single binary file per platform-specific gem #30935
base: master
Are you sure you want to change the base?
Ruby: Output a single binary file per platform-specific gem #30935
Conversation
|
…#30933 related to Ruby UCRT build.
94795cc
to
4e35e36
Compare
@apolcyn thanks for the fix in v1.49.1. Can you please still look to merge this PR? I think it will simplify things and prevent issues in the future. |
@apolcyn let's merge this one? Just want to be completely wrapped up on my GRPC work 👍 |
Sorry for the delay @johnnyshields. Aiming to go through this this week. |
@apolcyn pinging on this one. |
This issue/PR has been automatically marked as stale because it has not had any update (including commits, comments, labels, milestones, etc) for 30 days. It will be closed automatically if no further update occurs in 7 day. Thank you for your contributions! |
Fixes #30933 related to Ruby UCRT build.
Note that this reverts the UCRT CPP flag change in #31051 because it's no longer needed.
In #30933, I discovered the Ruby UCRT gem attempting to load the MSVCRT binary, and failing because that binary file is a zero-byte placeholder. Specifically, the gem root dir looks like this:
It would be possible to fix the reference so the UCRT binary is loaded (probably a C build flag issue), however...
Rather than having 3 binaries files (1 real + 2 placeholders), the most elegant solution is to only create 1 binary file for each platform-specific, named
grpc_c.ruby
, which is:For reference, the UCRT gem root dir will now look like this:
This solution unambiguously avoids loading the wrong binary, and also gets rid of a lot of cruft in the build code at the same time. Obviously we'll never need more than one
grpc_c
binary for any given platform gem.