-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)area-BzlmodBzlmod-specific PRs, issues, and feature requestsBzlmod-specific PRs, issues, and feature requeststeam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.External dependency handling, remote repositiories, WORKSPACE file.type: feature request
Description
Description of the problem / feature request:
It's often useful to use the same extension as both a production and development time dependency. eg.
# In MODULE.bazel
http = use_extension(":extensions.bzl", "http")
dev_http = use_extension(":extensions.bzl", "http", dev_dependency = True)
http.archive(
name = "prod_dep"
sha256 = "..."
urls = [ ... ],
)
dev_http.archive(
name = "dev_dep",
sha256 = "..."
urls = [ ... ],
)When one tries this, the following error is shown:
ERROR: Traceback (most recent call last):
File "<root>/MODULE.bazel", line 19, column 26, in <toplevel>
Error in use_extension: this extension is already being used at <root>/MODULE.bazel:10:22As an aside, this message not include the name of the extension which makes debugging harder.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
See above
What's the output of bazel info release?
release 5.0.0
Metadata
Metadata
Assignees
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)area-BzlmodBzlmod-specific PRs, issues, and feature requestsBzlmod-specific PRs, issues, and feature requeststeam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.External dependency handling, remote repositiories, WORKSPACE file.type: feature request