Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ bazel_dep(name = "rules_cc", version = "0.2.20")
bazel_dep(name = "rules_node_addon", version = "1.0.2")
bazel_dep(name = "rules_nodejs", version = "6.7.4")
bazel_dep(name = "rules_python", version = "2.0.3")
bazel_dep(name = "rules_shell", version = "0.8.0")
bazel_dep(name = "rules_zig", version = "0.14.0")
bazel_dep(name = "tclap", version = "1.2.5.bcr.1")
bazel_dep(name = "toolchains_buildbuddy", version = "0.0.4", dev_dependency = True)
Expand Down
478 changes: 57 additions & 421 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions data/config/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
load("@rules_cc//cc:defs.bzl", "cc_test")

package(default_visibility = ["//visibility:public"])

CONFIGS = glob(
["*.json"],
exclude = ["*.schema.json"],
)

# Bazel 10 no longer lets source files inherit package default_visibility, so
# export the config JSONs explicitly (e.g. //data/dictionary references t2s.json).
exports_files(
CONFIGS,
visibility = ["//visibility:public"],
)

filegroup(
name = "config",
srcs = CONFIGS,
Expand Down
9 changes: 9 additions & 0 deletions data/dictionary/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
load("@rules_cc//cc:defs.bzl", "cc_test")

package(default_visibility = ["//visibility:public"])

# Bazel 10 no longer lets source files inherit package default_visibility;
# //data references this text dictionary directly for the resources zip.
exports_files(
["CJK_Compatibility_Ideographs.txt"],
visibility = ["//visibility:public"],
)

[
genrule(
name = "reverse_" + txt,
Expand Down
2 changes: 2 additions & 0 deletions deps/darts-clone-0.32h/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_library")

filegroup(
name = "all_files",
srcs = glob(["**"]),
Expand Down
2 changes: 2 additions & 0 deletions deps/darts-clone-0.32h/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ module(
version = "0.32h",
compatibility_level = 0,
)

bazel_dep(name = "rules_cc", version = "0.2.20")
2 changes: 2 additions & 0 deletions deps/rapidjson-1.1.0/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_library")

package(default_visibility = ["//visibility:public"])

cc_library(
Expand Down
2 changes: 2 additions & 0 deletions examples/config/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_test")

package(default_visibility = ["//visibility:public"])

[
Expand Down
2 changes: 2 additions & 0 deletions node/cc_headers_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ rules_nodejs only exposes the active Node toolchain's headers as a cc_library
CcInfo.compilation_context.headers depset into DefaultInfo files.
"""

load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")

def _cc_headers_files_impl(ctx):
# All (transitive) headers the library exposes to its consumers.
headers = ctx.attr.lib[CcInfo].compilation_context.headers
Expand Down
1 change: 1 addition & 0 deletions scripts/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
load("@rules_python//python:py_binary.bzl", "py_binary")
load("@rules_python//python:py_test.bzl", "py_test")
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")

package(default_visibility = ["//visibility:public"])

Expand Down
16 changes: 15 additions & 1 deletion src/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
load("@aspect_bazel_lib//lib:diff_test.bzl", "diff_test")
load("@pybind11_bazel//:build_defs.bzl", "pybind_extension")
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("@rules_python//python:py_library.bzl", "py_library")

package(default_visibility = ["//visibility:public"])

# Public C/C++ headers consumed by the root //:opencc_lib target. Bazel 10 no
# longer lets source files inherit package default_visibility, so export them
# explicitly for cross-package references.
exports_files(
[
"ConversionInspection.hpp",
"Export.hpp",
"ResourceProvider.hpp",
"SimpleConverter.hpp",
"opencc.h",
],
visibility = ["//visibility:public"],
)

filegroup(
name = "all_files",
srcs = glob([
Expand Down
2 changes: 2 additions & 0 deletions src/tools/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")

package(default_visibility = ["//visibility:public"])

cc_library(
Expand Down
2 changes: 2 additions & 0 deletions test/config_test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_test")

filegroup(
name = "config_test",
srcs = [
Expand Down
Loading