-
Notifications
You must be signed in to change notification settings - Fork 80
Make sure the auto build is triggered after a force kill #1671
Conversation
When an Xtext application is force killed, the Xtext will not have been written (as it's written on shutdown). The applications thus forgets the last built state during the next startup. The idea is that the auto-builder will then pick up that the projects need to be rebuild. However, for the latter we need to first touch the relevant projects. Signed-off-by: Titouan Vervack <titouan.vervack@sigasi.com>
org.eclipse.xtext.builder/src/org/eclipse/xtext/builder/impl/BuilderStateDiscarder.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Titouan Vervack <titouan.vervack@sigasi.com>
org.eclipse.xtext.builder/src/org/eclipse/xtext/builder/impl/BuilderStateDiscarder.java
Show resolved
Hide resolved
@cdietrich Do you recall any issues with using |
@szarnekow am not sure if this still can leads to bad situations like we have with the workspace (non)locks on startup with builder state loading and Storage2UriMapperJavaImpl and build e.g. eclipse/xtext#2431 and eclipse/xtext#2408 |
org.eclipse.xtext.builder/src/org/eclipse/xtext/builder/impl/BuilderStateDiscarder.java
Show resolved
Hide resolved
Signed-off-by: Titouan Vervack <titouan.vervack@sigasi.com>
d89669d
to
8849da5
Compare
* @since 2.26 | ||
*/ | ||
protected void touchProject(IProject project) { | ||
if (!project.getWorkspace().isTreeLocked()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR, it also fixed my issue #1676, but I recognized in the builds some exceptions due to a missing check in case for closed projects. When I add project.isAccessible() to that condition and before line 71 in the touch from the job, then our builds are green
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rytina could you provide a pr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or create an addtional issue? i also wonder how you can bypass the
BuildManagerAccess.findBuilder calling isAccessible in line 62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@szarnekow any idea if the strange messages in https://github.com/itemis/xtext-reference-projects/runs/2671804040?check_suite_focus=true could be related?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will try to run the stuff locally over the weekend.
then i will hopefully be able to provide a complete jstack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
problem is reproducing locally.
undoing the change makes test green again.
it seems to "always" run in a job at least also helps.
will try to verify with jenkins/gh actions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
…n job Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
[#1671]always run in job to avoid deadlock and check accessibility in job
When an Xtext application is force killed, the Xtext will not have been
written (as it's written on shutdown). The applications thus forgets
the last built state during the next startup. The idea is that
the auto-builder will then pick up that the projects need to be rebuild.
However, for the latter we need to first touch the relevant projects.