-
-
Notifications
You must be signed in to change notification settings - Fork 699
detect_sdk_version: Support 1.21's new VERSION file format #3600
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
fmeum
reviewed
Jun 22, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sending a quick fix. This works well, just left a style comment.
fmeum
approved these changes
Jun 22, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
xhebox
pushed a commit
to xhebox/rules_go
that referenced
this pull request
Jul 7, 2023
…trib#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
renovate bot
referenced
this pull request
in cgrindel/bazel-starlib
Jul 10, 2023
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [io_bazel_rules_go](https://togithub.com/bazelbuild/rules_go) | http_archive | minor | `v0.40.1` -> `v0.41.0` | --- ### Release Notes <details> <summary>bazelbuild/rules_go (io_bazel_rules_go)</summary> ### [`v0.41.0`](https://togithub.com/bazelbuild/rules_go/releases/tag/v0.41.0) [Compare Source](https://togithub.com/bazelbuild/rules_go/compare/v0.40.1...v0.41.0) #### What's Changed Starting this release, rules_go no longer ship with `@go_googleapis` repo. Together with Gazelle v0.32.0, it means that all Go code importing generated code from Google APIs will depend on `@org_golang_google_genproto`, which is resolved by Go modules. For proto files importing Google APIs proto, people needs to: 1. Add an `http_archive` rule to download Google APIs, e.g., <!----> http_archive( name = "googleapis", sha256 = "9d1a930e767c93c825398b8f8692eca3fe353b9aaadedfbcf1fca2282c85df88", strip_prefix = "googleapis-64926d52febbf298cb82a8f472ade4a3969ba922", urls = [ "https://github.com/googleapis/googleapis/archive/64926d52febbf298cb82a8f472ade4a3969ba922.zip", ], ) 2. Resolve the proto manually. If Gazelle is being used, directives like this needs to be added to a parent directory of the proto files: <!----> ### gazelle:resolve proto proto google/rpc/status.proto @​googleapis//google/rpc:status_proto ### gazelle:resolve proto go google/rpc/status.proto @​org_golang_google_genproto//googleapis/rpc/status ### gazelle:resolve proto google/longrunning/operations.proto @​googleapis//google/longrunning:operations_proto ### gazelle:resolve proto go google/longrunning/operations.proto @​org_golang_google_genproto//googleapis/longrunning Other changes included in this release - detect_sdk_version: Support 1.21's new VERSION file format by [@​evanj](https://togithub.com/evanj) in [https://github.com/bazelbuild/rules_go/pull/3600](https://togithub.com/bazelbuild/rules_go/pull/3600) - stdlib: Do not pass -static to cgo by [@​zecke](https://togithub.com/zecke) in [https://github.com/bazelbuild/rules_go/pull/3593](https://togithub.com/bazelbuild/rules_go/pull/3593) - Expand stdlib packages when queried by [@​JamyDev](https://togithub.com/JamyDev) in [https://github.com/bazelbuild/rules_go/pull/3606](https://togithub.com/bazelbuild/rules_go/pull/3606) - Fix stdlib file outputs pointing to processwrapper by [@​JamyDev](https://togithub.com/JamyDev) in [https://github.com/bazelbuild/rules_go/pull/3608](https://togithub.com/bazelbuild/rules_go/pull/3608) - Fix `go_sdk` extension failure for unnamed root module by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3612](https://togithub.com/bazelbuild/rules_go/pull/3612) - Adding Uber's hermetic cc toolchain for tests by [@​linzhp](https://togithub.com/linzhp) in [https://github.com/bazelbuild/rules_go/pull/3609](https://togithub.com/bazelbuild/rules_go/pull/3609) - Implement functionality to skip tests via TESTBRIDGE_TEST_ONLY env by [@​yushan26](https://togithub.com/yushan26) in [https://github.com/bazelbuild/rules_go/pull/3618](https://togithub.com/bazelbuild/rules_go/pull/3618) **Full Changelog**: bazel-contrib/rules_go@v0.40.1...v0.41.0 #### `WORKSPACE` code load("@​bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", "https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", ], ) load("@​io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") go_rules_dependencies() go_register_toolchains(version = "1.20.5") </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/cgrindel/bazel-starlib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi41LjMiLCJ1cGRhdGVkSW5WZXIiOiIzNi41LjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot
referenced
this pull request
in kreempuff/rules_unreal_engine
Jul 11, 2023
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [io_bazel_rules_go](https://togithub.com/bazelbuild/rules_go) | http_archive | minor | `v0.40.1` -> `v0.41.0` | --- ### ⚠ Dependency Lookup Warnings ⚠ Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>bazelbuild/rules_go (io_bazel_rules_go)</summary> ### [`v0.41.0`](https://togithub.com/bazelbuild/rules_go/releases/tag/v0.41.0) [Compare Source](https://togithub.com/bazelbuild/rules_go/compare/v0.40.1...v0.41.0) ##### What's Changed Starting this release, rules_go no longer ship with `@go_googleapis` repo. Together with Gazelle v0.32.0, it means that all Go code importing generated code from Google APIs will depend on `@org_golang_google_genproto`, which is resolved by Go modules. For proto files importing Google APIs proto, people needs to: 1. Add an `http_archive` rule to download Google APIs, e.g., <!----> http_archive( name = "googleapis", sha256 = "9d1a930e767c93c825398b8f8692eca3fe353b9aaadedfbcf1fca2282c85df88", strip_prefix = "googleapis-64926d52febbf298cb82a8f472ade4a3969ba922", urls = [ "https://github.com/googleapis/googleapis/archive/64926d52febbf298cb82a8f472ade4a3969ba922.zip", ], ) 2. Resolve the proto manually. If Gazelle is being used, directives like this needs to be added to a parent directory of the proto files: <!----> ##### gazelle:resolve proto proto google/rpc/status.proto @​googleapis//google/rpc:status_proto ##### gazelle:resolve proto go google/rpc/status.proto @​org_golang_google_genproto//googleapis/rpc/status ##### gazelle:resolve proto google/longrunning/operations.proto @​googleapis//google/longrunning:operations_proto ##### gazelle:resolve proto go google/longrunning/operations.proto @​org_golang_google_genproto//googleapis/longrunning Other changes included in this release - detect_sdk_version: Support 1.21's new VERSION file format by [@​evanj](https://togithub.com/evanj) in [https://github.com/bazelbuild/rules_go/pull/3600](https://togithub.com/bazelbuild/rules_go/pull/3600) - stdlib: Do not pass -static to cgo by [@​zecke](https://togithub.com/zecke) in [https://github.com/bazelbuild/rules_go/pull/3593](https://togithub.com/bazelbuild/rules_go/pull/3593) - Expand stdlib packages when queried by [@​JamyDev](https://togithub.com/JamyDev) in [https://github.com/bazelbuild/rules_go/pull/3606](https://togithub.com/bazelbuild/rules_go/pull/3606) - Fix stdlib file outputs pointing to processwrapper by [@​JamyDev](https://togithub.com/JamyDev) in [https://github.com/bazelbuild/rules_go/pull/3608](https://togithub.com/bazelbuild/rules_go/pull/3608) - Fix `go_sdk` extension failure for unnamed root module by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3612](https://togithub.com/bazelbuild/rules_go/pull/3612) - Adding Uber's hermetic cc toolchain for tests by [@​linzhp](https://togithub.com/linzhp) in [https://github.com/bazelbuild/rules_go/pull/3609](https://togithub.com/bazelbuild/rules_go/pull/3609) - Implement functionality to skip tests via TESTBRIDGE_TEST_ONLY env by [@​yushan26](https://togithub.com/yushan26) in [https://github.com/bazelbuild/rules_go/pull/3618](https://togithub.com/bazelbuild/rules_go/pull/3618) **Full Changelog**: bazel-contrib/rules_go@v0.40.1...v0.41.0 ##### `WORKSPACE` code load("@​bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", "https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", ], ) load("@​io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") go_rules_dependencies() go_register_toolchains(version = "1.20.5") </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/kreempuff/rules_unreal_engine). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi41LjMiLCJ1cGRhdGVkSW5WZXIiOiIzNi41LjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->
renovate bot
referenced
this pull request
in cgrindel/rules_swift_package_manager
Jul 11, 2023
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [io_bazel_rules_go](https://togithub.com/bazelbuild/rules_go) | http_archive | minor | `v0.40.1` -> `v0.41.0` | --- ### Release Notes <details> <summary>bazelbuild/rules_go (io_bazel_rules_go)</summary> ### [`v0.41.0`](https://togithub.com/bazelbuild/rules_go/releases/tag/v0.41.0) [Compare Source](https://togithub.com/bazelbuild/rules_go/compare/v0.40.1...v0.41.0) #### What's Changed Starting this release, rules_go no longer ship with `@go_googleapis` repo. Together with Gazelle v0.32.0, it means that all Go code importing generated code from Google APIs will depend on `@org_golang_google_genproto`, which is resolved by Go modules. For proto files importing Google APIs proto, people needs to: 1. Add an `http_archive` rule to download Google APIs, e.g., <!----> http_archive( name = "googleapis", sha256 = "9d1a930e767c93c825398b8f8692eca3fe353b9aaadedfbcf1fca2282c85df88", strip_prefix = "googleapis-64926d52febbf298cb82a8f472ade4a3969ba922", urls = [ "https://github.com/googleapis/googleapis/archive/64926d52febbf298cb82a8f472ade4a3969ba922.zip", ], ) 2. Resolve the proto manually. If Gazelle is being used, directives like this needs to be added to a parent directory of the proto files: <!----> ### gazelle:resolve proto proto google/rpc/status.proto @​googleapis//google/rpc:status_proto ### gazelle:resolve proto go google/rpc/status.proto @​org_golang_google_genproto//googleapis/rpc/status ### gazelle:resolve proto google/longrunning/operations.proto @​googleapis//google/longrunning:operations_proto ### gazelle:resolve proto go google/longrunning/operations.proto @​org_golang_google_genproto//googleapis/longrunning Other changes included in this release - detect_sdk_version: Support 1.21's new VERSION file format by [@​evanj](https://togithub.com/evanj) in [https://github.com/bazelbuild/rules_go/pull/3600](https://togithub.com/bazelbuild/rules_go/pull/3600) - stdlib: Do not pass -static to cgo by [@​zecke](https://togithub.com/zecke) in [https://github.com/bazelbuild/rules_go/pull/3593](https://togithub.com/bazelbuild/rules_go/pull/3593) - Expand stdlib packages when queried by [@​JamyDev](https://togithub.com/JamyDev) in [https://github.com/bazelbuild/rules_go/pull/3606](https://togithub.com/bazelbuild/rules_go/pull/3606) - Fix stdlib file outputs pointing to processwrapper by [@​JamyDev](https://togithub.com/JamyDev) in [https://github.com/bazelbuild/rules_go/pull/3608](https://togithub.com/bazelbuild/rules_go/pull/3608) - Fix `go_sdk` extension failure for unnamed root module by [@​fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3612](https://togithub.com/bazelbuild/rules_go/pull/3612) - Adding Uber's hermetic cc toolchain for tests by [@​linzhp](https://togithub.com/linzhp) in [https://github.com/bazelbuild/rules_go/pull/3609](https://togithub.com/bazelbuild/rules_go/pull/3609) - Implement functionality to skip tests via TESTBRIDGE_TEST_ONLY env by [@​yushan26](https://togithub.com/yushan26) in [https://github.com/bazelbuild/rules_go/pull/3618](https://togithub.com/bazelbuild/rules_go/pull/3618) **Full Changelog**: bazel-contrib/rules_go@v0.40.1...v0.41.0 #### `WORKSPACE` code load("@​bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", "https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", ], ) load("@​io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") go_rules_dependencies() go_register_toolchains(version = "1.20.5") </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/cgrindel/rules_swift_package_manager). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi41LjMiLCJ1cGRhdGVkSW5WZXIiOiIzNi41LjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
simontoens
pushed a commit
to simontoens/rules_go
that referenced
this pull request
Oct 17, 2023
…trib#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
jwendell
added a commit
to jwendell/envoy
that referenced
this pull request
Jun 26, 2024
This version contains the fix for using local sdk with go >= 1.21 bazel-contrib/rules_go#3600 Signed-off-by: Jonh Wendell <[email protected]>
jwendell
added a commit
to jwendell/envoy
that referenced
this pull request
Jun 26, 2024
This version contains the fix for using local sdk with go >= 1.21 bazel-contrib/rules_go#3600 Signed-off-by: Jonh Wendell <[email protected]>
jwendell
added a commit
to jwendell/envoy
that referenced
this pull request
Jun 26, 2024
This version contains the fix for using local sdk with go >= 1.21 bazel-contrib/rules_go#3600 Signed-off-by: Jonh Wendell <[email protected]>
jwendell
added a commit
to jwendell/envoy-openssl
that referenced
this pull request
Jun 27, 2024
This version contains the fix for using local sdk with go >= 1.21 bazel-contrib/rules_go#3600 Signed-off-by: Jonh Wendell <[email protected]>
dcillera
pushed a commit
to dcillera/envoy-openssl
that referenced
this pull request
Jul 15, 2024
This version contains the fix for using local sdk with go >= 1.21 bazel-contrib/rules_go#3600 Signed-off-by: Jonh Wendell <[email protected]>
dcillera
pushed a commit
to dcillera/envoy-openssl
that referenced
this pull request
Aug 5, 2024
This version contains the fix for using local sdk with go >= 1.21 bazel-contrib/rules_go#3600 Signed-off-by: Jonh Wendell <[email protected]>
dcillera
pushed a commit
to dcillera/envoy-openssl
that referenced
this pull request
Aug 13, 2024
This version contains the fix for using local sdk with go >= 1.21 bazel-contrib/rules_go#3600 Signed-off-by: Jonh Wendell <[email protected]>
dcillera
pushed a commit
to dcillera/envoy-openssl
that referenced
this pull request
Aug 14, 2024
This version contains the fix for using local sdk with go >= 1.21 bazel-contrib/rules_go#3600 Signed-off-by: Jonh Wendell <[email protected]>
dcillera
pushed a commit
to dcillera/envoy-openssl
that referenced
this pull request
Aug 29, 2024
This version contains the fix for using local sdk with go >= 1.21 bazel-contrib/rules_go#3600 Signed-off-by: Jonh Wendell <[email protected]>
dcillera
pushed a commit
to dcillera/envoy-openssl
that referenced
this pull request
Sep 5, 2024
This version contains the fix for using local sdk with go >= 1.21 bazel-contrib/rules_go#3600 Signed-off-by: Jonh Wendell <[email protected]> Signed-off-by: Dario Cillerai <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: