Skip to content

Commit

Permalink
fix!: restrict graalvm tag to the root module
Browse files Browse the repository at this point in the history
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 <fabian@meumertzhe.im>
  • Loading branch information
fmeum authored and sgammon committed Sep 11, 2023
1 parent 62e6ee1 commit b990774
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions extensions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit b990774

Please sign in to comment.