diff --git a/MODULE.bazel b/MODULE.bazel index 9c3e82e..7b5e833 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -17,13 +17,6 @@ bazel_dep(name = "aspect_rules_js", version = "1.34.0") bazel_dep(name = "rules_nodejs", version = "5.5.3") bazel_dep(name = "platforms", version = "0.0.5") -rollup = use_extension("@aspect_rules_rollup//rollup:extensions.bzl", "rollup") -rollup.toolchain( - name = "rollup", - rollup_version = "v2.70.2", -) -use_repo(rollup, "rollup") - ####### Dev dependencies ######## bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True) diff --git a/rollup/extensions.bzl b/rollup/extensions.bzl deleted file mode 100644 index a681e35..0000000 --- a/rollup/extensions.bzl +++ /dev/null @@ -1,37 +0,0 @@ -"extensions for bzlmod" - -load(":repositories.bzl", "rollup_repositories") - -rollup_toolchain = tag_class(attrs = { - "name": attr.string(doc = "Base name for generated repositories"), - "rollup_version": attr.string(doc = "Explicit version of rollup."), - # TODO: support this variant - # "rollup_version_from": attr.string(doc = "Location of package.json which may have a version for @rollup/core."), -}) - -def _toolchain_extension(module_ctx): - registrations = {} - for mod in module_ctx.modules: - for toolchain in mod.tags.toolchain: - if toolchain.name in registrations.keys(): - if toolchain.rollup_version == registrations[toolchain.name]: - # No problem to register a matching toolchain twice - continue - fail("Multiple conflicting toolchains declared for name {} ({} and {}".format( - toolchain.name, - toolchain.rollup_version, - registrations[toolchain.name], - )) - else: - registrations[toolchain.name] = toolchain.rollup_version - for name, rollup_version in registrations.items(): - rollup_repositories( - name = name, - rollup_version = rollup_version, - register = False, - ) - -rollup = module_extension( - implementation = _toolchain_extension, - tag_classes = {"toolchain": rollup_toolchain}, -)