Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Go: Support Go 1.23 (Explicit aliases) #17058

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

Open
wants to merge 27 commits into
base: main
Choose a base branch
Loading
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e604749
Go: Use 1.23 in build process
mbg Jul 24, 2024
299b2e4
Go: Use 1.23 in tests
mbg Jul 24, 2024
6b1bd05
Go: Use 1.23 for extractor
mbg Jul 24, 2024
1192564
Go: Update frontend error messages for Go 1.23
mbg Jul 24, 2024
f4b3dfc
Go: Update dbscheme for aliases
mbg Aug 16, 2024
bbe2406
Go: Extract type aliases
mbg Aug 16, 2024
cd7cf4f
Go: Add database upgrade/downgrades for type aliases
mbg Aug 16, 2024
91946de
Go: Extract alias names
mbg Aug 16, 2024
221bab7
Go: Add test for `AliasType` extraction
mbg Aug 16, 2024
47ad284
Go: Fix formatting and documentation of `AliasType`
mbg Aug 16, 2024
90068f6
Go: Update `AliasType` to implement `getUnderlyingType`
mbg Aug 19, 2024
5797dba
Go: Extract objects for aliases
mbg Aug 19, 2024
191f712
Go: Update test for aliases to print immediate RHS and underlying type
mbg Aug 19, 2024
76e27ff
Go: Remove `alias_rhs` table in downgrade script
mbg Aug 19, 2024
77cf0ac
Go: add patch for go 1.23 windows build problem
Aug 21, 2024
f6e577e
Factor out `extractTypeObject`
owen-mc Aug 21, 2024
3a8a7ea
Fix alias use in HTML template escaping passthrough
owen-mc Aug 20, 2024
7589186
Use unique type param names in test
owen-mc Aug 20, 2024
a6557fc
Accept test change related to alias types
owen-mc Aug 20, 2024
9ca7536
Update underlying type of alias
owen-mc Aug 21, 2024
f2695d0
Fix syntax error in test
owen-mc Aug 21, 2024
23d1dfa
Delete more about alias types in downgrade script
owen-mc Aug 21, 2024
bd89eb0
Improve `AliasType.getUnderlyingType`
owen-mc Aug 21, 2024
649bf5a
Improve Aliases test
owen-mc Aug 21, 2024
fe6d364
Update labels for alias types
owen-mc Aug 22, 2024
da12b33
Add change note
owen-mc Aug 22, 2024
e660b85
Update max supported Go version to 1.23
owen-mc Aug 22, 2024
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
Prev Previous commit
Next Next commit
Go: add patch for go 1.23 windows build problem
  • Loading branch information
Paolo Tranquilli authored and mbg committed Sep 1, 2024
commit 77cf0ac7a7072d5f7a3cd63d16b3a232fe021956
2 changes: 1 addition & 1 deletion 2 MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local_path_override(
# see https://registry.bazel.build/ for a list of available packages

bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "rules_go", version = "0.49.0")
bazel_dep(name = "rules_go", version = "0.49.0-codeql.1")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that https://github.com/bazelbuild/rules_go/releases/tag/v0.50.0 has been released, can we just use that?
This also means we can remove the 0.49.0-codeql.1 release from the registry (also added in this PR).

Copy link
Member Author

@mbg mbg Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for letting us know 👍🏻 I'll drop @redsun82's fix in the next rebase and bump this to the new version instead.

bazel_dep(name = "rules_pkg", version = "0.10.1")
bazel_dep(name = "rules_nodejs", version = "6.2.0-codeql.1")
bazel_dep(name = "rules_python", version = "0.32.2")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
module(
name = "rules_go",
version = "0.49.0-codeql.1",
compatibility_level = 0,
repo_name = "io_bazel_rules_go",
)

