Skip to content

Commit 7ec9988

Browse files
digantdesaiclaude
andcommitted
Add shim_et nlohmann-json shim for OSS buck2 build
The tokenizers submodule bump (#20472) moved the fbsource//third-party/nlohmann-json dependency onto the tokenizers :headers target, which is reachable from the OSS buck2 CI build (multimodal_runner_lib -> text_token_generator -> tokenizers:headers). Since fbsource aliases to shim_et, this requires a shim_et//third-party/nlohmann-json package, which did not exist (only re2 had one). Add the shim, mirroring shim_et//third-party/re2, aliasing nlohmann-json to the header-only nlohmann_json target added to the tokenizers submodule (meta-pytorch/tokenizers#201), and bump the submodule pin to include it. Co-authored-by: Claude <noreply@anthropic.com>
1 parent 45a14b9 commit 7ec9988

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

extension/llm/tokenizers

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
load(":targets.bzl", "define_common_targets")
2+
3+
define_common_targets()
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2+
3+
def define_common_targets():
4+
if runtime.is_oss:
5+
native.cxx_library(
6+
name = "nlohmann-json",
7+
exported_deps = ["root//extension/llm/tokenizers/third-party:nlohmann_json"],
8+
visibility = ["PUBLIC"],
9+
)

0 commit comments

Comments
 (0)