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")
|
workspace(name = "google_jsonnet_go")
|
||||||
|
|
||||||
local_repository(
|
|
||||||
name = "cpp_jsonnet",
|
|
||||||
path = "./cpp-jsonnet",
|
|
||||||
)
|
|
||||||
|
|
||||||
load(
|
load(
|
||||||
"@bazel_tools//tools/build_defs/repo:http.bzl",
|
"@bazel_tools//tools/build_defs/repo:http.bzl",
|
||||||
"http_archive",
|
"http_archive",
|
||||||
|
@ -2,7 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
|||||||
|
|
||||||
genrule(
|
genrule(
|
||||||
name = "dumpstdlibast",
|
name = "dumpstdlibast",
|
||||||
srcs = ["@cpp_jsonnet//stdlib"],
|
srcs = ["//cpp-jsonnet/stdlib"],
|
||||||
outs = ["stdast.go"],
|
outs = ["stdast.go"],
|
||||||
cmd = "./$(location //cmd/dumpstdlibast) \"$<\" > \"$@\"",
|
cmd = "./$(location //cmd/dumpstdlibast) \"$<\" > \"$@\"",
|
||||||
tools = ["//cmd/dumpstdlibast"],
|
tools = ["//cmd/dumpstdlibast"],
|
||||||
|
@ -10,7 +10,7 @@ go_library(
|
|||||||
"libjsonnet.cpp",
|
"libjsonnet.cpp",
|
||||||
],
|
],
|
||||||
cdeps = [
|
cdeps = [
|
||||||
"@cpp_jsonnet//include:libjsonnet",
|
"//cpp-jsonnet/include:libjsonnet",
|
||||||
],
|
],
|
||||||
cgo = True,
|
cgo = True,
|
||||||
copts = ["-Wall -Icpp-jsonnet/include"], # keep
|
copts = ["-Wall -Icpp-jsonnet/include"], # keep
|
||||||
|
Loading…
x
Reference in New Issue
Block a user