-
Notifications
You must be signed in to change notification settings - Fork 10
/
MODULE.bazel
120 lines (108 loc) · 5.82 KB
/
MODULE.bazel
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
module(
name = "claro-lang",
repo_name = "claro-lang",
version = "0.1.509",
)
bazel_dep(name = "aspect_bazel_lib", version = "2.0.1")
bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
bazel_dep(name = "rules_jvm_external", version = "5.3")
bazel_dep(name = "rules_java", version = "7.2.0") # Latest version actually compatible w/ Bazel 6.4.0: https://github.com/bazelbuild/rules_java/issues/159
# Deps related to ClaroDocs
bazel_dep(name = "aspect_rules_lint", version = "0.12.0")
bazel_dep(name = "aspect_rules_jest", version = "0.19.6")
bazel_dep(name = "aspect_rules_js", version = "1.38.0")
bazel_dep(name = "aspect_rules_swc", version = "1.2.2")
bazel_dep(name = "aspect_rules_ts", version = "2.1.1")
# -- bazel_dep definitions -- #
# TODO(steving) For now, I'm re-exporting the maven module extension from @rules_jvm_external via my own .bzl file
# TODO(steving) literally just to avoid the unavoidable warning message:
# TODO(steving) "The maven repository 'maven' is used in two different bazel modules, originally in 'claro-lang' and now in 'protobuf'"
# TODO(steving) Apparently this is a known issue: https://bazelbuild.slack.com/archives/CEH3YH9RC/p1694506396048019
# TODO(steving) Eventually, I'm hoping that Bzlmod will mature enough that this workaround can be dropped.
#maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven = use_extension(":maven_extension.bzl", "maven")
maven.install(
artifacts =
# First, I'll hardcode the maven artifacts that are needed for the jflex_rules
[
# JFLEX_ARTIFACTS
"de.jflex:jflex:jar:1.9.1",
"com.github.vbmacher:java-cup-runtime:jar:11b-20160615-1",
# THIRD_PARTY_ARTIFACTS
"com.github.vbmacher:java-cup:jar:11b-20160615",
] +
[
"com.github.pcj:google-options:jar:1.0.0",
"com.google.auto.value:auto-value:1.5.3",
"com.google.guava:guava:jar:32.1.2-jre",
"com.google.protobuf:protobuf-java-util:3.24.3",
"com.googlecode.lanterna:lanterna:3.1.1",
"com.squareup.okhttp3:okhttp:4.11.0",
# Not using latest retrofit 2.9.0 because it seems there's a JDK warning of illegal reflection in retrofit2.
# The maintainers responded to this calling it something they explicitly won't fix since it's just a warning
# but I think that for now it makes Claro look bad, so I'm intentionally downgrading in the meantime until
# this is resolved. Re: https://github.com/square/retrofit/issues/3341
"com.squareup.retrofit2:retrofit:2.7.2",
"com.google.code.gson:gson:2.10.1",
"com.github.ben-manes.caffeine:caffeine:3.1.8",
"net.javacrumbs.future-converter:future-converter-java8-guava:1.2.0",
############################################################################################################
# BEGIN ACTIVE J
# These deps come in a group, so if the version number ever gets bumped, must do it as a whole.
############################################################################################################
"io.activej:activej-common:5.4.3",
"io.activej:activej-eventloop:5.4.3",
"io.activej:activej-http:5.4.3",
"io.activej:activej-promise:5.4.3",
############################################################################################################
# END ACTIVE J
############################################################################################################
# This addresses unwanted missing StaticLoggerBinder warning logs from SLF4J. This shouldn't be necessary
# anymore once Claro has proper logging support. See: https://www.slf4j.org/codes.html#StaticLoggerBinder
"org.slf4j:slf4j-nop:2.0.7",
],
# lock_file = "//:maven_install.json",
lock_file = "//:rules_jvm_external~5.3~maven~maven_install.json",
repositories = [
"https://jcenter.bintray.com/",
"https://maven.google.com",
"https://repo1.maven.org/maven2",
],
version_conflict_policy = "pinned",
)
# Update pinned Maven deps using the following command.
# bazel run @unpinned_maven//:pin --enable_bzlmod
use_repo(maven, "maven", "unpinned_maven")
# End of extension `maven`
non_module_deps = use_extension("//:non_module_deps.bzl", "non_module_deps")
use_repo(non_module_deps, "jflex_rules")
use_repo(non_module_deps, "bootstrapping_claro_compiler_tarfile")
# End of extension `non_module_deps`
############################################################################################################
# BEGIN: ClaroDocs Deps Setup.
############################################################################################################
pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm", dev_dependency = True)
use_repo(pnpm, "pnpm")
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = True)
npm.npm_translate_lock(
name = "npm",
npmrc = "//tools/clarodocs:.npmrc",
pnpm_lock = "//tools/clarodocs:pnpm-lock.yaml",
public_hoist_packages = {
"eslint-config-react-app": ["tools/clarodocs"],
"[email protected]": ["tools/clarodocs"],
},
verify_node_modules_ignored = "//:.bazelignore",
)
use_repo(npm, "npm")
rules_ts_ext = use_extension(
"@aspect_rules_ts//ts:extensions.bzl",
"ext",
dev_dependency = True,
)
rules_ts_ext.deps()
use_repo(rules_ts_ext, "npm_typescript")
############################################################################################################
# END: ClaroDocs Deps Setup.
############################################################################################################