-
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.
[7.2.0] Add support for overlays in source.json (#22525)
This is a continuation of #22155 that adds the newly added 'remote_files' attribute for http_archive to the bzlmod functionality. The end goal is to then update BCR to this new functionality to overlay files rather than use patch files when providing MODULE/WORKSPACE/BUILD files. bazelbuild/bazel-central-registry#1566 has a good discussion of the rationale. Co-authored-by: Fabian Meumertzheim <[email protected]> Closes #22349. PiperOrigin-RevId: 636682112 Change-Id: Ief070985598a7c0f427a98cd3daeb69a0984f7be Commit c4167e3 Co-authored-by: Farid Zakaria <[email protected]>
- Loading branch information
Showing
4 changed files
with
100 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -397,13 +397,15 @@ def testShowModuleAndExtensionReposFromBaseModule(self): | |
) | ||
self.assertRegex(stdout.pop(4), r'^ urls = \[".*"\],$') | ||
self.assertRegex(stdout.pop(4), r'^ integrity = ".*",$') | ||
stdout.pop(11) | ||
self.assertRegex(stdout.pop(16), r'^ path = ".*",$') | ||
stdout.pop(29) | ||
stdout.pop(39) | ||
self.assertRegex(stdout.pop(44), r'^ urls = \[".*"\],$') | ||
self.assertRegex(stdout.pop(44), r'^ integrity = ".*",$') | ||
stdout.pop(51) | ||
self.assertRegex(stdout.pop(19), r'^ path = ".*",$') | ||
# lines after 'Rule data_repo defined at (most recent call last):' | ||
stdout.pop(32) | ||
stdout.pop(42) | ||
self.assertRegex(stdout.pop(47), r'^ urls = \[".*"\],$') | ||
self.assertRegex(stdout.pop(47), r'^ integrity = ".*",$') | ||
# lines after '# Rule http_archive defined at (most recent call last):' | ||
stdout.pop(13) | ||
stdout.pop(55) | ||
self.assertListEqual( | ||
stdout, | ||
[ | ||
|
@@ -414,19 +416,21 @@ def testShowModuleAndExtensionReposFromBaseModule(self): | |
# pop(4) -- urls=[...] | ||
# pop(4) -- integrity=... | ||
' strip_prefix = "",', | ||
' remote_file_urls = {},', | ||
' remote_file_integrity = {},', | ||
' remote_patches = {},', | ||
' remote_patch_strip = 0,', | ||
')', | ||
'# Rule bar~ instantiated at (most recent call last):', | ||
'# <builtin> in <toplevel>', | ||
'# Rule http_archive defined at (most recent call last):', | ||
# pop(11) | ||
# pop(13) | ||
'', | ||
'## [email protected]:', | ||
'# <builtin>', | ||
'local_repository(', | ||
' name = "ext~",', | ||
# pop(16) -- path=... | ||
# pop(19) -- path=... | ||
')', | ||
'# Rule ext~ instantiated at (most recent call last):', | ||
'# <builtin> in <toplevel>', | ||
|
@@ -440,7 +444,7 @@ def testShowModuleAndExtensionReposFromBaseModule(self): | |
'# Rule ext~~ext~repo3 instantiated at (most recent call last):', | ||
'# <builtin> in <toplevel>', | ||
'# Rule data_repo defined at (most recent call last):', | ||
# pop(29) | ||
# pop(32) | ||
'', | ||
'## @my_repo4:', | ||
'# <builtin>', | ||
|
@@ -451,22 +455,24 @@ def testShowModuleAndExtensionReposFromBaseModule(self): | |
'# Rule ext~~ext~repo4 instantiated at (most recent call last):', | ||
'# <builtin> in <toplevel>', | ||
'# Rule data_repo defined at (most recent call last):', | ||
# pop(39) | ||
# pop(42) | ||
'', | ||
'## [email protected]:', | ||
'# <builtin>', | ||
'http_archive(', | ||
' name = "bar~",', | ||
# pop(44) -- urls=[...] | ||
# pop(44) -- integrity=... | ||
# pop(47) -- urls=[...] | ||
# pop(47) -- integrity=... | ||
' strip_prefix = "",', | ||
' remote_file_urls = {},', | ||
' remote_file_integrity = {},', | ||
' remote_patches = {},', | ||
' remote_patch_strip = 0,', | ||
')', | ||
'# Rule bar~ instantiated at (most recent call last):', | ||
'# <builtin> in <toplevel>', | ||
'# Rule http_archive defined at (most recent call last):', | ||
# pop(51) | ||
# pop(55) | ||
'', | ||
], | ||
'wrong output in the show query for module and extension-generated' | ||
|