Skip to content
Open
Show file tree
Hide file tree
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
12 changes: 12 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,15 @@ load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_
rules_proto_dependencies()

rules_proto_toolchains()

# see https://github.com/bazelbuild/bazel-gazelle/issues/1344
# github.com/tidwall/gjson is a transitive dependency of github.com/wI2L/jsondiff.
# due to static resolution mode, com_github_tidwall_gjson will be missing from
# the deps of generated go_repository rules. Moving it to the WORKSPACE is a workaround
# for https://github.com/bazelbuild/bazel-gazelle/pull/1201.
go_repository(
name = "com_github_tidwall_gjson",
importpath = "github.com/tidwall/gjson",
sum = "h1:6aeJ0bzojgWLa82gDQHcx3S0Lr/O51I9bJ5nv6JFx5w=",
version = "v1.14.0",
)
7 changes: 0 additions & 7 deletions scripts/update-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ bazel run @go_sdk//:bin/go -- mod tidy
echo -e 'def go_dependencies():\n pass\n' >third_party/go/deps.bzl
bazel run //:gazelle -- update-repos -from_file=go.mod -prune -to_macro "third_party/go/deps.bzl%go_dependencies"

# Work around https://github.com/bazelbuild/bazel-gazelle/issues/1344
sed_i=(sed -i)
if [[ "$(uname)" == "Darwin" ]]; then
sed_i+=("")
fi
"${sed_i[@]}" 's#load("@bazel_gazelle//:deps\.bzl", "go_repository")#load("//:third_party/go/go_repository.bzl", "go_repository")#' third_party/go/deps.bzl

mv "${SCRIPT_DIR}"/../third_party/go/bazel_differ_deps.bzl.bak "${SCRIPT_DIR}"/../third_party/go/bazel_differ_deps.bzl

"${SCRIPT_DIR}"/format
8 changes: 1 addition & 7 deletions third_party/go/deps.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//:third_party/go/go_repository.bzl", "go_repository")
load("@bazel_gazelle//:deps.bzl", "go_repository")

def go_dependencies():
go_repository(
Expand Down Expand Up @@ -289,12 +289,6 @@ def go_dependencies():
sum = "h1:fj5tQ8acgNUr6O8LEplsxDhUIe2573iLkJc+PqnzZTI=",
version = "v0.0.0-20191217153810-f85b25db303b",
)
go_repository(
name = "com_github_tidwall_gjson",
importpath = "github.com/tidwall/gjson",
sum = "h1:6aeJ0bzojgWLa82gDQHcx3S0Lr/O51I9bJ5nv6JFx5w=",
version = "v1.14.0",
)
go_repository(
name = "com_github_tidwall_match",
importpath = "github.com/tidwall/match",
Expand Down
9 changes: 0 additions & 9 deletions third_party/go/go_repository.bzl

This file was deleted.