-
Notifications
You must be signed in to change notification settings - Fork 248
Expand file tree
/
Copy pathMODULE.bazel
More file actions
152 lines (141 loc) · 6.12 KB
/
MODULE.bazel
File metadata and controls
152 lines (141 loc) · 6.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
""" Workspace for Open Source GoogleSQL library """
module(
name = "googlesql",
version = "2026.01.1",
)
GOOGLESQL_JAVA_ARTIFACTS = [
"com.google.api.grpc:proto-google-common-protos:2.29.0",
"com.google.code.findbugs:jsr305:3.0.2",
"com.google.errorprone:error_prone_annotations:2.23.0",
"com.google.guava:guava:32.1.3-jre",
"com.google.guava:guava-testlib:32.1.3-jre",
"io.grpc:grpc-context:1.64.2",
"io.grpc:grpc-core:1.64.2",
"io.grpc:grpc-api:1.64.2",
"io.grpc:grpc-netty:1.64.2",
"io.grpc:grpc-protobuf-lite:1.64.2",
"io.grpc:grpc-protobuf:1.64.2",
"io.grpc:grpc-stub:1.64.2",
"io.netty:netty-common:4.1.100.Final",
"io.netty:netty-transport:4.1.100.Final",
"io.opencensus:opencensus-api:0.31.0",
"io.opencensus:opencensus-contrib-grpc-metrics:0.31.0",
"javax.annotation:javax.annotation-api:1.2",
"joda-time:joda-time:2.10.13",
"com.google.auto.service:auto-service:1.0-rc2",
"com.google.code.gson:gson:jar:2.10.1",
"com.google.protobuf:protobuf-java:3.23.1",
"com.google.truth:truth:1.1.5",
"com.google.truth.extensions:truth-proto-extension:1.4.4",
"junit:junit:4.13.2",
]
bazel_dep(name = "abseil-cpp", version = "20240722.1", repo_name = "com_google_absl")
bazel_dep(name = "abseil-py", version = "2.1.0", repo_name = "io_abseil_py")
bazel_dep(name = "bazel_features", version = "1.30.0")
bazel_dep(name = "bazel_skylib", version = "1.8.1")
bazel_dep(name = "boost.variant", version = "1.89.0")
bazel_dep(name = "boringssl", version = "0.20250818.0")
bazel_dep(name = "civetweb", version = "1.16.bcr.3")
bazel_dep(name = "gazelle", version = "0.45.0", repo_name = "bazel_gazelle")
bazel_dep(name = "google_bazel_common", version = "0.0.1")
bazel_dep(name = "google_benchmark", version = "1.9.4", repo_name = "com_github_google_benchmark")
bazel_dep(name = "googleapis", version = "0.0.0-20250826-a92cee39", repo_name = "com_google_googleapis")
bazel_dep(name = "googleapis-cc", version = "1.0.0")
bazel_dep(name = "googletest", version = "1.17.0", repo_name = "com_google_googletest")
bazel_dep(name = "grpc", version = "1.69.0", repo_name = "com_github_grpc_grpc")
bazel_dep(name = "grpc-java", version = "1.75.0", repo_name = "io_grpc_grpc_java")
bazel_dep(name = "nlohmann_json", version = "3.12.0", repo_name = "json")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "protobuf", version = "29.0", repo_name = "com_google_protobuf")
bazel_dep(name = "re2", version = "2025-08-12", repo_name = "com_googlesource_code_re2")
bazel_dep(name = "riegeli", version = "0.0.0-20240927-cdfb25a", repo_name = "com_google_riegeli")
bazel_dep(name = "rules_bison", version = "0.4")
bazel_dep(name = "rules_cc", version = "0.2.8")
bazel_dep(name = "rules_flex", version = "0.4")
bazel_dep(name = "rules_foreign_cc", version = "0.15.0")
bazel_dep(name = "rules_go", version = "0.53.0", repo_name = "io_bazel_rules_go")
bazel_dep(name = "rules_java", version = "8.15.2")
bazel_dep(name = "rules_jvm_external", version = "6.8")
bazel_dep(name = "rules_m4", version = "0.3")
bazel_dep(name = "rules_proto", version = "7.0.2")
bazel_dep(name = "rules_python", version = "1.6.1")
bazel_dep(name = "toolchains_llvm", version = "1.5.0")
# The 'slot_type' in /googlesql/public/types/internal_utils.h file is a private member of
# absl::container_internal::raw_hash_set in newer versions. Pinged to an older version of abseil-cpp
# until the usage of 'slot_type' is removed.
#
# TODO: Remove the usage of old version of abseil-cpp.
single_version_override(
module_name = "abseil-cpp",
version = "20240722.1",
)
# Java dependencies.
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
artifacts = GOOGLESQL_JAVA_ARTIFACTS,
generate_compat_repositories = True,
)
use_repo(maven, "maven")
# Go dependencies.
go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(go_deps, "com_github_inspirer_textmapper")
# Python dependencies.
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.11",
requirements_lock = "//:requirements.txt",
)
use_repo(pip, "pypi")
# Dependencies from http_archive
#
# Notes for 'icu': The ICU module obtained from the Bazel Central Registry (BCR) uses a prebuilt ICU
# data file, which is linked as a runfile dependency. This setup prevents
# //googlesql/tools:execute_query target from being executed directly without setting an environment
# variable to point to the data file.
#
# To resolve this, we are instead using http_archive to download the ICU library and applying a
# custom BUILD file. This custom configuration ensures that the ICU data is used as a static library
# (or statically linked), allowing our execute_query binary to run directly without any external
# runtime dependencies.
http_archive_deps = use_extension("@googlesql//bazel:http_archive_deps.bzl", "googlesql_http_archive_deps")
use_repo(
http_archive_deps,
"com_google_cc_differential_privacy",
"com_google_differential_privacy",
"com_google_farmhash",
"com_google_file_based_test_driver",
"icu",
"mstch",
"native_utils",
"org_publicsuffix",
)
# Dev toolchain.
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True)
llvm.toolchain(
name = "llvm_toolchain",
llvm_versions = {
"": "21.1.0",
"darwin-x86_64": "19.1.7",
"darwin-aarch64": "19.1.7",
},
)
use_repo(llvm, "llvm_toolchain")
register_toolchains(
"@llvm_toolchain//:all",
dev_dependency = True,
)