Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions test/shell/test_misc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ test_transitive_deps() {
exit 1
fi

bazel build test_expect_failure/transitive/java_to_scala:d
if [ $? -eq 0 ]; then
echo "'bazel build test_expect_failure/transitive/java_to_scala:d' should have failed."
expected_message="error: [strict] Using type example.A from an indirect dependency"
output=$(bazel build test_expect_failure/transitive/java_to_scala:d 2>&1)
if [ $? -eq 0 ] || [[ "$output" != *"$expected_message"* ]]; then
echo "'bazel build test_expect_failure/transitive/java_to_scala:d' should have failed with message '$expected_message'."
exit 1
fi

Expand Down
10 changes: 2 additions & 8 deletions test_expect_failure/transitive/java_to_scala/BUILD
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
load("@rules_java//java:defs.bzl", "java_library")
load("//scala:scala.bzl", "scala_export_to_java", "scala_library")
load("//scala:scala.bzl", "scala_library")

scala_library(
name = "a",
srcs = ["A.scala"],
)

scala_export_to_java(
name = "b",
exports = [":a"],
runtime_deps = [],
)

java_library(
name = "c",
srcs = ["C.java"],
deps = [":b"],
deps = [":a"],
)

java_library(
Expand Down