You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I would like to report a possible bug. Please take a look at line 490 in org.eclipse.xtext.builder.BuilderParticipant -> cleanOutput(IBuildContext, OutputConfiguration, EclipseResourceFileSystemAccess2, IProgressMonitor)
This method removes output folders based on configuration: the general logic is:
for (IContainer container : getOutputs(project, config)) {
delete the output
}
The problem is with the following lines:
for (IContainer container : getOutputs(project, config)) {
if (!container.exists()) {
return;
}
It stops deleting on the first non-existing resource to be deleted. So, if getOuputs returns two folders, and both exists - both will be deleted. If the first one does not exists, but the second does - it will not be deleted.
I propose to change "return" into "continue" - this should fix the issue.
Kind regards
Marcin
The text was updated successfully, but these errors were encountered:
marcinjunger
changed the title
xtext clean output - not removing all aoutput folders, if previous does not exists
xtext clean output - not removing all output folders, if previous does not exists
Nov 22, 2023
Hi, no problem, tried to search for a guide how to do it, naming conventions etc... is there any? Should I check out the git repo (I am using sourcetree) locally, create locally a branch named eg. bugfix\issue2853, commit and push a fix, and then create pull request in sourcetree?
Hi, no problem, tried to search for a guide how to do it, naming conventions etc... is there any? Should I check out the git repo (I am using sourcetree) locally, create locally a branch named eg. bugfix\issue2853, commit and push a fix, and then create pull request in sourcetree?
Hi,
I would like to report a possible bug. Please take a look at line 490 in org.eclipse.xtext.builder.BuilderParticipant -> cleanOutput(IBuildContext, OutputConfiguration, EclipseResourceFileSystemAccess2, IProgressMonitor)
xtext/org.eclipse.xtext.builder/src/org/eclipse/xtext/builder/BuilderParticipant.java
Line 490 in cab7c30
This method removes output folders based on configuration: the general logic is:
for (IContainer container : getOutputs(project, config)) {
delete the output
}
The problem is with the following lines:
for (IContainer container : getOutputs(project, config)) {
if (!container.exists()) {
return;
}
It stops deleting on the first non-existing resource to be deleted. So, if getOuputs returns two folders, and both exists - both will be deleted. If the first one does not exists, but the second does - it will not be deleted.
I propose to change "return" into "continue" - this should fix the issue.
Kind regards
Marcin
The text was updated successfully, but these errors were encountered: