diff --git a/3rdparty/jvm/ch/epfl/scala/BUILD b/3rdparty/jvm/ch/epfl/scala/BUILD new file mode 100644 index 00000000..d00e7ef8 --- /dev/null +++ b/3rdparty/jvm/ch/epfl/scala/BUILD @@ -0,0 +1,83 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +scala_import( + name = "scalafix_cli", + jars = [ + "//external:jar/ch/epfl/scala/scalafix_cli_3_5_1" + ], + runtime_deps = [ + "//3rdparty/jvm/com/martiansoftware:nailgun_server", + "//3rdparty/jvm/org/apache/commons:commons_text", + "//3rdparty/jvm/org/eclipse/jgit:org_eclipse_jgit", + "//3rdparty/jvm/org/scala_lang:scala3_library", + ":scalafix_interfaces", + ":scalafix_reflect", + ":scalafix_rules" + ], + visibility = [ + "//visibility:public" + ] +) + +scala_import( + name = "scalafix_core", + jars = [ + "//external:jar/ch/epfl/scala/scalafix_core_2_13" + ], + runtime_deps = [ + "//3rdparty/jvm/com/googlecode/java_diff_utils:diffutils", + "//3rdparty/jvm/org/scala_lang/modules:scala_collection_compat", + "//3rdparty/jvm/org/scala_lang:scala_library", + "//3rdparty/jvm/org/scalameta:metaconfig_typesafe_config", + "//3rdparty/jvm/org/scalameta:scalameta", + "//3rdparty/jvm/org/scalameta:semanticdb_shared" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +java_import( + name = "scalafix_interfaces", + jars = [ + "//external:jar/ch/epfl/scala/scalafix_interfaces" + ], + runtime_deps = [ + "//3rdparty/jvm/io/get_coursier:interface" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "scalafix_reflect", + jars = [ + "//external:jar/ch/epfl/scala/scalafix_reflect_2_13_15" + ], + runtime_deps = [ + "//3rdparty/jvm/org/scala_lang:scala_compiler", + "//3rdparty/jvm/org/scala_lang:scala_library", + "//3rdparty/jvm/org/scala_lang:scala_reflect", + "//3rdparty/jvm/org/scalameta:semanticdb_scalac_core", + ":scalafix_core" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "scalafix_rules", + jars = [ + "//external:jar/ch/epfl/scala/scalafix_rules_3_5_1" + ], + runtime_deps = [ + "//3rdparty/jvm/io/get_coursier:interface", + "//3rdparty/jvm/org/scala_lang:scala3_library", + "//3rdparty/jvm/org/scala_lang:scala3_presentation_compiler", + ":scalafix_core" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/com/google/code/findbugs/BUILD b/3rdparty/jvm/com/google/code/findbugs/BUILD new file mode 100644 index 00000000..723fcb6a --- /dev/null +++ b/3rdparty/jvm/com/google/code/findbugs/BUILD @@ -0,0 +1,10 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "jsr305", + jars = [ + "//external:jar/com/google/code/findbugs/jsr305" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/com/google/code/gson/BUILD b/3rdparty/jvm/com/google/code/gson/BUILD new file mode 100644 index 00000000..86a804eb --- /dev/null +++ b/3rdparty/jvm/com/google/code/gson/BUILD @@ -0,0 +1,10 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "gson", + jars = [ + "//external:jar/com/google/code/gson/gson" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/com/google/errorprone/BUILD b/3rdparty/jvm/com/google/errorprone/BUILD new file mode 100644 index 00000000..7b904df6 --- /dev/null +++ b/3rdparty/jvm/com/google/errorprone/BUILD @@ -0,0 +1,10 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "error_prone_annotations", + jars = [ + "//external:jar/com/google/errorprone/error_prone_annotations" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/com/google/guava/BUILD b/3rdparty/jvm/com/google/guava/BUILD new file mode 100644 index 00000000..aefa84eb --- /dev/null +++ b/3rdparty/jvm/com/google/guava/BUILD @@ -0,0 +1,38 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "failureaccess", + jars = [ + "//external:jar/com/google/guava/failureaccess" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +java_import( + name = "guava", + jars = [ + "//external:jar/com/google/guava/guava" + ], + runtime_deps = [ + "//3rdparty/jvm/com/google/code/findbugs:jsr305", + "//3rdparty/jvm/com/google/errorprone:error_prone_annotations", + "//3rdparty/jvm/com/google/j2objc:j2objc_annotations", + "//3rdparty/jvm/org/checkerframework:checker_qual", + ":failureaccess", + ":listenablefuture" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +java_import( + name = "listenablefuture", + jars = [ + "//external:jar/com/google/guava/listenablefuture" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/com/google/j2objc/BUILD b/3rdparty/jvm/com/google/j2objc/BUILD new file mode 100644 index 00000000..9d3604ab --- /dev/null +++ b/3rdparty/jvm/com/google/j2objc/BUILD @@ -0,0 +1,10 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "j2objc_annotations", + jars = [ + "//external:jar/com/google/j2objc/j2objc_annotations" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/com/google/protobuf/BUILD b/3rdparty/jvm/com/google/protobuf/BUILD new file mode 100644 index 00000000..331fe601 --- /dev/null +++ b/3rdparty/jvm/com/google/protobuf/BUILD @@ -0,0 +1,10 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "protobuf_java", + jars = [ + "//external:jar/com/google/protobuf/protobuf_java" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/com/googlecode/java_diff_utils/BUILD b/3rdparty/jvm/com/googlecode/java_diff_utils/BUILD new file mode 100644 index 00000000..f19af142 --- /dev/null +++ b/3rdparty/jvm/com/googlecode/java_diff_utils/BUILD @@ -0,0 +1,10 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "diffutils", + jars = [ + "//external:jar/com/googlecode/java_diff_utils/diffutils" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/com/googlecode/javaewah/BUILD b/3rdparty/jvm/com/googlecode/javaewah/BUILD new file mode 100644 index 00000000..2e82de40 --- /dev/null +++ b/3rdparty/jvm/com/googlecode/javaewah/BUILD @@ -0,0 +1,10 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "JavaEWAH", + jars = [ + "//external:jar/com/googlecode/javaewah/JavaEWAH" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/com/lihaoyi/BUILD b/3rdparty/jvm/com/lihaoyi/BUILD new file mode 100644 index 00000000..9fda8526 --- /dev/null +++ b/3rdparty/jvm/com/lihaoyi/BUILD @@ -0,0 +1,27 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +scala_import( + name = "fansi", + jars = [ + "//external:jar/com/lihaoyi/fansi_2_13" + ], + runtime_deps = [ + "//3rdparty/jvm/org/scala_lang:scala_library", + ":sourcecode" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "sourcecode", + jars = [ + "//external:jar/com/lihaoyi/sourcecode_2_13" + ], + runtime_deps = [ + "//3rdparty/jvm/org/scala_lang:scala_library" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/com/martiansoftware/BUILD b/3rdparty/jvm/com/martiansoftware/BUILD new file mode 100644 index 00000000..96d54456 --- /dev/null +++ b/3rdparty/jvm/com/martiansoftware/BUILD @@ -0,0 +1,10 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "nailgun_server", + jars = [ + "//external:jar/com/martiansoftware/nailgun_server" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/com/thesamet/scalapb/BUILD b/3rdparty/jvm/com/thesamet/scalapb/BUILD new file mode 100644 index 00000000..7ba67c1c --- /dev/null +++ b/3rdparty/jvm/com/thesamet/scalapb/BUILD @@ -0,0 +1,30 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +scala_import( + name = "lenses", + jars = [ + "//external:jar/com/thesamet/scalapb/lenses_2_13" + ], + runtime_deps = [ + "//3rdparty/jvm/org/scala_lang/modules:scala_collection_compat", + "//3rdparty/jvm/org/scala_lang:scala_library" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "scalapb_runtime", + jars = [ + "//external:jar/com/thesamet/scalapb/scalapb_runtime_2_13" + ], + runtime_deps = [ + "//3rdparty/jvm/com/google/protobuf:protobuf_java", + "//3rdparty/jvm/org/scala_lang/modules:scala_collection_compat", + "//3rdparty/jvm/org/scala_lang:scala_library", + ":lenses" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/com/typesafe/BUILD b/3rdparty/jvm/com/typesafe/BUILD new file mode 100644 index 00000000..844eba76 --- /dev/null +++ b/3rdparty/jvm/com/typesafe/BUILD @@ -0,0 +1,10 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "config", + jars = [ + "//external:jar/com/typesafe/config" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/io/get_coursier/BUILD b/3rdparty/jvm/io/get_coursier/BUILD new file mode 100644 index 00000000..5b4b4269 --- /dev/null +++ b/3rdparty/jvm/io/get_coursier/BUILD @@ -0,0 +1,13 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "interface", + jars = [ + "//external:jar/io/get_coursier/interface" + ], + runtime_deps = [ + "//3rdparty/jvm/org/slf4j:slf4j_api" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/io/github/java_diff_utils/BUILD b/3rdparty/jvm/io/github/java_diff_utils/BUILD new file mode 100644 index 00000000..35b132aa --- /dev/null +++ b/3rdparty/jvm/io/github/java_diff_utils/BUILD @@ -0,0 +1,10 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "java_diff_utils", + jars = [ + "//external:jar/io/github/java_diff_utils/java_diff_utils" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/net/java/dev/jna/BUILD b/3rdparty/jvm/net/java/dev/jna/BUILD new file mode 100644 index 00000000..b1e2fc25 --- /dev/null +++ b/3rdparty/jvm/net/java/dev/jna/BUILD @@ -0,0 +1,10 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "jna", + jars = [ + "//external:jar/net/java/dev/jna/jna" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/org/apache/commons/BUILD b/3rdparty/jvm/org/apache/commons/BUILD index 5eef1a07..81fb8198 100644 --- a/3rdparty/jvm/org/apache/commons/BUILD +++ b/3rdparty/jvm/org/apache/commons/BUILD @@ -1,4 +1,14 @@ load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "commons_lang3", + jars = [ + "//external:jar/org/apache/commons/commons_lang3" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + java_import( name = "commons_math3", jars = [ @@ -8,3 +18,16 @@ java_import( "//3rdparty/jvm:__subpackages__" ] ) + +java_import( + name = "commons_text", + jars = [ + "//external:jar/org/apache/commons/commons_text" + ], + runtime_deps = [ + ":commons_lang3" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/org/checkerframework/BUILD b/3rdparty/jvm/org/checkerframework/BUILD new file mode 100644 index 00000000..4b1b5f83 --- /dev/null +++ b/3rdparty/jvm/org/checkerframework/BUILD @@ -0,0 +1,10 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "checker_qual", + jars = [ + "//external:jar/org/checkerframework/checker_qual" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/org/eclipse/jgit/BUILD b/3rdparty/jvm/org/eclipse/jgit/BUILD new file mode 100644 index 00000000..519fde08 --- /dev/null +++ b/3rdparty/jvm/org/eclipse/jgit/BUILD @@ -0,0 +1,14 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "org_eclipse_jgit", + jars = [ + "//external:jar/org/eclipse/jgit/org_eclipse_jgit" + ], + runtime_deps = [ + "//3rdparty/jvm/com/googlecode/javaewah:JavaEWAH", + "//3rdparty/jvm/org/slf4j:slf4j_api" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/org/eclipse/lsp4j/BUILD b/3rdparty/jvm/org/eclipse/lsp4j/BUILD new file mode 100644 index 00000000..6277013a --- /dev/null +++ b/3rdparty/jvm/org/eclipse/lsp4j/BUILD @@ -0,0 +1,41 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "org_eclipse_lsp4j", + jars = [ + "//external:jar/org/eclipse/lsp4j/org_eclipse_lsp4j" + ], + runtime_deps = [ + ":org_eclipse_lsp4j_generator", + ":org_eclipse_lsp4j_jsonrpc" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +java_import( + name = "org_eclipse_lsp4j_generator", + jars = [ + "//external:jar/org/eclipse/lsp4j/org_eclipse_lsp4j_generator" + ], + runtime_deps = [ + "//3rdparty/jvm/org/eclipse/xtend:org_eclipse_xtend_lib", + ":org_eclipse_lsp4j_jsonrpc" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +java_import( + name = "org_eclipse_lsp4j_jsonrpc", + jars = [ + "//external:jar/org/eclipse/lsp4j/org_eclipse_lsp4j_jsonrpc" + ], + runtime_deps = [ + "//3rdparty/jvm/com/google/code/gson:gson" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/org/eclipse/xtend/BUILD b/3rdparty/jvm/org/eclipse/xtend/BUILD new file mode 100644 index 00000000..8a5dd720 --- /dev/null +++ b/3rdparty/jvm/org/eclipse/xtend/BUILD @@ -0,0 +1,27 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "org_eclipse_xtend_lib", + jars = [ + "//external:jar/org/eclipse/xtend/org_eclipse_xtend_lib" + ], + runtime_deps = [ + "//3rdparty/jvm/org/eclipse/xtext:org_eclipse_xtext_xbase_lib", + ":org_eclipse_xtend_lib_macro" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +java_import( + name = "org_eclipse_xtend_lib_macro", + jars = [ + "//external:jar/org/eclipse/xtend/org_eclipse_xtend_lib_macro" + ], + runtime_deps = [ + "//3rdparty/jvm/org/eclipse/xtext:org_eclipse_xtext_xbase_lib" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/org/eclipse/xtext/BUILD b/3rdparty/jvm/org/eclipse/xtext/BUILD new file mode 100644 index 00000000..b416a0eb --- /dev/null +++ b/3rdparty/jvm/org/eclipse/xtext/BUILD @@ -0,0 +1,13 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "org_eclipse_xtext_xbase_lib", + jars = [ + "//external:jar/org/eclipse/xtext/org_eclipse_xtext_xbase_lib" + ], + runtime_deps = [ + "//3rdparty/jvm/com/google/guava:guava" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/org/jline/BUILD b/3rdparty/jvm/org/jline/BUILD new file mode 100644 index 00000000..59b90c61 --- /dev/null +++ b/3rdparty/jvm/org/jline/BUILD @@ -0,0 +1,60 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "jline", + jars = [ + "//external:jar/org/jline/jline" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +java_import( + name = "jline_native", + jars = [ + "//external:jar/org/jline/jline_native" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +java_import( + name = "jline_reader", + jars = [ + "//external:jar/org/jline/jline_reader" + ], + runtime_deps = [ + ":jline_terminal" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +java_import( + name = "jline_terminal", + jars = [ + "//external:jar/org/jline/jline_terminal" + ], + runtime_deps = [ + ":jline_native" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +java_import( + name = "jline_terminal_jna", + jars = [ + "//external:jar/org/jline/jline_terminal_jna" + ], + runtime_deps = [ + "//3rdparty/jvm/net/java/dev/jna:jna", + ":jline_terminal" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/org/lz4/BUILD b/3rdparty/jvm/org/lz4/BUILD new file mode 100644 index 00000000..5fa920ca --- /dev/null +++ b/3rdparty/jvm/org/lz4/BUILD @@ -0,0 +1,10 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "lz4_java", + jars = [ + "//external:jar/org/lz4/lz4_java" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/org/scala_lang/BUILD b/3rdparty/jvm/org/scala_lang/BUILD index a9a9d19a..0c9b6e9d 100644 --- a/3rdparty/jvm/org/scala_lang/BUILD +++ b/3rdparty/jvm/org/scala_lang/BUILD @@ -1,4 +1,34 @@ load("@rules_scala3//rules:scala.bzl", "scala_import") +scala_import( + name = "scala3_compiler", + jars = [ + "//external:jar/org/scala_lang/scala3_compiler_3" + ], + runtime_deps = [ + "//3rdparty/jvm/org/jline:jline_reader", + "//3rdparty/jvm/org/jline:jline_terminal", + "//3rdparty/jvm/org/jline:jline_terminal_jna", + "//3rdparty/jvm/org/scala_lang/modules:scala_asm", + "//3rdparty/jvm/org/scala_sbt:compiler_interface", + ":scala3_interfaces", + ":scala3_library", + ":tasty_core" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "scala3_interfaces", + jars = [ + "//external:jar/org/scala_lang/scala3_interfaces" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + scala_import( name = "scala3_library", exports = [ @@ -8,3 +38,84 @@ scala_import( "//3rdparty/jvm:__subpackages__" ] ) + +scala_import( + name = "scala3_presentation_compiler", + jars = [ + "//external:jar/org/scala_lang/scala3_presentation_compiler_3" + ], + runtime_deps = [ + "//3rdparty/jvm/io/get_coursier:interface", + "//3rdparty/jvm/org/eclipse/lsp4j:org_eclipse_lsp4j", + "//3rdparty/jvm/org/lz4:lz4_java", + "//3rdparty/jvm/org/scalameta:mtags_interfaces", + ":scala3_compiler", + ":scala3_library" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "scala_compiler", + jars = [ + "//external:jar/org/scala_lang/scala_compiler" + ], + runtime_deps = [ + "//3rdparty/jvm/io/github/java_diff_utils:java_diff_utils", + "//3rdparty/jvm/net/java/dev/jna:jna", + "//3rdparty/jvm/org/jline:jline", + ":scala_library", + ":scala_reflect" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "scala_library", + exports = [ + "@scala_library_2_13//jar" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "scala_reflect", + exports = [ + "@scala_reflect_2_13//jar" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "scalap", + jars = [ + "//external:jar/org/scala_lang/scalap" + ], + runtime_deps = [ + ":scala_compiler" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "tasty_core", + jars = [ + "//external:jar/org/scala_lang/tasty_core_3" + ], + runtime_deps = [ + ":scala3_library" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/org/scala_lang/modules/BUILD b/3rdparty/jvm/org/scala_lang/modules/BUILD new file mode 100644 index 00000000..692966ce --- /dev/null +++ b/3rdparty/jvm/org/scala_lang/modules/BUILD @@ -0,0 +1,23 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "scala_asm", + jars = [ + "//external:jar/org/scala_lang/modules/scala_asm" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "scala_collection_compat", + jars = [ + "//external:jar/org/scala_lang/modules/scala_collection_compat_2_13" + ], + runtime_deps = [ + "//3rdparty/jvm/org/scala_lang:scala_library" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/org/scala_sbt/BUILD b/3rdparty/jvm/org/scala_sbt/BUILD new file mode 100644 index 00000000..3655a258 --- /dev/null +++ b/3rdparty/jvm/org/scala_sbt/BUILD @@ -0,0 +1,23 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +scala_import( + name = "compiler_interface", + jars = [ + "//external:jar/org/scala_sbt/compiler_interface" + ], + runtime_deps = [ + ":util_interface" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +java_import( + name = "util_interface", + jars = [ + "//external:jar/org/scala_sbt/util_interface" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/org/scalameta/BUILD b/3rdparty/jvm/org/scalameta/BUILD new file mode 100644 index 00000000..57006465 --- /dev/null +++ b/3rdparty/jvm/org/scalameta/BUILD @@ -0,0 +1,158 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +scala_import( + name = "common", + jars = [ + "//external:jar/org/scalameta/common_2_13" + ], + runtime_deps = [ + "//3rdparty/jvm/com/lihaoyi:sourcecode", + "//3rdparty/jvm/org/scala_lang:scala_library" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "metaconfig_core", + jars = [ + "//external:jar/org/scalameta/metaconfig_core_2_13" + ], + runtime_deps = [ + "//3rdparty/jvm/org/scala_lang/modules:scala_collection_compat", + "//3rdparty/jvm/org/scala_lang:scala_library", + "//3rdparty/jvm/org/scala_lang:scala_reflect", + "//3rdparty/jvm/org/typelevel:paiges_core", + ":metaconfig_pprint" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "metaconfig_pprint", + jars = [ + "//external:jar/org/scalameta/metaconfig_pprint_2_13" + ], + runtime_deps = [ + "//3rdparty/jvm/com/lihaoyi:fansi", + "//3rdparty/jvm/org/scala_lang:scala_compiler", + "//3rdparty/jvm/org/scala_lang:scala_library", + "//3rdparty/jvm/org/scala_lang:scala_reflect" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "metaconfig_typesafe_config", + jars = [ + "//external:jar/org/scalameta/metaconfig_typesafe_config_2_13" + ], + runtime_deps = [ + "//3rdparty/jvm/com/typesafe:config", + "//3rdparty/jvm/org/scala_lang:scala_library", + ":metaconfig_core" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +java_import( + name = "mtags_interfaces", + jars = [ + "//external:jar/org/scalameta/mtags_interfaces" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "parsers", + jars = [ + "//external:jar/org/scalameta/parsers_2_13" + ], + runtime_deps = [ + "//3rdparty/jvm/org/scala_lang:scala_library", + ":trees" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "scalameta", + jars = [ + "//external:jar/org/scalameta/scalameta_2_13" + ], + runtime_deps = [ + "//3rdparty/jvm/org/scala_lang:scala_library", + "//3rdparty/jvm/org/scala_lang:scalap", + ":parsers" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "semanticdb_scalac", + jars = [ + "//external:jar/org/scalameta/semanticdb_scalac_2_13_15" + ], + runtime_deps = [ + "//3rdparty/jvm/org/scala_lang:scala_library" + ], + visibility = [ + "//visibility:public" + ] +) + +scala_import( + name = "semanticdb_scalac_core", + jars = [ + "//external:jar/org/scalameta/semanticdb_scalac_core_2_13_15" + ], + runtime_deps = [ + "//3rdparty/jvm/org/scala_lang:scala_compiler", + "//3rdparty/jvm/org/scala_lang:scala_library", + ":semanticdb_shared" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "semanticdb_shared", + jars = [ + "//external:jar/org/scalameta/semanticdb_shared_2_13" + ], + runtime_deps = [ + "//3rdparty/jvm/com/thesamet/scalapb:scalapb_runtime", + "//3rdparty/jvm/org/scala_lang:scala_library", + ":scalameta" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + +scala_import( + name = "trees", + jars = [ + "//external:jar/org/scalameta/trees_2_13" + ], + runtime_deps = [ + "//3rdparty/jvm/org/scala_lang:scala_library", + ":common" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/org/slf4j/BUILD b/3rdparty/jvm/org/slf4j/BUILD new file mode 100644 index 00000000..61f443b9 --- /dev/null +++ b/3rdparty/jvm/org/slf4j/BUILD @@ -0,0 +1,10 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +java_import( + name = "slf4j_api", + jars = [ + "//external:jar/org/slf4j/slf4j_api" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/jvm/org/typelevel/BUILD b/3rdparty/jvm/org/typelevel/BUILD new file mode 100644 index 00000000..62fc4add --- /dev/null +++ b/3rdparty/jvm/org/typelevel/BUILD @@ -0,0 +1,13 @@ +load("@rules_scala3//rules:scala.bzl", "scala_import") +scala_import( + name = "paiges_core", + jars = [ + "//external:jar/org/typelevel/paiges_core_2_13" + ], + runtime_deps = [ + "//3rdparty/jvm/org/scala_lang:scala_library" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) diff --git a/3rdparty/workspace.bzl b/3rdparty/workspace.bzl index b88ca2f7..a9f0a85d 100644 --- a/3rdparty/workspace.bzl +++ b/3rdparty/workspace.bzl @@ -39,14 +39,77 @@ def jar_artifact_callback(hash): def list_dependencies(): return [ + {"artifact":"ch.epfl.scala:scalafix-cli_3.5.1:0.13.0","url":"https://repo1.maven.org/maven2/ch/epfl/scala/scalafix-cli_3.5.1/0.13.0/scalafix-cli_3.5.1-0.13.0.jar","name":"ch_epfl_scala_scalafix_cli_3_5_1","actual":"@ch_epfl_scala_scalafix_cli_3_5_1//jar","bind": "jar/ch/epfl/scala/scalafix_cli_3_5_1"}, + {"artifact":"ch.epfl.scala:scalafix-core_2.13:0.13.0","url":"https://repo1.maven.org/maven2/ch/epfl/scala/scalafix-core_2.13/0.13.0/scalafix-core_2.13-0.13.0.jar","name":"ch_epfl_scala_scalafix_core_2_13","actual":"@ch_epfl_scala_scalafix_core_2_13//jar","bind": "jar/ch/epfl/scala/scalafix_core_2_13"}, + {"artifact":"ch.epfl.scala:scalafix-interfaces:0.13.0","url":"https://repo1.maven.org/maven2/ch/epfl/scala/scalafix-interfaces/0.13.0/scalafix-interfaces-0.13.0.jar","name":"ch_epfl_scala_scalafix_interfaces","actual":"@ch_epfl_scala_scalafix_interfaces//jar","bind": "jar/ch/epfl/scala/scalafix_interfaces"}, + {"artifact":"ch.epfl.scala:scalafix-reflect_2.13.15:0.13.0","url":"https://repo1.maven.org/maven2/ch/epfl/scala/scalafix-reflect_2.13.15/0.13.0/scalafix-reflect_2.13.15-0.13.0.jar","name":"ch_epfl_scala_scalafix_reflect_2_13_15","actual":"@ch_epfl_scala_scalafix_reflect_2_13_15//jar","bind": "jar/ch/epfl/scala/scalafix_reflect_2_13_15"}, + {"artifact":"ch.epfl.scala:scalafix-rules_3.5.1:0.13.0","url":"https://repo1.maven.org/maven2/ch/epfl/scala/scalafix-rules_3.5.1/0.13.0/scalafix-rules_3.5.1-0.13.0.jar","name":"ch_epfl_scala_scalafix_rules_3_5_1","actual":"@ch_epfl_scala_scalafix_rules_3_5_1//jar","bind": "jar/ch/epfl/scala/scalafix_rules_3_5_1"}, {"artifact":"com.github.scopt:scopt_3:4.1.0","url":"https://repo1.maven.org/maven2/com/github/scopt/scopt_3/4.1.0/scopt_3-4.1.0.jar","name":"com_github_scopt_scopt_3","actual":"@com_github_scopt_scopt_3//jar","bind": "jar/com/github/scopt/scopt_3"}, + {"artifact":"com.google.code.findbugs:jsr305:3.0.2","url":"https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar","name":"com_google_code_findbugs_jsr305","actual":"@com_google_code_findbugs_jsr305//jar","bind": "jar/com/google/code/findbugs/jsr305"}, + {"artifact":"com.google.code.gson:gson:2.10.1","url":"https://repo1.maven.org/maven2/com/google/code/gson/gson/2.10.1/gson-2.10.1.jar","name":"com_google_code_gson_gson","actual":"@com_google_code_gson_gson//jar","bind": "jar/com/google/code/gson/gson"}, + {"artifact":"com.google.errorprone:error_prone_annotations:2.3.4","url":"https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4.jar","name":"com_google_errorprone_error_prone_annotations","actual":"@com_google_errorprone_error_prone_annotations//jar","bind": "jar/com/google/errorprone/error_prone_annotations"}, + {"artifact":"com.google.guava:failureaccess:1.0.1","url":"https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar","name":"com_google_guava_failureaccess","actual":"@com_google_guava_failureaccess//jar","bind": "jar/com/google/guava/failureaccess"}, + {"artifact":"com.google.guava:guava:30.1-jre","url":"https://repo1.maven.org/maven2/com/google/guava/guava/30.1-jre/guava-30.1-jre.jar","name":"com_google_guava_guava","actual":"@com_google_guava_guava//jar","bind": "jar/com/google/guava/guava"}, + {"artifact":"com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava","url":"https://repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar","name":"com_google_guava_listenablefuture","actual":"@com_google_guava_listenablefuture//jar","bind": "jar/com/google/guava/listenablefuture"}, + {"artifact":"com.google.j2objc:j2objc-annotations:1.3","url":"https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar","name":"com_google_j2objc_j2objc_annotations","actual":"@com_google_j2objc_j2objc_annotations//jar","bind": "jar/com/google/j2objc/j2objc_annotations"}, + {"artifact":"com.google.protobuf:protobuf-java:3.19.6","url":"https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.19.6/protobuf-java-3.19.6.jar","name":"com_google_protobuf_protobuf_java","actual":"@com_google_protobuf_protobuf_java//jar","bind": "jar/com/google/protobuf/protobuf_java"}, + {"artifact":"com.googlecode.java-diff-utils:diffutils:1.3.0","url":"https://repo1.maven.org/maven2/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar","name":"com_googlecode_java_diff_utils_diffutils","actual":"@com_googlecode_java_diff_utils_diffutils//jar","bind": "jar/com/googlecode/java_diff_utils/diffutils"}, + {"artifact":"com.googlecode.javaewah:JavaEWAH:1.1.13","url":"https://repo1.maven.org/maven2/com/googlecode/javaewah/JavaEWAH/1.1.13/JavaEWAH-1.1.13.jar","name":"com_googlecode_javaewah_JavaEWAH","actual":"@com_googlecode_javaewah_JavaEWAH//jar","bind": "jar/com/googlecode/javaewah/JavaEWAH"}, + {"artifact":"com.lihaoyi:fansi_2.13:0.5.0","url":"https://repo1.maven.org/maven2/com/lihaoyi/fansi_2.13/0.5.0/fansi_2.13-0.5.0.jar","name":"com_lihaoyi_fansi_2_13","actual":"@com_lihaoyi_fansi_2_13//jar","bind": "jar/com/lihaoyi/fansi_2_13"}, + {"artifact":"com.lihaoyi:sourcecode_2.13:0.4.2","url":"https://repo1.maven.org/maven2/com/lihaoyi/sourcecode_2.13/0.4.2/sourcecode_2.13-0.4.2.jar","name":"com_lihaoyi_sourcecode_2_13","actual":"@com_lihaoyi_sourcecode_2_13//jar","bind": "jar/com/lihaoyi/sourcecode_2_13"}, + {"artifact":"com.martiansoftware:nailgun-server:0.9.1","url":"https://repo1.maven.org/maven2/com/martiansoftware/nailgun-server/0.9.1/nailgun-server-0.9.1.jar","name":"com_martiansoftware_nailgun_server","actual":"@com_martiansoftware_nailgun_server//jar","bind": "jar/com/martiansoftware/nailgun_server"}, + {"artifact":"com.thesamet.scalapb:lenses_2.13:0.11.15","url":"https://repo1.maven.org/maven2/com/thesamet/scalapb/lenses_2.13/0.11.15/lenses_2.13-0.11.15.jar","name":"com_thesamet_scalapb_lenses_2_13","actual":"@com_thesamet_scalapb_lenses_2_13//jar","bind": "jar/com/thesamet/scalapb/lenses_2_13"}, + {"artifact":"com.thesamet.scalapb:scalapb-runtime_2.13:0.11.15","url":"https://repo1.maven.org/maven2/com/thesamet/scalapb/scalapb-runtime_2.13/0.11.15/scalapb-runtime_2.13-0.11.15.jar","name":"com_thesamet_scalapb_scalapb_runtime_2_13","actual":"@com_thesamet_scalapb_scalapb_runtime_2_13//jar","bind": "jar/com/thesamet/scalapb/scalapb_runtime_2_13"}, + {"artifact":"com.typesafe:config:1.4.3","url":"https://repo1.maven.org/maven2/com/typesafe/config/1.4.3/config-1.4.3.jar","name":"com_typesafe_config","actual":"@com_typesafe_config//jar","bind": "jar/com/typesafe/config"}, + {"artifact":"io.get-coursier:interface:1.0.20","url":"https://repo1.maven.org/maven2/io/get-coursier/interface/1.0.20/interface-1.0.20.jar","name":"io_get_coursier_interface","actual":"@io_get_coursier_interface//jar","bind": "jar/io/get_coursier/interface"}, + {"artifact":"io.github.java-diff-utils:java-diff-utils:4.12","url":"https://repo1.maven.org/maven2/io/github/java-diff-utils/java-diff-utils/4.12/java-diff-utils-4.12.jar","name":"io_github_java_diff_utils_java_diff_utils","actual":"@io_github_java_diff_utils_java_diff_utils//jar","bind": "jar/io/github/java_diff_utils/java_diff_utils"}, + {"artifact":"net.java.dev.jna:jna:5.15.0","url":"https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.15.0/jna-5.15.0.jar","name":"net_java_dev_jna_jna","actual":"@net_java_dev_jna_jna//jar","bind": "jar/net/java/dev/jna/jna"}, {"artifact":"net.sf.jopt-simple:jopt-simple:5.0.4","url":"https://repo1.maven.org/maven2/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar","name":"net_sf_jopt_simple_jopt_simple","actual":"@net_sf_jopt_simple_jopt_simple//jar","bind": "jar/net/sf/jopt_simple/jopt_simple"}, + {"artifact":"org.apache.commons:commons-lang3:3.14.0","url":"https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.14.0/commons-lang3-3.14.0.jar","name":"org_apache_commons_commons_lang3","actual":"@org_apache_commons_commons_lang3//jar","bind": "jar/org/apache/commons/commons_lang3"}, {"artifact":"org.apache.commons:commons-math3:3.6.1","url":"https://repo1.maven.org/maven2/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1.jar","name":"org_apache_commons_commons_math3","actual":"@org_apache_commons_commons_math3//jar","bind": "jar/org/apache/commons/commons_math3"}, + {"artifact":"org.apache.commons:commons-text:1.12.0","url":"https://repo1.maven.org/maven2/org/apache/commons/commons-text/1.12.0/commons-text-1.12.0.jar","name":"org_apache_commons_commons_text","actual":"@org_apache_commons_commons_text//jar","bind": "jar/org/apache/commons/commons_text"}, + {"artifact":"org.checkerframework:checker-qual:3.5.0","url":"https://repo1.maven.org/maven2/org/checkerframework/checker-qual/3.5.0/checker-qual-3.5.0.jar","name":"org_checkerframework_checker_qual","actual":"@org_checkerframework_checker_qual//jar","bind": "jar/org/checkerframework/checker_qual"}, + {"artifact":"org.eclipse.jgit:org.eclipse.jgit:5.13.3.202401111512-r","url":"https://repo1.maven.org/maven2/org/eclipse/jgit/org.eclipse.jgit/5.13.3.202401111512-r/org.eclipse.jgit-5.13.3.202401111512-r.jar","name":"org_eclipse_jgit_org_eclipse_jgit","actual":"@org_eclipse_jgit_org_eclipse_jgit//jar","bind": "jar/org/eclipse/jgit/org_eclipse_jgit"}, + {"artifact":"org.eclipse.lsp4j:org.eclipse.lsp4j:0.20.1","url":"https://repo1.maven.org/maven2/org/eclipse/lsp4j/org.eclipse.lsp4j/0.20.1/org.eclipse.lsp4j-0.20.1.jar","name":"org_eclipse_lsp4j_org_eclipse_lsp4j","actual":"@org_eclipse_lsp4j_org_eclipse_lsp4j//jar","bind": "jar/org/eclipse/lsp4j/org_eclipse_lsp4j"}, + {"artifact":"org.eclipse.lsp4j:org.eclipse.lsp4j.generator:0.20.1","url":"https://repo1.maven.org/maven2/org/eclipse/lsp4j/org.eclipse.lsp4j.generator/0.20.1/org.eclipse.lsp4j.generator-0.20.1.jar","name":"org_eclipse_lsp4j_org_eclipse_lsp4j_generator","actual":"@org_eclipse_lsp4j_org_eclipse_lsp4j_generator//jar","bind": "jar/org/eclipse/lsp4j/org_eclipse_lsp4j_generator"}, + {"artifact":"org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc:0.20.1","url":"https://repo1.maven.org/maven2/org/eclipse/lsp4j/org.eclipse.lsp4j.jsonrpc/0.20.1/org.eclipse.lsp4j.jsonrpc-0.20.1.jar","name":"org_eclipse_lsp4j_org_eclipse_lsp4j_jsonrpc","actual":"@org_eclipse_lsp4j_org_eclipse_lsp4j_jsonrpc//jar","bind": "jar/org/eclipse/lsp4j/org_eclipse_lsp4j_jsonrpc"}, + {"artifact":"org.eclipse.xtend:org.eclipse.xtend.lib:2.28.0","url":"https://repo1.maven.org/maven2/org/eclipse/xtend/org.eclipse.xtend.lib/2.28.0/org.eclipse.xtend.lib-2.28.0.jar","name":"org_eclipse_xtend_org_eclipse_xtend_lib","actual":"@org_eclipse_xtend_org_eclipse_xtend_lib//jar","bind": "jar/org/eclipse/xtend/org_eclipse_xtend_lib"}, + {"artifact":"org.eclipse.xtend:org.eclipse.xtend.lib.macro:2.28.0","url":"https://repo1.maven.org/maven2/org/eclipse/xtend/org.eclipse.xtend.lib.macro/2.28.0/org.eclipse.xtend.lib.macro-2.28.0.jar","name":"org_eclipse_xtend_org_eclipse_xtend_lib_macro","actual":"@org_eclipse_xtend_org_eclipse_xtend_lib_macro//jar","bind": "jar/org/eclipse/xtend/org_eclipse_xtend_lib_macro"}, + {"artifact":"org.eclipse.xtext:org.eclipse.xtext.xbase.lib:2.28.0","url":"https://repo1.maven.org/maven2/org/eclipse/xtext/org.eclipse.xtext.xbase.lib/2.28.0/org.eclipse.xtext.xbase.lib-2.28.0.jar","name":"org_eclipse_xtext_org_eclipse_xtext_xbase_lib","actual":"@org_eclipse_xtext_org_eclipse_xtext_xbase_lib//jar","bind": "jar/org/eclipse/xtext/org_eclipse_xtext_xbase_lib"}, + {"artifact":"org.jline:jline:3.26.3","url":"https://repo1.maven.org/maven2/org/jline/jline/3.26.3/jline-3.26.3.jar","name":"org_jline_jline","actual":"@org_jline_jline//jar","bind": "jar/org/jline/jline"}, + {"artifact":"org.jline:jline-native:3.27.0","url":"https://repo1.maven.org/maven2/org/jline/jline-native/3.27.0/jline-native-3.27.0.jar","name":"org_jline_jline_native","actual":"@org_jline_jline_native//jar","bind": "jar/org/jline/jline_native"}, + {"artifact":"org.jline:jline-reader:3.27.0","url":"https://repo1.maven.org/maven2/org/jline/jline-reader/3.27.0/jline-reader-3.27.0.jar","name":"org_jline_jline_reader","actual":"@org_jline_jline_reader//jar","bind": "jar/org/jline/jline_reader"}, + {"artifact":"org.jline:jline-terminal:3.27.0","url":"https://repo1.maven.org/maven2/org/jline/jline-terminal/3.27.0/jline-terminal-3.27.0.jar","name":"org_jline_jline_terminal","actual":"@org_jline_jline_terminal//jar","bind": "jar/org/jline/jline_terminal"}, + {"artifact":"org.jline:jline-terminal-jna:3.27.0","url":"https://repo1.maven.org/maven2/org/jline/jline-terminal-jna/3.27.0/jline-terminal-jna-3.27.0.jar","name":"org_jline_jline_terminal_jna","actual":"@org_jline_jline_terminal_jna//jar","bind": "jar/org/jline/jline_terminal_jna"}, + {"artifact":"org.lz4:lz4-java:1.8.0","url":"https://repo1.maven.org/maven2/org/lz4/lz4-java/1.8.0/lz4-java-1.8.0.jar","name":"org_lz4_lz4_java","actual":"@org_lz4_lz4_java//jar","bind": "jar/org/lz4/lz4_java"}, {"artifact":"org.openjdk.jmh:jmh-core:1.37","url":"https://repo1.maven.org/maven2/org/openjdk/jmh/jmh-core/1.37/jmh-core-1.37.jar","name":"org_openjdk_jmh_jmh_core","actual":"@org_openjdk_jmh_jmh_core//jar","bind": "jar/org/openjdk/jmh/jmh_core"}, {"artifact":"org.openjdk.jmh:jmh-generator-asm:1.37","url":"https://repo1.maven.org/maven2/org/openjdk/jmh/jmh-generator-asm/1.37/jmh-generator-asm-1.37.jar","name":"org_openjdk_jmh_jmh_generator_asm","actual":"@org_openjdk_jmh_jmh_generator_asm//jar","bind": "jar/org/openjdk/jmh/jmh_generator_asm"}, {"artifact":"org.openjdk.jmh:jmh-generator-bytecode:1.37","url":"https://repo1.maven.org/maven2/org/openjdk/jmh/jmh-generator-bytecode/1.37/jmh-generator-bytecode-1.37.jar","name":"org_openjdk_jmh_jmh_generator_bytecode","actual":"@org_openjdk_jmh_jmh_generator_bytecode//jar","bind": "jar/org/openjdk/jmh/jmh_generator_bytecode"}, {"artifact":"org.openjdk.jmh:jmh-generator-reflection:1.37","url":"https://repo1.maven.org/maven2/org/openjdk/jmh/jmh-generator-reflection/1.37/jmh-generator-reflection-1.37.jar","name":"org_openjdk_jmh_jmh_generator_reflection","actual":"@org_openjdk_jmh_jmh_generator_reflection//jar","bind": "jar/org/openjdk/jmh/jmh_generator_reflection"}, {"artifact":"org.ow2.asm:asm:9.0","url":"https://repo1.maven.org/maven2/org/ow2/asm/asm/9.0/asm-9.0.jar","name":"org_ow2_asm_asm","actual":"@org_ow2_asm_asm//jar","bind": "jar/org/ow2/asm/asm"}, + {"artifact":"org.scala-lang.modules:scala-asm:9.7.0-scala-2","url":"https://repo1.maven.org/maven2/org/scala-lang/modules/scala-asm/9.7.0-scala-2/scala-asm-9.7.0-scala-2.jar","name":"org_scala_lang_modules_scala_asm","actual":"@org_scala_lang_modules_scala_asm//jar","bind": "jar/org/scala_lang/modules/scala_asm"}, + {"artifact":"org.scala-lang.modules:scala-collection-compat_2.13:2.12.0","url":"https://repo1.maven.org/maven2/org/scala-lang/modules/scala-collection-compat_2.13/2.12.0/scala-collection-compat_2.13-2.12.0.jar","name":"org_scala_lang_modules_scala_collection_compat_2_13","actual":"@org_scala_lang_modules_scala_collection_compat_2_13//jar","bind": "jar/org/scala_lang/modules/scala_collection_compat_2_13"}, + {"artifact":"org.scala-lang:scala3-compiler_3:3.6.1","url":"https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.6.1/scala3-compiler_3-3.6.1.jar","name":"org_scala_lang_scala3_compiler_3","actual":"@org_scala_lang_scala3_compiler_3//jar","bind": "jar/org/scala_lang/scala3_compiler_3"}, + {"artifact":"org.scala-lang:scala3-interfaces:3.6.1","url":"https://repo1.maven.org/maven2/org/scala-lang/scala3-interfaces/3.6.1/scala3-interfaces-3.6.1.jar","name":"org_scala_lang_scala3_interfaces","actual":"@org_scala_lang_scala3_interfaces//jar","bind": "jar/org/scala_lang/scala3_interfaces"}, + {"artifact":"org.scala-lang:scala3-presentation-compiler_3:3.5.1","url":"https://repo1.maven.org/maven2/org/scala-lang/scala3-presentation-compiler_3/3.5.1/scala3-presentation-compiler_3-3.5.1.jar","name":"org_scala_lang_scala3_presentation_compiler_3","actual":"@org_scala_lang_scala3_presentation_compiler_3//jar","bind": "jar/org/scala_lang/scala3_presentation_compiler_3"}, + {"artifact":"org.scala-lang:scala-compiler:2.13.15","url":"https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.13.15/scala-compiler-2.13.15.jar","name":"org_scala_lang_scala_compiler","actual":"@org_scala_lang_scala_compiler//jar","bind": "jar/org/scala_lang/scala_compiler"}, + {"artifact":"org.scala-lang:scalap:2.13.12","url":"https://repo1.maven.org/maven2/org/scala-lang/scalap/2.13.12/scalap-2.13.12.jar","name":"org_scala_lang_scalap","actual":"@org_scala_lang_scalap//jar","bind": "jar/org/scala_lang/scalap"}, + {"artifact":"org.scala-lang:tasty-core_3:3.6.1","url":"https://repo1.maven.org/maven2/org/scala-lang/tasty-core_3/3.6.1/tasty-core_3-3.6.1.jar","name":"org_scala_lang_tasty_core_3","actual":"@org_scala_lang_tasty_core_3//jar","bind": "jar/org/scala_lang/tasty_core_3"}, + {"artifact":"org.scala-sbt:compiler-interface:1.9.6","url":"https://repo1.maven.org/maven2/org/scala-sbt/compiler-interface/1.9.6/compiler-interface-1.9.6.jar","name":"org_scala_sbt_compiler_interface","actual":"@org_scala_sbt_compiler_interface//jar","bind": "jar/org/scala_sbt/compiler_interface"}, + {"artifact":"org.scala-sbt:util-interface:1.9.8","url":"https://repo1.maven.org/maven2/org/scala-sbt/util-interface/1.9.8/util-interface-1.9.8.jar","name":"org_scala_sbt_util_interface","actual":"@org_scala_sbt_util_interface//jar","bind": "jar/org/scala_sbt/util_interface"}, + {"artifact":"org.scalameta:common_2.13:4.10.1","url":"https://repo1.maven.org/maven2/org/scalameta/common_2.13/4.10.1/common_2.13-4.10.1.jar","name":"org_scalameta_common_2_13","actual":"@org_scalameta_common_2_13//jar","bind": "jar/org/scalameta/common_2_13"}, + {"artifact":"org.scalameta:metaconfig-core_2.13:0.13.0","url":"https://repo1.maven.org/maven2/org/scalameta/metaconfig-core_2.13/0.13.0/metaconfig-core_2.13-0.13.0.jar","name":"org_scalameta_metaconfig_core_2_13","actual":"@org_scalameta_metaconfig_core_2_13//jar","bind": "jar/org/scalameta/metaconfig_core_2_13"}, + {"artifact":"org.scalameta:metaconfig-pprint_2.13:0.13.0","url":"https://repo1.maven.org/maven2/org/scalameta/metaconfig-pprint_2.13/0.13.0/metaconfig-pprint_2.13-0.13.0.jar","name":"org_scalameta_metaconfig_pprint_2_13","actual":"@org_scalameta_metaconfig_pprint_2_13//jar","bind": "jar/org/scalameta/metaconfig_pprint_2_13"}, + {"artifact":"org.scalameta:metaconfig-typesafe-config_2.13:0.13.0","url":"https://repo1.maven.org/maven2/org/scalameta/metaconfig-typesafe-config_2.13/0.13.0/metaconfig-typesafe-config_2.13-0.13.0.jar","name":"org_scalameta_metaconfig_typesafe_config_2_13","actual":"@org_scalameta_metaconfig_typesafe_config_2_13//jar","bind": "jar/org/scalameta/metaconfig_typesafe_config_2_13"}, + {"artifact":"org.scalameta:mtags-interfaces:1.3.2","url":"https://repo1.maven.org/maven2/org/scalameta/mtags-interfaces/1.3.2/mtags-interfaces-1.3.2.jar","name":"org_scalameta_mtags_interfaces","actual":"@org_scalameta_mtags_interfaces//jar","bind": "jar/org/scalameta/mtags_interfaces"}, + {"artifact":"org.scalameta:parsers_2.13:4.10.1","url":"https://repo1.maven.org/maven2/org/scalameta/parsers_2.13/4.10.1/parsers_2.13-4.10.1.jar","name":"org_scalameta_parsers_2_13","actual":"@org_scalameta_parsers_2_13//jar","bind": "jar/org/scalameta/parsers_2_13"}, + {"artifact":"org.scalameta:scalameta_2.13:4.10.1","url":"https://repo1.maven.org/maven2/org/scalameta/scalameta_2.13/4.10.1/scalameta_2.13-4.10.1.jar","name":"org_scalameta_scalameta_2_13","actual":"@org_scalameta_scalameta_2_13//jar","bind": "jar/org/scalameta/scalameta_2_13"}, + {"artifact":"org.scalameta:semanticdb-scalac_2.13.15:4.12.0","url":"https://repo1.maven.org/maven2/org/scalameta/semanticdb-scalac_2.13.15/4.12.0/semanticdb-scalac_2.13.15-4.12.0.jar","name":"org_scalameta_semanticdb_scalac_2_13_15","actual":"@org_scalameta_semanticdb_scalac_2_13_15//jar","bind": "jar/org/scalameta/semanticdb_scalac_2_13_15"}, + {"artifact":"org.scalameta:semanticdb-scalac-core_2.13.15:4.10.1","url":"https://repo1.maven.org/maven2/org/scalameta/semanticdb-scalac-core_2.13.15/4.10.1/semanticdb-scalac-core_2.13.15-4.10.1.jar","name":"org_scalameta_semanticdb_scalac_core_2_13_15","actual":"@org_scalameta_semanticdb_scalac_core_2_13_15//jar","bind": "jar/org/scalameta/semanticdb_scalac_core_2_13_15"}, + {"artifact":"org.scalameta:semanticdb-shared_2.13:4.10.1","url":"https://repo1.maven.org/maven2/org/scalameta/semanticdb-shared_2.13/4.10.1/semanticdb-shared_2.13-4.10.1.jar","name":"org_scalameta_semanticdb_shared_2_13","actual":"@org_scalameta_semanticdb_shared_2_13//jar","bind": "jar/org/scalameta/semanticdb_shared_2_13"}, + {"artifact":"org.scalameta:trees_2.13:4.10.1","url":"https://repo1.maven.org/maven2/org/scalameta/trees_2.13/4.10.1/trees_2.13-4.10.1.jar","name":"org_scalameta_trees_2_13","actual":"@org_scalameta_trees_2_13//jar","bind": "jar/org/scalameta/trees_2_13"}, + {"artifact":"org.slf4j:slf4j-api:1.7.36","url":"https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar","name":"org_slf4j_slf4j_api","actual":"@org_slf4j_slf4j_api//jar","bind": "jar/org/slf4j/slf4j_api"}, + {"artifact":"org.typelevel:paiges-core_2.13:0.4.4","url":"https://repo1.maven.org/maven2/org/typelevel/paiges-core_2.13/0.4.4/paiges-core_2.13-0.4.4.jar","name":"org_typelevel_paiges_core_2_13","actual":"@org_typelevel_paiges_core_2_13//jar","bind": "jar/org/typelevel/paiges_core_2_13"}, ] def maven_dependencies(callback = jar_artifact_callback): diff --git a/BUILD b/BUILD index b3d98dc7..8289c2e2 100644 --- a/BUILD +++ b/BUILD @@ -1,8 +1,6 @@ load("@rules_scala3//deps:scala_deps.bzl", "scala_deps") load("@rules_scala3//rules:scala.bzl", "configure_zinc_scala") -load("@rules_scala3//scala3:toolchain.bzl", "scala_toolchain") load("@rules_scala3//rules/scalafix:scalafix_runner.bzl", "scalafix_runner") -load('//scala3:repositories.bzl', _default_scalacopts = 'GLOBAL_SCALACOPTS') filegroup( name = "dependencies", @@ -18,10 +16,15 @@ scala_deps( scalafix_runner( name = "run_scalafix", - toolchain = "//:scalafix_toolchain", - targets = ["//..."], + targets = [ + "//scala/common/sbt-testing:common", + "//scala/common/worker:worker", + "//scala/workers/jacoco/instrumenter:instrumenter", + ], ) +scala_version = "3.6.2-RC1" + runtime_classpath_3 = [ "@scala3_library//jar", "@scala_library_2_13//jar", @@ -34,14 +37,6 @@ compiler_classpath_3 = runtime_classpath_3 + [ "@scala_asm//jar", ] -scala_version = "3.6.2-RC1" - -scalac_scalafix_opts = [ - "-Wunused:all", - "-Ywarn-unused", - "-Xsemanticdb" -] - configure_zinc_scala( name = "zinc_3", compiler_bridge = "@scala3_sbt_bridge//jar", @@ -51,21 +46,3 @@ configure_zinc_scala( visibility = ["//visibility:public"], ) -scala_toolchain( - name = "scalafix_toolchain_impl", - compiler_bridge = "@scala3_sbt_bridge//jar", - compiler_classpath = compiler_classpath_3, - enable_semanticdb = True, - global_scalacopts = _default_scalacopts + scalac_scalafix_opts, - runtime_classpath = runtime_classpath_3, - scala_version = scala_version, - semanticdb_bundle_in_jar = True, -) - -toolchain( - name = "scalafix_toolchain", - toolchain = ":scalafix_toolchain_impl", - toolchain_type = "//scala3:toolchain_type", - visibility = ["//visibility:public"], -) - diff --git a/Dependencies.scala b/Dependencies.scala index 54450131..9642271e 100644 --- a/Dependencies.scala +++ b/Dependencies.scala @@ -27,5 +27,7 @@ object Dependencies: "org.openjdk.jmh" % "jmh-generator-bytecode" % jmhV, "org.openjdk.jmh" % "jmh-generator-reflection" % jmhV, "org.openjdk.jmh" % "jmh-generator-asm" % jmhV, - "com.github.scopt" %% "scopt" % "4.1.0" + "com.github.scopt" %% "scopt" % "4.1.0", + "ch.epfl.scala" % "scalafix-cli_3.5.1" % "0.13.0", + "org.scalameta" % "semanticdb-scalac_2.13.15" % "4.12.0" ) diff --git a/WORKSPACE b/WORKSPACE index 193b8e01..c4ecbf96 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -68,7 +68,9 @@ load("//rules/scala:init.bzl", "rules_scala3_init") rules_scala3_init() -scala_register_toolchains(default_compiler = "bootstrap") +scala_register_toolchains() + +register_toolchains("@rules_scala3//rules/scalafix:scalafix_toolchain") load("//mezel_compatibility:repositories.bzl", "mezel_compatibility_repository") diff --git a/rules/scalafix/BUILD b/rules/scalafix/BUILD index e69de29b..fcf98e2b 100644 --- a/rules/scalafix/BUILD +++ b/rules/scalafix/BUILD @@ -0,0 +1,60 @@ +load("@rules_scala3//rules:scala.bzl", "scala_binary") +load("@rules_scala3//scala3:toolchain.bzl", "scala_toolchain") +load('@rules_scala3//scala3:repositories.bzl', _default_scalacopts = 'GLOBAL_SCALACOPTS') + +scala_version = "3.6.2-RC1" + +scalac_scalafix_opts = [ + "-Wunused:all", + "-Ywarn-unused", + "-Xsemanticdb" +] + +runtime_classpath_3 = [ + "@scala3_library//jar", + "@scala_library_2_13//jar", +] + +compiler_classpath_3 = runtime_classpath_3 + [ + "@scala3_compiler//jar", + "@scala3_interfaces//jar", + "@scala_tasty_core_3//jar", + "@scala_asm//jar", +] + +scala_binary( + name = "bin", + srcs = glob(include = ["*.scala"]), + main_class = "rules_scala3.rules.scalafix.Main", + visibility = ["//visibility:public"], + deps = ["//3rdparty/jvm/ch/epfl/scala:scalafix_cli"], +) + +toolchain_type( + name = "scalafix_toolchain_type", + visibility = ["//visibility:public"], +) + +scala_toolchain( + name = "scalafix_toolchain_impl", + compiler_bridge = "@scala3_sbt_bridge//jar", + compiler_classpath = compiler_classpath_3, + enable_semanticdb = True, + global_scalacopts = _default_scalacopts + scalac_scalafix_opts, + runtime_classpath = runtime_classpath_3, + scala_version = scala_version, + semanticdb_bundle_in_jar = True, +) + +toolchain( + name = "scalafix_toolchain", + toolchain = ":scalafix_toolchain_impl", + toolchain_type = "@rules_scala3//rules/scalafix:scalafix_toolchain_type", + visibility = ["//visibility:public"], +) + +filegroup( + name = "bzl", + srcs = glob(["**/*.bzl"]), + visibility = ["//rules:__pkg__"], +)