Open mfussenegger opened 2 months ago
Looks like https://github.com/eclipse-jdtls/eclipse.jdt.ls/pull/3200 fixed it
Actually, it looks like this is still broken (tested with https://github.com/eclipse-jdtls/eclipse.jdt.ls/commit/b363a8617022e3d7d60b64b6669c823fdda1e1f9). In my earlier test I forgot to switch back to the development version of eclipse.jdt.ls
Narrowed it down to:
@Test
public void test_compile_error() throws Exception {
Comparator<Object[]> ordering = CompoundOrdering.of(Arrays.asList(
OrderingByPosition.arrayOrdering(1, false, false),
OrderingByPosition.arrayOrdering(0, false, false)
));
}
Which triggers the error. The code compiles with javac. It also compiles with the eclipse compiler if changing to:
@Test
public void test_ok() throws Exception {
var orderings = Arrays.asList(
OrderingByPosition.arrayOrdering(1, false, false),
OrderingByPosition.arrayOrdering(0, false, false)
);
Comparator<Object[]> ordering = CompoundOrdering.of(orderings);
}
https://github.com/mfussenegger/eclipse-compiler-bug contains the full trimmed reproduction. (Currently the problematic code is commented out: https://github.com/mfussenegger/eclipse-compiler-bug/blob/0b1c7bf3fef26d6879b54fdf3ea94432186e8148/src/test/java/foo/CompoundOrderingTest.java#L20)
Using the current master (5c5f2e3e1c8d164172f2016eaa290137b17ee037), eclipse.jdt.ls is no longer able to load and build crate. Update: Workaround was merged: https://github.com/crate/crate/pull/16416, see https://github.com/eclipse-jdtls/eclipse.jdt.ls/issues/3199#issuecomment-2254181280 for a reproduction.
The logs show the following errors:
I suspect this is caused by one of the recent jdt core/target platform updates, but I cannot compile the older commits of eclipse.jdt.ls so I can't tell for sure. (dependencies disappeared(?)).
After deleting OrderingByPositionTest the project builds again.
I can try to extract a smaller reproduction if necessary, but I suspected that with the full project, the file that causes the error and the full stacktrace someone more familiar with the code might already have an idea what's causing the problem.