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

sdk.bzl: include go.env since 1.21.0 #3666

Merged
merged 5 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions go/private/BUILD.sdk.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ filegroup(
"bin/go*",
"src/**",
"pkg/**",
{goenv}
sluongng marked this conversation as resolved.
Show resolved Hide resolved
]),
)

Expand Down
4 changes: 4 additions & 0 deletions go/private/sdk.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@ def _sdk_build_file(ctx, platform, version, experiments):
if not "nocoverageredesign" in experiments and not "coverageredesign" in experiments:
experiments = experiments + ["nocoverageredesign"]

# TODO(sluongng): Remove this once we drop support for Go 1.20
include_go_env = pv[1] >= 21

ctx.template(
"BUILD.bazel",
ctx.path(ctx.attr._sdk_build_file),
Expand All @@ -488,6 +491,7 @@ def _sdk_build_file(ctx, platform, version, experiments):
"{exe}": ".exe" if goos == "windows" else "",
"{version}": version,
"{experiments}": repr(experiments),
"{goenv}": "\"go.env\"," if include_go_env else "",
},
)

Expand Down