-
Notifications
You must be signed in to change notification settings - Fork 6
Fix bazel compile commands syntax, use correct platform name for ARM64 #35
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
Fix bazel compile commands syntax, use correct platform name for ARM64 #35
Conversation
There, "bash" must be omitted from the call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got the old command not working with either version of bazel. Maybe this was a mixup of bazel and bazelisk. Works locally with Bazel 7.5.0 and 8.3.0
At least on MacOS, the current name does not work. platform/arm64 is correct.
There, "bash" must be omitted from the call. This also works for Bazel 8.x, so let's use that.
lurtz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With such a bugfix PR, which needs to fix what was just merged, I wonder if we should improve automated testing. E.g. when building devcontainers I used to be less concerned if the tool versions are what we expect, but more that these tools actually get the job done.
In this case toy projects with Bazel 7.5.0 an 8.3.0 might be good enough. Both could contain a small piece of Rust and C++ code which is compiled and we check that e.g. files for code completion exist.
| set -euxo pipefail | ||
|
|
||
| devcontainer build --platform linux/aarch64 --workspace-folder src/s-core-devcontainer --image-name ghcr.io/eclipse-score/devcontainer --cache-from ghcr.io/eclipse-score/devcontainer | ||
| devcontainer build --platform linux/arm64 --workspace-folder src/s-core-devcontainer --image-name ghcr.io/eclipse-score/devcontainer --cache-from ghcr.io/eclipse-score/devcontainer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make this one optional? Locally I already commented building for ARM, because I only need / use x86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No the default is to build all. If you want to do something else locally - no problem ;-)
| # Pre-install a fixed Bazel version, setup the bash command completion | ||
| export USE_BAZEL_VERSION=${bazel_version} | ||
| bazel help completion bash > /tmp/bazel-complete.bash | ||
| bazel help completion > /tmp/bazel-complete.bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why the shells set e did not cause a failure here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not fail in this case, since there Bazel 8.4.x (as specified) is always used. I changed this line only to have it consistent with the other line that had to be changed.
There was no build failure. Only the platform name was wrong, but that I could not figure out before actually using a Mac and trying to pull the image. And actually, the Mac image works fine, but all Bazel builds fail. Obviously, no one ever checked/created Bazel toolchains for |
There, "bash" must be omitted from the call. This also works for Bazel 8.x, so let's use that.
Also, the platform name must be
linux/arm64. At least for MacOS this seems to be the correct syntax.