Closed francocipollone closed 1 week ago
CC: @stonier
Ah, bazel_tools
now depends on rules_cc v0.0.9
.
bazel_tools
is a dependency of bzlmod
itself but awkwardly, it's hidden (not exposed on the bazel central registry).
rules_cc v0.0.9 exists on the bazel central registry but not on ours. I'll update my registry.
I've sync'd the fork. Try again?
I've sync'd the fork. Try again? Yes, now the error changed. I think we moved forward one step:
Now complaining about rules_java@5.5.1
https://github.com/maliput/maliput_malidrive/actions/runs/6627254608/job/18015503585?pr=248
Problem 1:
That's weird, rules_java 5.5.1 exists in the fork: https://github.com/stonier/bazel-central-registry/tree/main/modules/rules_java/5.5.1.
I see the problem there is for maliput_malidrive. Did maliput build?
Problem 2:
I'm wondering what's surfacing these problems. The only thing I can think of is that the bazel version is moving, when it shouldn't be. That's running off bazel 6.4.0. The container should be pinned to 6.1.1 (see here).
Problem 1:
:heavy_check_mark: Should be fixed now. I previously synced the main
branch at https://github.com/stonier/bazel-central-registry, not the maliput_releases
branch.
Problem 2:
:question: A new local or codespace devcontainer is downloading 6.4 on the fly when I do a bazel --version
for the first time in the devcontainer. It's like it doesn't the container doesn't setup a default (i.e. it didn't make use the 6.1.1
arg set in the Dockerfile).
Problem 2:
Aha, there's an unintuitive usability surprise. There's an issue in the Dockerfile
that results in USE_BAZEL_VERSION
not being set and so, bazelisk downloads the latest.
Need to change:
################################################################################
# Configurable Arguments
################################################################################
ARG BASE_IMAGE=focal
ARG BAZEL_VERSION=6.1.1
ARG NAME=bazel-zen
################################################################################
# Base Image
################################################################################
FROM mcr.microsoft.com/devcontainers/base:${BASE_IMAGE}
to:
################################################################################
# Base Image
################################################################################
ARG BASE_IMAGE=focal
FROM mcr.microsoft.com/devcontainers/base:${BASE_IMAGE}
################################################################################
# Configuration
################################################################################
ARG BAZEL_VERSION=6.1.1
ARG NAME=bazel-zen
and then rerun the container jobs in each repo to push it to gcr
.
Can you follow up on the PR's and the actions? Thanks.
See https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
You may as well bump the default to 6.4.0
while you're at it.
Thanks for all the analysis and the detailed description! I will submit the fixes
Environment
Description
To build correctly
Fails to build
Steps to reproduce
Run bazel build ...
Output