Community
Participate
Working Groups
The incremental build misses a dependency from a lambda expression to its functional interface: When the signature of the interface method is changed, the Lambda expression must be recompiled, even if there's no explicit reference in source code. package test1; public interface I { int method(int a); // change argument type to Object } package test1; public class E { void take(I i) { } } package test1; public class Ref { void foo(E e) { e.take((x) -> x+2); // not recompiled when I#method signature changed } }
Good one, thanks. Do you remember there was some bug fix/feature that was using build dependencies to solve a search problem ? Can you point me to that ? I am wondering if we can kill two birds with one stone: i.e https://bugs.eclipse.org/bugs/show_bug.cgi?id=400905 (that one may have a much simpler fix though - we just to have to trigger resolve if we see a lambda during indexing and get additional entries)
(In reply to Srikanth Sankaran from comment #1) Bug 102279 comment 7 ff. were about using build dependencies to improve search performance. (Found this through your reference to bug 400905, which I also didn't remember any more.)
Currently, Ref.java is correctly recompiled when I change the type to Object and save I.java. But when I change it back to int and save again, then the error on Ref.java stays in the Problems view.
Thanks, Fix and tests released here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=f4fa1b5b78e764cbc99a897dc3a1af35ead150e3
(In reply to Srikanth Sankaran from comment #4) This commit included incomplete changes in codeassist that caused compile errors. They don't seem to be related to this fix, so I reverted them: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=30eb2ef8deb6c1a80cc8122027f34a4da5360729
(In reply to Markus Keller from comment #5) > (In reply to Srikanth Sankaran from comment #4) > This commit included incomplete changes in codeassist that caused compile > errors. Thanks for reverting them. I noticed it just as I was sipping a beer in a close by joint with no wireless access :)