Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Minimal failing example of build failure with java inner classes #172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
102 changes: 102 additions & 0 deletions tests/3rdparty/maven.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,88 @@ def list_dependencies():
},
"lang": "java",
},
{
"bind_args": {
"actual": "@com_google_code_findbugs_jsr305",
"name": "jar/com/google/code/findbugs/jsr305",
},
"import_args": {
"default_visibility": ["//visibility:public"],
"jar_sha256": "905721a0eea90a81534abb7ee6ef4ea2e5e645fa1def0a5cd88402df1b46c9ed",
"jar_urls": [
"http://central.maven.org/maven2/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar",
],
"licenses": ["notice"],
"name": "com_google_code_findbugs_jsr305",
},
"lang": "java",
},
{
"bind_args": {
"actual": "@com_google_errorprone_error_prone_annotations",
"name": "jar/com/google/errorprone/error_prone_annotations",
},
"import_args": {
"default_visibility": ["//visibility:public"],
"jar_sha256": "cb4cfad870bf563a07199f3ebea5763f0dec440fcda0b318640b1feaa788656b",
"jar_urls": [
"http://central.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.0.18/error_prone_annotations-2.0.18.jar",
],
"licenses": ["notice"],
"name": "com_google_errorprone_error_prone_annotations",
"srcjar_sha256": "dbe7b49dd0584704d5c306b4ac7273556353ea3c0c6c3e50adeeca8df47047be",
"srcjar_urls": [
"http://central.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.0.18/error_prone_annotations-2.0.18-sources.jar",
],
},
"lang": "java",
},
{
"bind_args": {
"actual": "@com_google_guava_guava",
"name": "jar/com/google/guava/guava",
},
"import_args": {
"default_visibility": ["//visibility:public"],
"deps": [
"@com_google_code_findbugs_jsr305",
"@com_google_errorprone_error_prone_annotations",
"@com_google_j2objc_j2objc_annotations",
"@org_codehaus_mojo_animal_sniffer_annotations",
],
"jar_sha256": "7baa80df284117e5b945b19b98d367a85ea7b7801bd358ff657946c3bd1b6596",
"jar_urls": [
"http://central.maven.org/maven2/com/google/guava/guava/23.0/guava-23.0.jar",
],
"licenses": ["notice"],
"name": "com_google_guava_guava",
"srcjar_sha256": "37fe8ba804fb3898c3c8f0cbac319cc9daa58400e5f0226a380ac94fb2c3ca14",
"srcjar_urls": [
"http://central.maven.org/maven2/com/google/guava/guava/23.0/guava-23.0-sources.jar",
],
},
"lang": "java",
},
{
"bind_args": {
"actual": "@com_google_j2objc_j2objc_annotations",
"name": "jar/com/google/j2objc/j2objc_annotations",
},
"import_args": {
"default_visibility": ["//visibility:public"],
"jar_sha256": "2994a7eb78f2710bd3d3bfb639b2c94e219cedac0d4d084d516e78c16dddecf6",
"jar_urls": [
"http://central.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar",
],
"licenses": ["notice"],
"name": "com_google_j2objc_j2objc_annotations",
"srcjar_sha256": "2cd9022a77151d0b574887635cdfcdf3b78155b602abc89d7f8e62aba55cfb4f",
"srcjar_urls": [
"http://central.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1-sources.jar",
],
},
"lang": "java",
},
# duplicates in com.google.protobuf:protobuf-java promoted to 3.5.1
# - com.thesamet.scalapb:scalapb-runtime_2.12:0.7.4 wanted version 3.5.1
# - com.trueaccord.scalapb:scalapb-runtime_2.12:0.6.0 wanted version 3.3.1
Expand Down Expand Up @@ -391,6 +473,26 @@ def list_dependencies():
},
"lang": "java",
},
{
"bind_args": {
"actual": "@org_codehaus_mojo_animal_sniffer_annotations",
"name": "jar/org/codehaus/mojo/animal_sniffer_annotations",
},
"import_args": {
"default_visibility": ["//visibility:public"],
"jar_sha256": "2068320bd6bad744c3673ab048f67e30bef8f518996fa380033556600669905d",
"jar_urls": [
"http://central.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar",
],
"licenses": ["notice"],
"name": "org_codehaus_mojo_animal_sniffer_annotations",
"srcjar_sha256": "d821ae1f706db2c1b9c88d4b7b0746b01039dac63762745ef3fe5579967dd16b",
"srcjar_urls": [
"http://central.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14-sources.jar",
],
},
"lang": "java",
},
{
"bind_args": {
"actual": "@org_scala_lang_modules_scala_parser_combinators_2_11",
Expand Down
9 changes: 9 additions & 0 deletions tests/compile/java-inner-class/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
load("@rules_scala_annex//rules:scala.bzl", "scala_library")

scala_library(
name = "lib",
srcs = ["Example.java"],
deps = [
"@com_google_guava_guava",
],
)
19 changes: 19 additions & 0 deletions tests/compile/java-inner-class/Example.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import com.google.common.hash.BloomFilter;
import com.google.common.hash.Funnel;
import com.google.common.hash.PrimitiveSink;

public class Example {

public static class TestFunnel implements Funnel<String> {

private static final long serialVersionUID = -5814744004508116956L;

public void funnel(String from, PrimitiveSink into) {
into.putString(from, null);
}
}

public static BloomFilter<String> newInstance(int expectedInsertions) {
return null;
}
}
4 changes: 4 additions & 0 deletions tests/compile/java-inner-class/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash -e
. "$(dirname "$0")"/../../common.sh

bazel build :lib
5 changes: 5 additions & 0 deletions tests/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,8 @@ dependencies:
scalapb-runtime:
lang: scala
version: "0.7.4"

com.google.guava:
guava:
version: '23.0'
lang: java