From 792070031fcaa8d6e3020eaecfb97a5f91727663 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Wed, 31 Jul 2024 11:56:19 +0100 Subject: [PATCH 1/2] Go: Update WORKSPACE.bazel to include go_repository entries --- WORKSPACE.bazel | 58 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 3f7ecf167700..f074363b154a 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -1,2 +1,60 @@ +load("@gazelle//:deps.bzl", "go_repository") + # please use MODULE.bazel to add dependencies # this empty file is required by internal repositories, don't remove it + +go_repository( + name = "com_github_google_go_cmp", + importpath = "github.com/google/go-cmp", + sum = "h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=", + version = "v0.6.0", +) + +go_repository( + name = "com_github_yuin_goldmark", + importpath = "github.com/yuin/goldmark", + sum = "h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=", + version = "v1.4.13", +) + +go_repository( + name = "org_golang_x_mod", + importpath = "golang.org/x/mod", + sum = "h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8=", + version = "v0.19.0", +) + +go_repository( + name = "org_golang_x_net", + importpath = "golang.org/x/net", + sum = "h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=", + version = "v0.27.0", +) + +go_repository( + name = "org_golang_x_sync", + importpath = "golang.org/x/sync", + sum = "h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=", + version = "v0.7.0", +) + +go_repository( + name = "org_golang_x_sys", + importpath = "golang.org/x/sys", + sum = "h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=", + version = "v0.22.0", +) + +go_repository( + name = "org_golang_x_telemetry", + importpath = "golang.org/x/telemetry", + sum = "h1:zf5N6UOrA487eEFacMePxjXAJctxKmyjKUsjA11Uzuk=", + version = "v0.0.0-20240521205824-bda55230c457", +) + +go_repository( + name = "org_golang_x_tools", + importpath = "golang.org/x/tools", + sum = "h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg=", + version = "v0.23.0", +) From 4f9bf520ea127d0d3f4845ba68823a7bdd7d57f8 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Wed, 31 Jul 2024 11:57:17 +0100 Subject: [PATCH 2/2] Go: Update `BUILD.bazel` files --- go/extractor/BUILD.bazel | 4 ++-- go/extractor/dbscheme/BUILD.bazel | 2 +- go/extractor/project/BUILD.bazel | 4 ++-- go/extractor/trap/BUILD.bazel | 2 +- go/extractor/util/BUILD.bazel | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go/extractor/BUILD.bazel b/go/extractor/BUILD.bazel index ded27a11177b..860dcef5e73e 100644 --- a/go/extractor/BUILD.bazel +++ b/go/extractor/BUILD.bazel @@ -21,8 +21,8 @@ go_library( "//go/extractor/toolchain", "//go/extractor/trap", "//go/extractor/util", - "@org_golang_x_mod//modfile:go_default_library", - "@org_golang_x_tools//go/packages:go_default_library", + "@org_golang_x_mod//modfile", + "@org_golang_x_tools//go/packages", ], ) diff --git a/go/extractor/dbscheme/BUILD.bazel b/go/extractor/dbscheme/BUILD.bazel index 379c2fb93d39..02727d6d101a 100644 --- a/go/extractor/dbscheme/BUILD.bazel +++ b/go/extractor/dbscheme/BUILD.bazel @@ -12,6 +12,6 @@ go_library( visibility = ["//visibility:public"], deps = [ "//go/extractor/trap", - "@org_golang_x_tools//go/packages:go_default_library", + "@org_golang_x_tools//go/packages", ], ) diff --git a/go/extractor/project/BUILD.bazel b/go/extractor/project/BUILD.bazel index 7a8627ae8b1b..b79bbd15f0c9 100644 --- a/go/extractor/project/BUILD.bazel +++ b/go/extractor/project/BUILD.bazel @@ -11,7 +11,7 @@ go_library( "//go/extractor/diagnostics", "//go/extractor/toolchain", "//go/extractor/util", - "@org_golang_x_mod//modfile:go_default_library", + "@org_golang_x_mod//modfile", ], ) @@ -21,6 +21,6 @@ go_test( embed = [":project"], deps = [ "//go/extractor/util", - "@org_golang_x_mod//modfile:go_default_library", + "@org_golang_x_mod//modfile", ], ) diff --git a/go/extractor/trap/BUILD.bazel b/go/extractor/trap/BUILD.bazel index 80973ec94c17..5e858d2384d4 100644 --- a/go/extractor/trap/BUILD.bazel +++ b/go/extractor/trap/BUILD.bazel @@ -14,7 +14,7 @@ go_library( deps = [ "//go/extractor/srcarchive", "//go/extractor/util", - "@org_golang_x_tools//go/packages:go_default_library", + "@org_golang_x_tools//go/packages", ], ) diff --git a/go/extractor/util/BUILD.bazel b/go/extractor/util/BUILD.bazel index 41e81a907ef3..d0195e05be23 100644 --- a/go/extractor/util/BUILD.bazel +++ b/go/extractor/util/BUILD.bazel @@ -10,7 +10,7 @@ go_library( ], importpath = "github.com/github/codeql-go/extractor/util", visibility = ["//visibility:public"], - deps = ["@org_golang_x_mod//semver:go_default_library"], + deps = ["@org_golang_x_mod//semver"], ) go_test( @@ -20,5 +20,5 @@ go_test( "util_test.go", ], embed = [":util"], - deps = ["@org_golang_x_mod//semver:go_default_library"], + deps = ["@org_golang_x_mod//semver"], )