compile-testing: 0.10 (cannot upgrade to 0.11 because of the incompatibilities of Guava 18 from Neo4j and Guava 20 required by the truth assertion library pulled by compile-testing 0.11, see https://github.com/google/compile-testing/issues/125).
javac: 1.8.0_65
OS: Mac OS 10.12.5
Context
In Neo4j, an aggregation function is defined with an @UserAggregationFunction-annotated method whose returned type's enclosing class (aka aggregation type) must define two methods, one annotated with @UserAggregationUpdate, another @UserAggregationResult.
Now, I have got a unit test that makes sure that an aggregation type without those two annotations triggers two compilation errors (1 for the missing @UserAggregationUpdate, 1 for the missing @UserAggregationResult).
First diagnostic
After debugging a bit com.google.testing.compile.Compiler#compile(java.lang.Iterable<? extends javax.tools.JavaFileObject>), it seems the deferred diagnostic for the second compilation error never comes, despite both errors being sent.
How to reproduce
## setup steps
$> git clone -b update_compiler_3.2 git@github.com:fbiville/neo4j.git && cd neo4j
## this one may take some time (https://xkcd.com/303/)
$> mvn -am -pl community/procedure-compiler/processor clean install -DskipTests
$> sed -i.bak '/@Ignore/d' community/procedure-compiler/processor/src/test/java/org/neo4j/tooling/procedure/UserAggregationFunctionProcessorTest.java
## actually run the failing test
$> mvn test -Dtest="UserAggregationFunctionProcessorTest#fails_if_aggregation_function_exposes_return_type_without_aggregation_methods" -f community/procedure-compiler/processor/pom.xml
Some older versions of the compiler don't report more than one diagnostic on a single line. Are you still seeing this problem? Which JDK are you using?
Versions
Context
In Neo4j, an aggregation function is defined with an
@UserAggregationFunction
-annotated method whose returned type's enclosing class (aka aggregation type) must define two methods, one annotated with@UserAggregationUpdate
, another@UserAggregationResult
.Now, I have got a unit test that makes sure that an aggregation type without those two annotations triggers two compilation errors (1 for the missing
@UserAggregationUpdate
, 1 for the missing@UserAggregationResult
).First diagnostic
After debugging a bit
com.google.testing.compile.Compiler#compile(java.lang.Iterable<? extends javax.tools.JavaFileObject>)
, it seems the deferred diagnostic for the second compilation error never comes, despite both errors being sent.How to reproduce