eclipse / xtext

Eclipse Xtext™ is a language development framework
http://www.eclipse.org/Xtext
Eclipse Public License 2.0
766 stars 320 forks source link

RebuildAffectedResourcesTest is unstable on latest #2320

Open cdietrich opened 3 years ago

cdietrich commented 3 years ago

RebuildAffectedResourcesTest is unstable on latest

https://ci.eclipse.org/xtext/job/xtext-xtend/job/master/1390/testReport/junit/org.eclipse.xtend.ide.tests.compiler/RebuildAffectedResourcesTest/testChangeJavaClassLookedUpInAnnotationProcessor/

java.lang.AssertionError: Java problem: The import anno.A cannot be resolved
    at org.eclipse.xtend.ide.tests.compiler.RebuildAffectedResourcesTest.assertNoErrorsInWorkspace(RebuildAffectedResourcesTest.java:606)
    at org.eclipse.xtend.ide.tests.compiler.RebuildAffectedResourcesTest.testChangeJavaClassLookedUpInAnnotationProcessor(RebuildAffectedResourcesTest.java:581)
-------------------------------------------------------------------------------------------------------------------------

Test 'testChangeJavaClassLookedUpInAnnotationProcessor(org.eclipse.xtend.ide.tests.compiler.RebuildAffectedResourcesTest)' :
-------------------------------------------------------------------------------------------------------------------------
Task 'XtextBuilder.build[FULL]' took 990ms (5 measurements).
Task 'DebugSourceInstallingCompilationParticipant.install' took 4ms (12 measurements).
Task 'AbstractParser.parse' took 40ms (8 measurements).
Task 'installing proxies (AbstractCleaningLinker.linkModel)' took 1ms (8 measurements).
Task 'JVM Model inference (JvmModelAssociator.installDerivedState)' took 106ms (15 measurements).
Task '[macros] findActiveAnnotations (ActiveAnnotationContextProvider.computeContext)' took 100ms (15 measurements).
Task 'resolve annotations (JdtBasedTypeFactory)' took 180ms (8951 measurements).
Task 'resolve members (JdtBasedTypeFactory)' took 450ms (876 measurements).
Task 'resolve typeParams (JdtBasedTypeFactory)' took 4ms (1846 measurements).
Task 'resolve binding (JdtBasedTypeFactory)' took 114ms (292 measurements).
Task 'JdtBasedTypeFactory.createType (JdtBasedTypeFactory)' took 528ms (292 measurements).
Task 'resolve param names (JdtBasedTypeFactory)' took 0ms (0 measurements).
Task 'DefaultReentrantTypeResolver.resolve' took 924ms (20 measurements).
Task 'ResourceValidatorImpl.validation' took 58ms (8 measurements).
Task 'org.eclipse.xtext.builder.BuilderParticipant.build(IBuildContext, IProgressMonitor)' took 124ms (8 measurements).
Task 'XtextBuilder.build[INCREMENTAL]' took 534ms (9 measurements).
Task 'Loading from storage' took 7ms (6 measurements).
Task '[macros] indexingPhase (AnnotationProcessor.indexingPhase)' took 0ms (5 measurements).
Task '[macros] inferencePhase (AnnotationProcessor.inferencePhase)' took 56ms (3 measurements).
Task '[macros] validationPhase (AnnotationProcessor.validationPhase)' took 1ms (3 measurements).
-------------------------------------------------------------------------------------------------------------------------
cdietrich commented 2 years ago

it looks like we have a race with autobuild here for some reason jdt will build the client project before the macro project and thus the new class on the macro project wont be found by client project with a changed test code, the problem can be reproduced relatively reilably. also doing another build before checking for errors will "solve" the problem

https://github.com/eclipse/xtext-xtend/commit/56e2230864d3a1c6781223095a92d312a23026f1

@szarnekow any idea.

cdietrich commented 2 years ago

just replacing the project dependency with a manifest dependency reduces the liklyhood only but does not solve the problem

cdietrich commented 2 years ago

problem is still there

cdietrich commented 1 year ago

also on r202203 will try to add @Flaky as workaround