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.
This commit is contained in:
Steven E. Harris 2019-06-24 16:41:01 -04:00 committed by Dave Cunningham
parent 7081ee085e
commit 8cd516f2ad
3 changed files with 2 additions and 7 deletions

View File

@ -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",

View File

@ -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"],

View File

@ -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