-
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
v1.49.x -- Ruby: Output a single binary file per platform-specific gem #30934
Conversation
…#30933 related to Ruby UCRT build.
@apolcyn ready for your review. |
@apolcyn any update on this? |
Thanks for the investigation, @johnnyshields. This PR looks reasonable to me. But given the size of this PR, and the fragility of the windows build, I'm a little apprehensive to merge this on 1.49. We'd need to release this change straight into a 1.49.1 patch release, without a pre-release, so we'd have more risk of breaking the whole windows build. So I'd prefer to fix the build issue, which seems to not be setting the macro correctly, if possible. That said if it's very hard, I'm fine with this as a fall back. Do you have any idea what's wrong there? The current |
@apolcyn unfortunately I've exhausted my bandwidth I can spend investigating this issue. Re: "fragility of Windows build", this PR makes it significantly less fragile IMHO by reducing complexity. I'm fine to get this either in 1.49.1 or 1.50.0. Perhaps you could cut a pre-release of a tiny version |
I think I've found the cflags issue - opened #31051. I'm backporting that and aiming to get that into 1.49.1 |
@apolcyn thank you. I'm closing this PR (1.49.x backport) however will leave the PR for master open. |
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.