From 77598497a06eb7f46f0ed3552049ae81bffc775d Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Mon, 11 Sep 2023 09:38:03 +0200 Subject: [PATCH] fix: remove `module_ctx.extension_metadata` In the current Bzlmod setup, all repositories generated by the `graalvm` extension may or may not be used by users and whether they should be can't be predicted based on the given tags: Users that want to generate toolchains need the `_toolchains` repo, users that rely on SDK files need the `` repo. For now, remove the use of `module_ctx.extension_metadata` so that no warning is shown when users register toolchains in `_toolchains`. In the future, we should improve the way toolchains are registered with Bzlmod by automatically registering a toolchain configured via tags. Signed-off-by: Fabian Meumertzheim --- extensions.bzl | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/extensions.bzl b/extensions.bzl index b6fac5a5..c923aa37 100644 --- a/extensions.bzl +++ b/extensions.bzl @@ -34,18 +34,6 @@ def _gvm_impl(mctx): setup_actions = selected.setup_actions, ) - _extension_meta = {} - if not mctx.root_module_has_non_dev_dependency: - _extension_meta["root_module_direct_dev_deps"] = [selected.name] - _extension_meta["root_module_direct_deps"] = [] - else: - _extension_meta["root_module_direct_deps"] = [selected.name] - _extension_meta["root_module_direct_dev_deps"] = [] - - return mctx.extension_metadata( - **_extension_meta - ) - _graalvm = tag_class(attrs = { "name": attr.string(mandatory = True), "version": attr.string(mandatory = True),