Ruby: Output a single binary file per platform-specific gem#30935
Open
johnnyshields wants to merge 1 commit intogrpc:masterfrom
Open
Ruby: Output a single binary file per platform-specific gem#30935johnnyshields wants to merge 1 commit intogrpc:masterfrom
johnnyshields wants to merge 1 commit intogrpc:masterfrom
Conversation
|
|
…#30933 related to Ruby UCRT build.
94795cc to
4e35e36
Compare
Contributor
Author
|
@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. |
Contributor
Author
|
@apolcyn let's merge this one? Just want to be completely wrapped up on my GRPC work 👍 |
Contributor
|
Sorry for the delay @johnnyshields. Aiming to go through this this week. |
Contributor
Author
|
@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! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_cbinary for any given platform gem.