-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xtext clean output - not removing all output folders, if previous does not exists #2853
Comments
Thank you for the analysis. Do you plan to create a pull request? That would be greatly appreciated. |
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? |
That sounds like a plan.
|
@marcinjunger you might want to look at https://github.com/eclipse/xtext/blob/main/CONTRIBUTING.md in particular how to setup your Eclipse workspace (we use Oomph) |
doesn't exist The issue for this fix can be found here: [eclipse#2853]
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: