You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
detect_sdk_version: Support 1.21's new VERSION file format (bazel-contrib#3600)
* detect_sdk_version: Support 1.21's new VERSION file format
Go 1.21 changes VERSION to have the Go version on the first line,
then include additional key/value pairs on subsequent lines. Right
now it only has a "time" key, but may contain others in the future.
This changes detect_sdk_version to only take the first line in the
file, rather than the entire file. This is necessary to support
Go 1.21. I tested this by changing WORKSPACE to use "go1.21rc2".
Fixes:
ERROR: .../rules_go/WORKSPACE:8:23: fetching go_download_sdk_rule rule //external:go_sdk: Traceback (most recent call last):
File ".../rules_go/go/private/sdk.bzl", line 120, column 43, in _go_download_sdk_impl
detected_version = _detect_sdk_version(ctx, ".")
File ".../rules_go/go/private/sdk.bzl", line 550, column 17, in _detect_sdk_version
fail("SDK is version %s, but version %s was expected" % (version, ctx.attr.version))
Error in fail: SDK is version 1.21rc2
time 2023-06-21T02:00:01Z
, but version 1.21rc2 was expected
* clarify the string manipulation operation
0 commit comments