Relax version specifier for 'google-protobuf' to fix build errors on Apple Silicon machines #310
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.
Summary
This PR is a follow-up to #308 that relaxes the gem version constraint from a
~> major.minor.patchto a~> major.minorconstraint. This means that any3.xversion ofgoogle-protobufis allowed, as long as the minor version is at least3.19.Doing so makes
bundleresolve a much newer version of thegrpcgem (on my machine, it makes it resolve1.65.1(released in July 2024) instead of1.42.0(released in Dec 2021)).Motivation
The older
grpcgem version1.42.0has a known issue that causes build failures on Apple Silicon macOS systems: grpc/grpc#35148. This is fixed in recent versions of thegrpcgem.By using a newer version of the
grpcgem, fresh bundle installs on Apple Silicon computers work without any workarounds/specialbundle/clang flags needed 🎉Test plan
I ran a couple example
bundleinstalls before/after the changes in this PR on my system. In between each run, I deleted theGemfile.lock's, and then ranbundle clean --forcewith everything in theGemfiletemporarily commented-out (based on this approach). I also had to manually-reinstallrakeandyardafter doing so usinggem install rakeandgem install yard.System specifications
Without change in this PR
On a fresh run of
bundle(with no lockfile) on my machine without this PR, I get the following resolutions followed by a clang build failure of thegrpcgem's native components:Note
google-protobufresolving to3.19.6andgrpcresolving to1.48.0.Similarly, running
bundlein theexamplesdirectory has a similar gem resolution/error.With change in this PR
A fresh
bundlerun produces the following resolutions:Note
google-protobufresolving to3.25.4andgrpcresolving to1.65.1.Similarly, running
bundlein theexamplesdirectory now succeeds.