From b9907749112fb008e08c4a9308ea2f5caa6ed631 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Mon, 11 Sep 2023 10:52:50 +0200 Subject: [PATCH] fix!: restrict `graalvm` tag to the root module Unifying toolchain definitions across transitive modules is hard. By restricting the usage of this tag to the root module, we can come up with better API without breaking potential adopters in the BCR. Signed-off-by: Fabian Meumertzheim --- extensions.bzl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extensions.bzl b/extensions.bzl index b68f79f6..b6fac5a5 100644 --- a/extensions.bzl +++ b/extensions.bzl @@ -13,6 +13,8 @@ def _gvm_impl(mctx): for mod in mctx.modules: # gather gvm toolchain info for gvm in mod.tags.graalvm: + if not mod.is_root: + fail("graalvm tag is only allowed in the root module, use component tag instead") selected = gvm if len(gvm.components) > 0: all_components += [i for i in gvm.components if not i in all_components]