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.patch
to a~> major.minor
constraint. This means that any3.x
version ofgoogle-protobuf
is allowed, as long as the minor version is at least3.19
.Doing so makes
bundle
resolve a much newer version of thegrpc
gem (on my machine, it makes it resolve1.65.1
(released in July 2024) instead of1.42.0
(released in Dec 2021)).Motivation
The older
grpc
gem version1.42.0
has a known issue that causes build failures on Apple Silicon macOS systems: grpc/grpc#35148. This is fixed in recent versions of thegrpc
gem.By using a newer version of the
grpc
gem, fresh bundle installs on Apple Silicon computers work without any workarounds/specialbundle
/clang flags needed 🎉Test plan
I ran a couple example
bundle
installs before/after the changes in this PR on my system. In between each run, I deleted theGemfile.lock
's, and then ranbundle clean --force
with everything in theGemfile
temporarily commented-out (based on this approach). I also had to manually-reinstallrake
andyard
after doing so usinggem install rake
andgem 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 thegrpc
gem's native components:Note
google-protobuf
resolving to3.19.6
andgrpc
resolving to1.48.0
.Similarly, running
bundle
in theexamples
directory has a similar gem resolution/error.With change in this PR
A fresh
bundle
run produces the following resolutions:Note
google-protobuf
resolving to3.25.4
andgrpc
resolving to1.65.1
.Similarly, running
bundle
in theexamples
directory now succeeds.