Skip to content

Commit f53a3f7

Browse files
authored
Undo API-breaking change to go_sdk experiments attribute (#4210)
**What type of PR is this?** Bug fix, see #4022 (comment) **What does this PR do? Why is it needed?** Reverts the behavior to the API while keeping the optimization **Which issues(s) does this PR fix?** Fixes # **Other notes for review**
1 parent 1cfb0e2 commit f53a3f7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

go/private/rules/sdk.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def _go_sdk_impl(ctx):
2525
return [GoSDK(
2626
goos = ctx.attr.goos,
2727
goarch = ctx.attr.goarch,
28-
experiments = ctx.attr.experiments,
28+
experiments = ",".join(ctx.attr.experiments),
2929
root_file = ctx.file.root_file,
3030
package_list = package_list,
3131
libs = depset(ctx.files.libs),
@@ -47,9 +47,9 @@ go_sdk = rule(
4747
mandatory = True,
4848
doc = "The host architecture the SDK was built for",
4949
),
50-
"experiments": attr.string(
50+
"experiments": attr.string_list(
5151
mandatory = False,
52-
doc = "Comma-separated Go experiments to enable via GOEXPERIMENT",
52+
doc = "Go experiments to enable via GOEXPERIMENT",
5353
),
5454
"root_file": attr.label(
5555
mandatory = True,

go/private/sdk.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def _sdk_build_file(ctx, platform, version, experiments):
516516
"{goarch}": goarch,
517517
"{exe}": ".exe" if goos == "windows" else "",
518518
"{version}": version,
519-
"{experiments}": repr(",".join(experiments)),
519+
"{experiments}": repr(experiments),
520520
"{exec_compatible_with}": repr([
521521
GOARCH_CONSTRAINTS[goarch],
522522
GOOS_CONSTRAINTS[goos],

0 commit comments

Comments
 (0)