Skip to content

Commit

Permalink
Fix tests (#55)
Browse files Browse the repository at this point in the history
* maven_dependencies added to WORKSPACE

* io_bazel_rules_scala to rules_scala3

* zinc_3_3_migration to zinc_3_migration

* Dependencies.scala added

* 3rdparty BUILD files modified

* get rid of @annex_test

* workspace.bzl modified

* deps BUILD file mofified

* binary tests fixed

* compat tests fixed (almost)

* compile/logger tests fixed

* compile/srcjar tests fixed

* compile/xml tests fixed

* compile/logger tests fixed

* /dependencies tests fixed

* /deployjar tests fixed

* plugins/kind-projector tests fixed

* plugins/outputs tests fixed

* /providers tests fixed

* repl/simple tests fixed

* /resources tests fixed

* scala/scalaimport tests fixed

* /scala3 tests fixed

* strategy/worker_extra_flag tests fixed

* /tagging tests fixed

* munit updated

* compile/log_level deleted (no need)

* neverlink tests fixed

* compile/error tests fixed

* scala_deps.bzl edited

* WORKSPACE edited

* scalacopts/rule test fixed

* format/scalafmt tests fixed

* plugins/classpath tests fixed

* test-frameworks/munit/test fixed

* test-frameworks/munit/test fixed

* WORKSPACE

* WORKSPACE

---------

Co-authored-by: anna-skrodzka <annaskrod@h=gmail.com>
  • Loading branch information
anna-skrodzka and anna-skrodzka authored Nov 8, 2024
1 parent 69bf649 commit 52c4c8b
Show file tree
Hide file tree
Showing 95 changed files with 4,319 additions and 5,137 deletions.
2 changes: 1 addition & 1 deletion deps/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ scala_binary(
scala = "//scala:bootstrap_3",
visibility = ["//visibility:public"],
deps = [
"//3rdparty/jvm/com/github/scopt",
"@maven//:org_scala_sbt_librarymanagement_core_3",
"@maven//:org_scala_sbt_librarymanagement_coursier_3",
"@rules_scala3//3rdparty/jvm/com/github/scopt",
],
)
2 changes: 1 addition & 1 deletion deps/scala_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def scala_deps(
"--targets-file-name=" + targets_file_name,
],
deps = [
"//3rdparty/jvm/com/github/scopt",
"@rules_scala3//3rdparty/jvm/com/github/scopt",
"@maven//:org_scala_sbt_librarymanagement_core_3",
"@maven//:org_scala_sbt_librarymanagement_coursier_3",
],
Expand Down
10 changes: 10 additions & 0 deletions rules/scala/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ sbt_version = "2.0.0-M2"
zinc_version = "2.0.0-alpha14"

def scala_repositories():
maven_install(
artifacts = [
"org.scala-sbt:librarymanagement-core_3:2.0.0-M2",
"org.scala-sbt:librarymanagement-coursier_3:2.0.0-alpha8",
],
repositories = [
"https://repo1.maven.org/maven2",
],
)

http_archive(
name = "compiler_bridge_2_13",
build_file_content = _SRC_FILEGROUP_BUILD_FILE_CONTENT,
Expand Down
39 changes: 39 additions & 0 deletions tests/.scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version = 3.6.1
maxColumn = 150
assumeStandardLibraryStripMargin = true
continuationIndent.callSite = 2
includeCurlyBraceInSelectChains = true
# includeNoParensInSelectChains = true
binPack.literalArgumentLists = false
rewrite.rules = [AvoidInfix, SortImports, SortModifiers, RedundantParens, PreferCurlyFors] # RedundantBraces

runner.dialect = scala3
rewrite.scala3 {
convertToNewSyntax = true
removeOptionalBraces = true
}

project {
git = true
excludePaths = [
"glob:**/tests/scala3/compiler/scala3-example-project/**.scala",
"glob:**/tests/scala3/scala2-interop/Scala2.scala"
]
}

newlines {
beforeCurlyLambdaParams = false
implicitParamListModifierPrefer = before
}

align = none
align {
preset = none
stripMargin = true
openParenCallSite = false
openParenDefnSite = false
tokens = [
"%", "%%", "%%%", ":=", "~=", "=>"
]
}
# optIn.breakChainOnFirstMethodDot = true
13 changes: 13 additions & 0 deletions tests/3rdparty/jvm/com/chuusai/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
load("@rules_scala3//rules:scala.bzl", "scala_import")
scala_import(
name = "shapeless",
jars = [
"//external:jar/com/chuusai/shapeless_2_13"
],
runtime_deps = [
"//3rdparty/jvm/org/scala_lang:scala_library"
],
visibility = [
"//visibility:public"
]
)
56 changes: 56 additions & 0 deletions tests/3rdparty/jvm/com/eed3si9n/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
load("@rules_scala3//rules:scala.bzl", "scala_import")
scala_import(
name = "shaded_jawn_parser",
jars = [
"//external:jar/com/eed3si9n/shaded_jawn_parser_3"
],
runtime_deps = [
"//3rdparty/jvm/org/scala_lang:scala3_library"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
]
)

scala_import(
name = "shaded_scalajson",
jars = [
"//external:jar/com/eed3si9n/shaded_scalajson_3"
],
runtime_deps = [
"//3rdparty/jvm/org/scala_lang:scala3_library"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
]
)

scala_import(
name = "sjson_new_core",
jars = [
"//external:jar/com/eed3si9n/sjson_new_core_3"
],
runtime_deps = [
"//3rdparty/jvm/net/openhft:zero_allocation_hashing",
"//3rdparty/jvm/org/scala_lang:scala3_library"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
]
)

scala_import(
name = "sjson_new_scalajson",
jars = [
"//external:jar/com/eed3si9n/sjson_new_scalajson_3"
],
runtime_deps = [
"//3rdparty/jvm/org/scala_lang:scala3_library",
":shaded_jawn_parser",
":shaded_scalajson",
":sjson_new_core"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
]
)
2 changes: 1 addition & 1 deletion tests/3rdparty/jvm/com/google/android/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ java_import(
"//external:jar/com/google/android/annotations"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
"//visibility:public"
]
)
2 changes: 1 addition & 1 deletion tests/3rdparty/jvm/com/google/api/grpc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ java_import(
"//3rdparty/jvm/com/google/protobuf:protobuf_java"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
"//visibility:public"
]
)
2 changes: 1 addition & 1 deletion tests/3rdparty/jvm/com/google/code/findbugs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ java_import(
"//external:jar/com/google/code/findbugs/jsr305"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
"//visibility:public"
]
)
2 changes: 1 addition & 1 deletion tests/3rdparty/jvm/com/google/code/gson/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ java_import(
"//external:jar/com/google/code/gson/gson"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
"//visibility:public"
]
)
2 changes: 1 addition & 1 deletion tests/3rdparty/jvm/com/google/errorprone/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ java_import(
"//external:jar/com/google/errorprone/error_prone_annotations"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
"//visibility:public"
]
)
2 changes: 1 addition & 1 deletion tests/3rdparty/jvm/com/google/guava/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ java_import(
":listenablefuture"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
"//visibility:public"
]
)

Expand Down
2 changes: 1 addition & 1 deletion tests/3rdparty/jvm/com/google/protobuf/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ java_import(
"//external:jar/com/google/protobuf/protobuf_java"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
"//visibility:public"
]
)
10 changes: 10 additions & 0 deletions tests/3rdparty/jvm/com/lmax/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
load("@rules_scala3//rules:scala.bzl", "scala_import")
java_import(
name = "disruptor",
jars = [
"//external:jar/com/lmax/disruptor"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
]
)
14 changes: 0 additions & 14 deletions tests/3rdparty/jvm/com/novocode/BUILD

This file was deleted.

10 changes: 10 additions & 0 deletions tests/3rdparty/jvm/com/swoval/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
load("@rules_scala3//rules:scala.bzl", "scala_import")
java_import(
name = "file_tree_views",
jars = [
"//external:jar/com/swoval/file_tree_views"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
]
)
6 changes: 3 additions & 3 deletions tests/3rdparty/jvm/com/thesamet/scalapb/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ scala_import(
"//3rdparty/jvm/org/scala_lang:scala3_library"
],
visibility = [
"//visibility:public"
"//3rdparty/jvm:__subpackages__"
]
)

Expand Down Expand Up @@ -38,7 +38,7 @@ scala_import(
"//3rdparty/jvm/org/scala_lang:scala3_library_sjs1"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
"//visibility:public"
]
)

