mirror of
https://github.com/google/go-jsonnet.git
synced 2025-09-30 18:01:03 +02:00
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:
parent
7081ee085e
commit
8cd516f2ad
@ -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",
|
||||
|
@ -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"],
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user