Fix docs/_code/samples build on Apple Silicon#85
Open
alexander-yevsyukov wants to merge 1 commit into
Open
Conversation
Spine Bootstrap 1.7.0 configures the samples build to resolve third-party artifacts (protoc, the gRPC codegen plugin) from JCenter, which is shut down, and pins protoc 3.13.0 / protoc-gen-grpc-java 1.28.1 — versions that predate Apple Silicon and have no `osx-aarch_64` build at any repository. As a result `:generateProto` fails on arm64 Macs, and the JCenter reference is dead weight everywhere else. Repoint third-party resolution to Maven Central (Spine's own artifacts keep resolving from the `spine.mycloudrepo.io` repositories Bootstrap also injects), and, on arm64 macOS only, force the `osx-x86_64` protoc and gRPC binaries so they run under Rosetta 2 while staying pinned at the exact Bootstrap-selected versions — generated code is byte-for-byte identical to every other platform. Non-mac platforms keep Bootstrap's auto-detected native binary, so the Linux CI job is unaffected. Verified with `./gradlew -p docs/_code/samples clean buildAll` (compileJava, compileTestJava, and test all pass) on an arm64 Mac. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Makes the
docs/_code/samplesGradle build succeed again. Verified with./gradlew -p docs/_code/samples clean buildAll(compileJava, compileTestJava,and test all pass) on an arm64 Mac.
Why
spine.enableJava().server()(Spine Bootstrap 1.7.0, from 2020) drives allrepository and codegen-tool configuration, and two things it sets are now broken:
for third-party artifacts such as
protoc. Nothing resolves from it.protoc:3.13.0andprotoc-gen-grpc-java:1.28.1, which predate Apple Silicon — noosx-aarch_64build of either exists at any repository, so
:generateProtofails on arm64 Macs.What changed
Only
docs/_code/samples/build.gradle, afterspine.enableJava().server():BintrayJCenterrepo and addmavenCentral(). Spine's ownartifacts keep resolving from the
spine.mycloudrepo.iorepositories Bootstrapalso injects — only the third-party source is repointed.
osx-x86_64protoc and gRPC binaries(
...:osx-x86_64@exe). They run under Rosetta 2 and stay pinned at the exactBootstrap-selected versions, so generated code is identical to every other
platform. Non-mac platforms keep the auto-detected native binary, so the Linux
CI job is unaffected. Versions are unchanged — the v1 Bootstrap/protoc line is
preserved.
Reviewer notes
check-code-embedding.yml→build-embedded-coderuns
./gradlew :buildAll(root task fans out to every included build) onubuntu-latest/JDK 8. It's Linux-x86_64 only, which is why this only ever brokelocal arm64 Mac builds. This change also moves samples off the sunset JCenter,
hardening that job.
examples/hello, Bootstrap 1.9.0;examples/airport, Bootstrap 1.8.0) — both fail onprotoc-3.13.0-osx-aarch_64.Those are pinned
spine-examples/*submodules, so the equivalent fix belongsupstream and is not included here.
gradlew.batshows as modified in the working tree — an unrelated pre-existingline-ending change, deliberately left out of this PR.
🤖 Generated with Claude Code