Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bzlmod: Add missing experiments argument (#3443) #3663

Merged
merged 1 commit into from
Aug 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions go/private/extensions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ _download_tag = tag_class(
"goos": attr.string(),
"goarch": attr.string(),
"sdks": attr.string_list_dict(),
"experiments": attr.string_list(
doc = "Go experiments to enable via GOEXPERIMENT",
),
"urls": attr.string_list(default = ["https://dl.google.com/go/{}"]),
"version": attr.string(),
"strip_prefix": attr.string(default = "go"),
Expand All @@ -36,6 +39,9 @@ _host_tag = tag_class(
attrs = {
"name": attr.string(),
"version": attr.string(),
"experiments": attr.string_list(
doc = "Go experiments to enable via GOEXPERIMENT",
),
},
)

Expand Down Expand Up @@ -86,8 +92,10 @@ def _go_sdk_impl(ctx):
goos = download_tag.goos,
goarch = download_tag.goarch,
sdks = download_tag.sdks,
experiments = download_tag.experiments,
urls = download_tag.urls,
version = download_tag.version,
strip_prefix = download_tag.strip_prefix,
fmeum marked this conversation as resolved.
Show resolved Hide resolved
)

if (not download_tag.goos or download_tag.goos == host_detected_goos) and (not download_tag.goarch or download_tag.goarch == host_detected_goarch):
Expand Down Expand Up @@ -117,6 +125,7 @@ def _go_sdk_impl(ctx):
go_host_sdk_rule(
name = name,
version = host_tag.version,
experiments = host_tag.experiments,
)

toolchains.append(struct(
Expand Down