Skip to content

Commit 508168a

Browse files
committed
fix: replace set with list for Bazel 7 compatibility
The 'set' data type is not available in Bazel 7 module extensions. This change replaces the usage of 'set' with a 'list' to store browser versions, ensuring compatibility. Uniqueness is maintained by checking if a version is already in the list before appending.
1 parent 21c730b commit 508168a

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

browsers/extensions.bzl

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,22 @@ def _resolve_latest_version(name, versions):
2121
return use_version
2222

2323
def _browsers_impl(ctx):
24-
chrome_versions = set()
25-
chromedriver_versions = set()
26-
firefox_versions = set()
24+
chrome_versions = []
25+
chromedriver_versions = []
26+
firefox_versions = []
2727

2828
for mod in ctx.modules:
2929
for tag in mod.tags.chrome:
30-
chrome_versions.add(tag.version)
30+
if tag.version not in chrome_versions:
31+
chrome_versions.append(tag.version)
3132

3233
for tag in mod.tags.chromedriver:
33-
chromedriver_versions.add(tag.version)
34+
if tag.version not in chromedriver_versions:
35+
chromedriver_versions.append(tag.version)
3436

3537
for tag in mod.tags.firefox:
36-
firefox_versions.add(tag.version)
38+
if tag.version not in firefox_versions:
39+
firefox_versions.append(tag.version)
3740

3841
if len(chrome_versions) > 0:
3942
define_chrome_repositories(_resolve_latest_version("Chrome", chrome_versions))

0 commit comments

Comments
 (0)