Move reflection_ts_fbs into a separate directory (#7342)
Right now, reflection_ts_fbs target is in reflection/BUILD.bazel. This is not ideal because reflection:reflection_fbs_schema is referenced from :flatc in the root. Thus, for any Bazel projects that want to include flatbuffers, they need to include npm / yarn_install and nodejs support all because reflection/BUILD.bazel loads typescript.bzl and that requires all TypeScript things. This PR separated that target into a different subdirectory, freeing root BUILD.bazel from that dependency.
This commit is contained in:
parent
49e1ea3335
commit
090caa2809
|
@ -1,14 +1,5 @@
|
||||||
load("//:typescript.bzl", "flatbuffer_ts_library")
|
|
||||||
|
|
||||||
filegroup(
|
filegroup(
|
||||||
name = "reflection_fbs_schema",
|
name = "reflection_fbs_schema",
|
||||||
srcs = ["reflection.fbs"],
|
srcs = ["reflection.fbs"],
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
flatbuffer_ts_library(
|
|
||||||
name = "reflection_ts_fbs",
|
|
||||||
srcs = ["reflection.fbs"],
|
|
||||||
include_reflection = False,
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
load("//:typescript.bzl", "flatbuffer_ts_library")
|
||||||
|
|
||||||
|
flatbuffer_ts_library(
|
||||||
|
name = "reflection_ts_fbs",
|
||||||
|
srcs = ["//reflection:reflection_fbs_schema"],
|
||||||
|
include_reflection = False,
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
|
@ -85,7 +85,7 @@ def flatbuffer_ts_library(
|
||||||
"types": ["node"],
|
"types": ["node"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
deps = deps + ["//ts:flatbuffers"] + (["//reflection:reflection_ts_fbs"] if include_reflection else []),
|
deps = deps + ["//ts:flatbuffers"] + (["//reflection/ts:reflection_ts_fbs"] if include_reflection else []),
|
||||||
)
|
)
|
||||||
js_library(
|
js_library(
|
||||||
name = name,
|
name = name,
|
||||||
|
|
Loading…
Reference in New Issue