# The custom repo_name is used to prevent our bazel_features polyfill for WORKSPACE builds from
# conflicting with the real bazel_features repo.
bazel_dep(name = "bazel_features", version = "1.9.1", repo_name = "io_bazel_rules_go_bazel_features")
bazel_dep(name = "bazel_skylib", version = "1.2.0")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "rules_proto", version = "6.0.0")
bazel_dep(name = "protobuf", version = "3.19.2", repo_name = "com_google_protobuf")

go_sdk = use_extension("//go:extensions.bzl", "go_sdk")
go_sdk.download(
name = "go_default_sdk",
version = "1.21.8",
)
use_repo(
go_sdk,
"go_toolchains",
# This name is ugly on purpose to avoid a conflict with a user-named SDK.
"io_bazel_rules_nogo",
)

register_toolchains("@go_toolchains//:all")

bazel_dep(name = "gazelle", version = "0.36.0")

go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
go_deps,
"com_github_gogo_protobuf",
"com_github_golang_mock",
"com_github_golang_protobuf",
"org_golang_google_genproto",
"org_golang_google_grpc",
"org_golang_google_grpc_cmd_protoc_gen_go_grpc",
"org_golang_google_protobuf",
"org_golang_x_net",
"org_golang_x_tools",
# Exported by gazelle specifically for rules_go.
"bazel_gazelle_go_repository_config",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Taken from https://github.com/bazelbuild/rules_go/pull/4050/commits/55b4c07d3244c829c11f297335550f19fcc718bd
diff --git a/go/private/context.bzl b/go/private/context.bzl
index ad0270fe..0243a231 100644
--- a/go/private/context.bzl
+++ b/go/private/context.bzl
@@ -439,6 +439,14 @@ def go_context(
#
# See https://go.dev/doc/toolchain for more info.
"GOTOOLCHAIN": "local",
+
+ # NOTE(#4049): Since Go 1.23.0, os.Readlink (and consequently
+ # filepath.EvalSymlinks) stopped treating Windows mount points and
+ # reparse points (junctions) as symbolic links. Bazel uses junctions
+ # when constructing exec roots, and we use filepath.EvalSymlinks in
+ # GoStdlib, so this broke us. Setting GODEBUG=winsymlink=0 restores
+ # the old behavior.
+ "GODEBUG": "winsymlink=0",
}

# Path mapping can't map the values of environment variables, so we pass GOROOT to the action
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"integrity": "sha256-2T7wLx5yyC2Ls9UWlRmzYWezPPaMJSUl47nT1d0UPec=",
"strip_prefix": "",
"url": "https://github.com/bazelbuild/rules_go/releases/download/v0.49.0/rules_go-v0.49.0.zip",
"patches": {
"disable_winsymlink.patch": "sha256-o2DWpbkv9TK80evwEQCdDFSXGLlgoT5BZg7MnvE77Go="
},
"patch_strip": 1
}
33 changes: 33 additions & 0 deletions 33 misc/bazel/registry/modules/rules_go/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"homepage": "https://github.com/bazelbuild/rules_go",
"maintainers": [
{
"email": "fabian@meumertzhe.im",
"github": "fmeum",
"name": "Fabian Meumertzheim"
},
{
"email": "zplin@uber.com",
"github": "linzhp",
"name": "Zhongpeng Lin"
},
{
"email": "tfrench@uber.com",
"github": "tyler-french",
"name": "Tyler French"
}
],
"repository": [
"github:bazelbuild/rules_go"
],
"versions": [
"0.49.0-codeql.1"
],
"yanked_versions": {
"0.33.0": "Obsolete experimental version that emits debug prints. Update to 0.39.1 or higher",
"0.34.0": "Obsolete experimental version that emits debug prints. Update to 0.39.1 or higher",
"0.35.0": "Obsolete experimental version that emits debug prints. Update to 0.39.1 or higher",
"0.36.0": "Obsolete experimental version that emits debug prints. Update to 0.39.1 or higher",
"0.37.0": "Obsolete experimental version that emits debug prints. Update to 0.39.1 or higher"
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.