|
| 1 | +diff --git a/build_defs.bzl b/build_defs.bzl |
| 2 | +index fff23544..24d2c37e 100644 |
| 3 | +--- a/build_defs.bzl |
| 4 | ++++ b/build_defs.bzl |
| 5 | +@@ -7,13 +7,13 @@ Rules for building C++ flatbuffers with Bazel. |
| 6 | + |
| 7 | + load("@rules_cc//cc:defs.bzl", "cc_library") |
| 8 | + |
| 9 | +-TRUE_FLATC_PATH = "@com_github_google_flatbuffers//:flatc" |
| 10 | ++TRUE_FLATC_PATH = "@flatbuffers//:flatc" |
| 11 | + |
| 12 | + DEFAULT_INCLUDE_PATHS = [ |
| 13 | + "./", |
| 14 | + "$(GENDIR)", |
| 15 | + "$(BINDIR)", |
| 16 | +- "$(execpath @com_github_google_flatbuffers//:flatc).runfiles/com_github_google_flatbuffers", |
| 17 | ++ "$(execpath @flatbuffers//:flatc).runfiles/flatbuffers", |
| 18 | + ] |
| 19 | + |
| 20 | + def default_include_paths(flatc_path): |
| 21 | +@@ -21,7 +21,7 @@ def default_include_paths(flatc_path): |
| 22 | + "./", |
| 23 | + "$(GENDIR)", |
| 24 | + "$(BINDIR)", |
| 25 | +- "$(execpath %s).runfiles/com_github_google_flatbuffers" % (flatc_path), |
| 26 | ++ "$(execpath %s).runfiles/flatbuffers" % (flatc_path), |
| 27 | + ] |
| 28 | + |
| 29 | + DEFAULT_FLATC_ARGS = [ |
| 30 | +@@ -47,7 +47,7 @@ def flatbuffer_library_public( |
| 31 | + compatible_with = None, |
| 32 | + restricted_to = None, |
| 33 | + target_compatible_with = None, |
| 34 | +- flatc_path = "@com_github_google_flatbuffers//:flatc", |
| 35 | ++ flatc_path = "@flatbuffers//:flatc", |
| 36 | + output_to_bindir = False, |
| 37 | + tools = None, |
| 38 | + extra_env = None, |
| 39 | +@@ -262,8 +262,8 @@ def flatbuffer_cc_library( |
| 40 | + "-parse_headers", |
| 41 | + ], |
| 42 | + deps = [ |
| 43 | +- "@com_github_google_flatbuffers//:runtime_cc", |
| 44 | +- "@com_github_google_flatbuffers//:flatbuffers", |
| 45 | ++ "@flatbuffers//:runtime_cc", |
| 46 | ++ "@flatbuffers//:flatbuffers", |
| 47 | + ] + deps, |
| 48 | + includes = cc_include_paths, |
| 49 | + compatible_with = compatible_with, |
| 50 | +diff --git a/tests/ts/bazel_repository_test_dir/BUILD.bazel b/tests/ts/bazel_repository_test_dir/BUILD.bazel |
| 51 | +index f6b01c5e..7f4c7d2d 100644 |
| 52 | +--- a/tests/ts/bazel_repository_test_dir/BUILD.bazel |
| 53 | ++++ b/tests/ts/bazel_repository_test_dir/BUILD.bazel |
| 54 | +@@ -1,13 +1,13 @@ |
| 55 | + load("@aspect_rules_js//js:defs.bzl", "js_test") |
| 56 | + load("@aspect_rules_js//npm:defs.bzl", "npm_link_package") |
| 57 | +-load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library") |
| 58 | ++load("@flatbuffers//:typescript.bzl", "flatbuffer_ts_library") |
| 59 | + load("@npm//:defs.bzl", "npm_link_all_packages") |
| 60 | + |
| 61 | + npm_link_all_packages(name = "node_modules") |
| 62 | + |
| 63 | + npm_link_package( |
| 64 | + name = "node_modules/flatbuffers", |
| 65 | +- src = "@com_github_google_flatbuffers//ts:flatbuffers", |
| 66 | ++ src = "@flatbuffers//ts:flatbuffers", |
| 67 | + ) |
| 68 | + |
| 69 | + flatbuffer_ts_library( |
| 70 | +diff --git a/ts/BUILD.bazel b/ts/BUILD.bazel |
| 71 | +index 9bd9f4be..b902c438 100644 |
| 72 | +--- a/ts/BUILD.bazel |
| 73 | ++++ b/ts/BUILD.bazel |
| 74 | +@@ -66,7 +66,7 @@ sh_binary( |
| 75 | + name = "compile_flat_file", |
| 76 | + srcs = ["compile_flat_file.sh"], |
| 77 | + data = [ |
| 78 | +- "@com_github_google_flatbuffers//:flatc", |
| 79 | ++ "@flatbuffers//:flatc", |
| 80 | + "@nodejs_linux_amd64//:node_bin", |
| 81 | + ], |
| 82 | + # We just depend directly on the linux amd64 nodejs binary, so only support |
| 83 | +diff --git a/ts/compile_flat_file.sh b/ts/compile_flat_file.sh |
| 84 | +index 43e0c391..e3c783b8 100755 |
| 85 | +--- a/ts/compile_flat_file.sh |
| 86 | ++++ b/ts/compile_flat_file.sh |
| 87 | +@@ -16,7 +16,7 @@ source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \ |
| 88 | + # --- end runfiles.bash initialization v2 --- |
| 89 | + set -eu |
| 90 | + runfiles_export_envvars |
| 91 | +-FLATC=$(rlocation com_github_google_flatbuffers/flatc) |
| 92 | ++FLATC=$(rlocation flatbuffers/flatc) |
| 93 | + TS_FILE=$(${FLATC} $@ | grep "Entry point.*generated" | grep -o "bazel-out.*ts") |
| 94 | + export PATH="$(rlocation nodejs_linux_amd64/bin/nodejs/bin):${PATH}" |
| 95 | + ${ESBUILD_BIN} ${TS_FILE} --format=cjs --bundle --outfile="${OUTPUT_FILE}" --external:flatbuffers --log-level=warning |
| 96 | +diff --git a/typescript.bzl b/typescript.bzl |
| 97 | +index 63c1218c..807a8dee 100644 |
| 98 | +--- a/typescript.bzl |
| 99 | ++++ b/typescript.bzl |
| 100 | +@@ -69,7 +69,7 @@ def flatbuffer_ts_library( |
| 101 | + reflection_name = reflection_name, |
| 102 | + reflection_visibility = visibility, |
| 103 | + target_compatible_with = target_compatible_with, |
| 104 | +- flatc_path = "@com_github_google_flatbuffers//ts:compile_flat_file", |
| 105 | ++ flatc_path = "@flatbuffers//ts:compile_flat_file", |
| 106 | + toolchains = ["@aspect_rules_esbuild//esbuild:resolved_toolchain"], |
| 107 | + tools = ["@aspect_rules_esbuild//esbuild:resolved_toolchain"], |
| 108 | + ) |
0 commit comments