Expand Down Expand Up @@ -88,6 +88,6 @@ scala_import(
":protobuf_runtime_scala_sjs1"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
"//visibility:public"
]
)
16 changes: 0 additions & 16 deletions tests/3rdparty/jvm/com/thesamet/scalapb/grpcweb/BUILD

This file was deleted.

56 changes: 2 additions & 54 deletions tests/3rdparty/jvm/io/grpc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,6 @@ java_import(
"//3rdparty/jvm/com/google/errorprone:error_prone_annotations",
"//3rdparty/jvm/com/google/guava:guava"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
]
)

java_import(
name = "grpc_context",
jars = [
"//external:jar/io/grpc/grpc_context"
],
runtime_deps = [
":grpc_api"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
]
)

java_import(
name = "grpc_core",
jars = [
"//external:jar/io/grpc/grpc_core"
],
runtime_deps = [
"//3rdparty/jvm/com/google/android:annotations",
"//3rdparty/jvm/com/google/code/gson:gson",
"//3rdparty/jvm/com/google/errorprone:error_prone_annotations",
"//3rdparty/jvm/com/google/guava:guava",
"//3rdparty/jvm/io/perfmark:perfmark_api",
"//3rdparty/jvm/org/codehaus/mojo:animal_sniffer_annotations",
":grpc_api",
":grpc_context"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
]
)

java_import(
name = "grpc_netty",
jars = [
"//external:jar/io/grpc/grpc_netty"
],
runtime_deps = [
"//3rdparty/jvm/com/google/errorprone:error_prone_annotations",
"//3rdparty/jvm/com/google/guava:guava",
"//3rdparty/jvm/io/netty:netty_codec_http2",
"//3rdparty/jvm/io/netty:netty_handler_proxy",
"//3rdparty/jvm/io/netty:netty_transport_native_unix_common",
"//3rdparty/jvm/io/perfmark:perfmark_api",
":grpc_core"
],
visibility = [
"//visibility:public"
]
Expand All @@ -80,7 +28,7 @@ java_import(
":grpc_protobuf_lite"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
"//visibility:public"
]
)

Expand Down Expand Up @@ -110,6 +58,6 @@ java_import(
":grpc_api"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
"//visibility:public"
]
)
6 changes: 3 additions & 3 deletions tests/3rdparty/jvm/io/netty/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ java_import(
":netty_transport"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
"//visibility:public"
]
)

Expand Down Expand Up @@ -120,7 +120,7 @@ java_import(
":netty_transport"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
"//visibility:public"
]
)

Expand Down Expand Up @@ -163,6 +163,6 @@ java_import(
":netty_transport"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
"//visibility:public"
]
)
2 changes: 1 addition & 1 deletion tests/3rdparty/jvm/io/perfmark/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ java_import(
"//external:jar/io/perfmark/perfmark_api"
],
visibility = [
"//3rdparty/jvm:__subpackages__"
"//visibility:public"
]
)
Loading

0 comments on commit 52c4c8b

Please sign in to comment.