From 0eebf498a6564ee29ab8ef17ce98430dfd9fd1f8 Mon Sep 17 00:00:00 2001 From: tomsht01 Date: Sun, 2 Feb 2025 16:56:31 +0200 Subject: [PATCH] fix: add bazel 8 support --- .gitlab-ci.yml | 1 + labgrid/config/rule.bzl | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e8a5875..cd8ae8e0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,7 @@ include: versions: - 7.4.0 - 7.x + - 8.x # FIXME: enable remote builds #- component: "${CI_SERVER_HOST}/ci/component/bazelisk/config@v1.2.0" # inputs: diff --git a/labgrid/config/rule.bzl b/labgrid/config/rule.bzl index ede3586c..a79a0f9f 100644 --- a/labgrid/config/rule.bzl +++ b/labgrid/config/rule.bzl @@ -91,12 +91,12 @@ ATTRS = { def _expand(ctx, data, value): value = value.replace("$(location", "$(rlocationpath") value = ctx.expand_location(value, targets = data) + separator = ctx.label.repo_name[-1] for k, v in ctx.var.items(): - value = value.replace("$({})".format(k), _runfile(v)) + value = value.replace("$({})".format(k), _runfile(v, separator)) return value -# FIXME: separator changes to `+` on Bazel 8+ -def _runfile(value, separator = "~"): +def _runfile(value, separator): # Non-runfile value if not value.startswith("bazel-out/"): return value -- GitLab