-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow module extension usages to be isolated
If `isolated = True` is specified on `use_extension`, that particular usage will be isolated from all other usages, both in the same and other modules. Module extensions can check whether they are isolated (e.g. in case they can only be used in this way) via `module_ctx.is_isolated`.
- Loading branch information
Showing
9 changed files
with
84 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -476,6 +476,7 @@ public void testModuleExtensions_good() throws Exception { | |
ModuleExtensionUsage.builder() | ||
.setExtensionBzlFile("@mymod//:defs.bzl") | ||
.setExtensionName("myext1") | ||
.setIsolated(false) | ||
.setUsingModule(myMod) | ||
.setLocation(Location.fromFileLineColumn("[email protected]/MODULE.bazel", 2, 23)) | ||
.setImports(ImmutableBiMap.of("repo1", "repo1")) | ||
|
@@ -596,6 +597,7 @@ public void testModuleExtensions_duplicateProxy_asRoot() throws Exception { | |
ModuleExtensionUsage.builder() | ||
.setExtensionBzlFile("@//:defs.bzl") | ||
.setExtensionName("myext") | ||
.setIsolated(false) | ||
.setUsingModule(ModuleKey.ROOT) | ||
.setLocation(Location.fromFileLineColumn("<root>/MODULE.bazel", 1, 23)) | ||
.setImports( | ||
|
@@ -693,6 +695,7 @@ public void testModuleExtensions_duplicateProxy_asDep() throws Exception { | |
ModuleExtensionUsage.builder() | ||
.setExtensionBzlFile("@mymod//:defs.bzl") | ||
.setExtensionName("myext") | ||
.setIsolated(false) | ||
.setUsingModule(myMod) | ||
.setLocation(Location.fromFileLineColumn("[email protected]/MODULE.bazel", 5, 23)) | ||
.setImports(ImmutableBiMap.of("beta", "beta", "delta", "delta")) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters