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

update version manifest URL #3314

Merged
merged 1 commit into from
Oct 5, 2022
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
10 changes: 5 additions & 5 deletions go/private/sdk.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _go_download_sdk_impl(ctx):
ctx.report_progress("Finding Go SHA-256 sums")
ctx.download(
url = [
"https://golang.org/dl/?mode=json&include=all",
"https://go.dev/dl/?mode=json&include=all",
"https://golang.google.cn/dl/?mode=json&include=all",
],
output = "versions.json",
Expand All @@ -89,10 +89,10 @@ def _go_download_sdk_impl(ctx):
if not highest_version or _version_less(highest_version, pv):
highest_version = pv
if not highest_version:
fail("did not find any Go versions in https://golang.org/dl/?mode=json")
fail("did not find any Go versions in https://go.dev/dl/?mode=json")
version = _version_string(highest_version)
if version not in sdks_by_version:
fail("did not find version {} in https://golang.org/dl/?mode=json".format(version))
fail("did not find version {} in https://go.dev/dl/?mode=json".format(version))
sdks = sdks_by_version[version]

if platform not in sdks:
Expand Down Expand Up @@ -327,11 +327,11 @@ def _detect_sdk_version(ctx, goroot):
return version

def _parse_versions_json(data):
"""Parses version metadata returned by golang.org.
"""Parses version metadata returned by go.dev.

Args:
data: the contents of the file downloaded from
https://golang.org/dl/?mode=json. We assume the file is valid
https://go.dev/dl/?mode=json. We assume the file is valid
JSON, is spaced and indented, and is in a particular format.

Return:
Expand Down