Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext builder stops eclipse build
Xtext builder stops eclipse build [message #1848001] Wed, 17 November 2021 08:05 Go to next message
Stanislav Tartakowski is currently offline Stanislav TartakowskiFriend
Messages: 5
Registered: October 2015
Junior Member

Hello,

i have a strange behaviour of the xtext builder (Eclipse 2021-09) which i fixed but i actually dont really understand what i did. I need clarification.
When importing maven projects into workspace (xtext and not xtext natures), Xtext builder calls needRebuild() in the method pollQueuedBuildData() because JdtQueuedBuildData returns true for needsRebuild(IProject, Deltas).

First question:
JdtQueuedBuildData has a list of unconfirmedDeltas. What are these objects? What is unconfirmed about these delta objects?

Second:
the needRebuild() call sets a flag in Eclipse's BuildManager and that leads to a loop break. So following build configs are discarded. (BuildManager.basicBuild() around line 260). But because they are discarded, the list in JdtQueueBuildData had no chance to be cleared because it contains deltas of Java Files of following build configs. So, Eclipse retries the build 10 times, Xtext Builder always sets the rebuild flag and eclipse finishes building without ever building the discarded build configs. The imported projects are all broken (not built) after import.

I fixed it by overriding XtextBuilder and overrding the method pollQueuedBuildData(IProject) with empty implementation. Now Eclipse builds all projects as expected. I am totaly confused about that Xtext Builder behaviour of requesting rebuilds. Can someone explain to me what is the Issue here?

The projects have all either only maven nature or they have java+xtext+maven natures and build commands in that order.

Some projects have java build path errors because of missing source folders.

Edit1:
Also this happens only in eclipse 2021-09 because before there was that other flag in the BuildManager EARLY_EXIT_FROM_INNER_BUILD_LOOP_ALLOWED which was false by default so the build loop was not exited by break no matter if xtext builder requested rebuild or not. Now this field defaults to true. So maybe only with eclipse 2021-09 this behaviour becomes actually relevent.

[Updated on: Wed, 17 November 2021 08:36]

Report message to a moderator

Re: Xtext builder stops eclipse build [message #1848002 is a reply to message #1848001] Wed, 17 November 2021 08:06 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14255
Registered: July 2009
Senior Member
please create an issue at github.com/eclipse/xtext-eclipse to discuss

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Gradle Build Folder not Ignored
Next Topic:Reference Ecore model in Xtext grammar
Goto Forum:
  


Current Time: Tue May 17 21:07:44 GMT 2022

Powered by FUDForum. Page generated in 0.02257 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top