From 8cd516f2addca9148dc7f014e81ea3632ba90223 Mon Sep 17 00:00:00 2001 From: "Steven E. Harris" Date: Mon, 24 Jun 2019 16:41:01 -0400 Subject: [PATCH] Eliminate Bazel repository for "cpp-jsonnet" (#290) Treating the "cpp-jsonnet" Git submodule as a separate local Bazel repository precludes use of the "go-jsonnet" repository from other workspaces, as Bazel misinterprets the relative path to the local "cpp-jsonnet" repository. Instead, use the Git submodule content directly along the package path from the workspace root. --- WORKSPACE | 5 ----- astgen/BUILD.bazel | 2 +- c-bindings/BUILD.bazel | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index e277e75..4c616f3 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,10 +1,5 @@ workspace(name = "google_jsonnet_go") -local_repository( - name = "cpp_jsonnet", - path = "./cpp-jsonnet", -) - load( "@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", diff --git a/astgen/BUILD.bazel b/astgen/BUILD.bazel index 2d0a4b5..0bec2f1 100644 --- a/astgen/BUILD.bazel +++ b/astgen/BUILD.bazel @@ -2,7 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") genrule( name = "dumpstdlibast", - srcs = ["@cpp_jsonnet//stdlib"], + srcs = ["//cpp-jsonnet/stdlib"], outs = ["stdast.go"], cmd = "./$(location //cmd/dumpstdlibast) \"$<\" > \"$@\"", tools = ["//cmd/dumpstdlibast"], diff --git a/c-bindings/BUILD.bazel b/c-bindings/BUILD.bazel index aff2b66..ee8006b 100644 --- a/c-bindings/BUILD.bazel +++ b/c-bindings/BUILD.bazel @@ -10,7 +10,7 @@ go_library( "libjsonnet.cpp", ], cdeps = [ - "@cpp_jsonnet//include:libjsonnet", + "//cpp-jsonnet/include:libjsonnet", ], cgo = True, copts = ["-Wall -Icpp-jsonnet/include"], # keep