@@ -19,6 +19,14 @@ pl_register_cc_toolchains()
1919# Install Pixie Labs Dependencies.
2020pl_deps ()
2121
22+ load ("@bazel_features//:deps.bzl" , "bazel_features_deps" )
23+
24+ bazel_features_deps ()
25+
26+ load ("@rules_cc//cc:extensions.bzl" , "compatibility_proxy_repo" )
27+
28+ compatibility_proxy_repo ()
29+
2230# Order is important. Try to go from most basic/primitive to higher level packages.
2331# - go_rules_dependencies
2432# - protobuf_deps
@@ -45,6 +53,10 @@ go_register_toolchains()
4553# gazelle:repository_macro go_deps.bzl%pl_go_dependencies
4654pl_go_dependencies ()
4755
56+ load ("@rules_java//java:rules_java_deps.bzl" , "rules_java_dependencies" )
57+
58+ rules_java_dependencies ()
59+
4860load ("@com_google_protobuf//:protobuf_deps.bzl" , "protobuf_deps" )
4961
5062protobuf_deps ()
@@ -53,17 +65,34 @@ load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
5365
5466grpc_deps ()
5567
56- load ("@io_bazel_rules_scala//:scala_config .bzl" , "scala_config " )
68+ load ("@io_bazel_rules_scala//scala:deps .bzl" , "rules_scala_dependencies " )
5769
58- scala_version = "2.13.6"
70+ rules_scala_dependencies ()
5971
60- scala_config ( scala_version = scala_version )
72+ load ( "@io_bazel_rules_scala//:scala_config.bzl" , "scala_config" )
6173
62- load ( "@io_bazel_rules_scala//scala:scala.bzl" , "scala_repositories" )
74+ scala_version = "2.13.16"
6375
64- scala_repositories ( )
76+ scala_config ( scala_version = scala_version )
6577
66- load ("@io_bazel_rules_scala//scala:toolchains.bzl" , "scala_register_toolchains" )
78+ load ("@io_bazel_rules_scala//scala:toolchains.bzl" , "scala_register_toolchains" , "scala_toolchains" )
79+
80+ scala_toolchains (
81+ fetch_sources = True ,
82+ twitter_scrooge = {
83+ "libthrift" : "@thrift_deps//:org_apache_thrift_libthrift" ,
84+ # Use scrooge_core_with_finagle to include finagle on the compile classpath
85+ # for generated thrift service code. Must use @px// prefix to reference
86+ # the main workspace from within the generated @rules_scala_toolchains repo.
87+ "scrooge_core" : "@px//src/stirling/source_connectors/socket_tracer/testing/containers/thriftmux:scrooge_core_with_finagle" ,
88+ "scrooge_generator" : "@thrift_deps//:com_twitter_scrooge_generator_2_13" ,
89+ "util_core" : "@thrift_deps//:com_twitter_util_core_2_13" ,
90+ "util_logging" : "@thrift_deps//:com_twitter_util_logging_2_13" ,
91+ "javax_annotation_api" : "@thrift_deps//:javax_annotation_javax_annotation_api" ,
92+ "mustache" : "@thrift_deps//:com_github_spullara_mustache_java_compiler" ,
93+ "scopt" : "@thrift_deps//:com_github_scopt_scopt_2_13" ,
94+ },
95+ )
6796
6897scala_register_toolchains ()
6998
@@ -183,26 +212,6 @@ load("@thrift_deps//:defs.bzl", thrift_pinned_maven_install = "pinned_maven_inst
183212
184213thrift_pinned_maven_install ()
185214
186- # twitter_scrooge will use incompatible versions of @scrooge_jars and @thrift_jars.
187- # These bind statements ensure that the correct versions of finagle libthrift, scrooge core
188- # and scrooge generator are used to ensure successful compilation.
189- # See https://github.com/bazelbuild/rules_scala/issues/592 and
190- # https://github.com/bazelbuild/rules_scala/pull/847 for more details.
191- bind (
192- name = "io_bazel_rules_scala/dependency/thrift/scrooge_core" ,
193- actual = "//src/stirling/source_connectors/socket_tracer/testing/containers/thriftmux:scrooge_jars" ,
194- )
195-
196- bind (
197- name = "io_bazel_rules_scala/dependency/thrift/scrooge_generator" ,
198- actual = "//src/stirling/source_connectors/socket_tracer/testing/containers/thriftmux:scrooge_jars" ,
199- )
200-
201- bind (
202- name = "io_bazel_rules_scala/dependency/thrift/libthrift" ,
203- actual = "//src/stirling/source_connectors/socket_tracer/testing/containers/thriftmux:thrift_jars" ,
204- )
205-
206215# gazelle:repo bazel_gazelle
207216# Gazelle depes need to be loaded last to make sure they don't override our dependencies.
208217# The first one wins when it comes to package declaration.
0 commit comments