This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 230862 - "ant clean" compiling some modules
Summary: "ant clean" compiling some modules
Status: RESOLVED WONTFIX
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Kozeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-06 13:39 UTC by Antonin Nebuzelsky
Modified: 2013-07-22 09:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
log (279.53 KB, text/plain)
2013-06-06 13:39 UTC, Antonin Nebuzelsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antonin Nebuzelsky 2013-06-06 13:39:06 UTC
Created attachment 135447 [details]
log

"ant clean" did not only clean the modules, but was compiling some modules. In the end "clean" failed.

See the attachment.
Comment 1 Martin Kozeny 2013-07-09 12:37:40 UTC
In projectized.xml in nbbuild, there is a macro called test-clean in clean target for cleaning test output folders. This macro is calling ParseProjectXml task, which goes through dependecies for actual project and if they don't exist it creates them.
Comment 2 Antonin Nebuzelsky 2013-07-12 12:35:22 UTC
Why would test-clean need to parse files before cleaning them?

Jesse, could you possibly advise? Thanks.
Comment 3 Jesse Glick 2013-07-12 13:03:16 UTC
I cannot remember exactly why */nbproject/project.xml needs to be parsed in order to clean tests, but it has something to do with module-to-module test dependencies I think. That eventually led to

nbbuild/netbeans/php/modules/org-netbeans-modules-php-editor.jar missing for php.symfony; will first try to build php.editor

which seems to have started compilation.

Anyway this is a red herring; look at

nbbuild/build.xml:1137: The following error occurred while executing this line:
nbbuild/build.xml:1163: Will not run clean; checkout contains unknown and not ignored files (did you forget to hg add?):
clean-run.log
nbbuild/misc/hints-settings.xml
Target -hg-clean failed, falling back to -real-clean

which shows that this is a user error (anomalous files in working dir) preventing the normal -hg-clean from running. -real-clean was never reliable and should not be used.
Comment 4 Martin Kozeny 2013-07-17 10:57:34 UTC
> nbbuild/build.xml:1137: The following error occurred while executing this line:
> nbbuild/build.xml:1163: Will not run clean; checkout contains unknown and not
> ignored files (did you forget to hg add?):
> clean-run.log
> nbbuild/misc/hints-settings.xml
> Target -hg-clean failed, falling back to -real-clean
> 
> which shows that this is a user error (anomalous files in working dir)
> preventing the normal -hg-clean from running. -real-clean was never reliable
> and should not be used.

That's true, Tonda has untracked files (clean-run.log for the log output, hints-settings.xml - which is generated untracked file) so that's why hg-clean fails. Now is hints-settings.xml tracked, so output of ant clean looks like this:

Buildfile: /home/mkozeny/NetBeans_workspace/core-main/build.xml

-jdk-pre-preinit:

-jdk-preinit:

-jdk-warn:

-jdk-presetdef-basic:

-jdk-default:

-jdk-init:

-load-build-properties:

bootstrap:
     [echo] Bootstrapping NetBeans-specific Ant extensions...

clean:

-hg-clean:

-do-hg-clean:
     [echo] Cleaning untracked files in /home/mkozeny/NetBeans_workspace/core-main...
   [subant] No sub-builds to iterate on

BUILD SUCCESSFUL
Total time: 8 minutes 1 second

But after e.g. adding some new source, hg-clean fails again, real-clean comes in and compiles some dependencies... I still think, that clean target is not working correctly...
Comment 5 Jesse Glick 2013-07-17 13:28:28 UTC
Tip: try setting

  <property name="do.not.recurse" value="true"/>

in the -cleanall target.
Comment 6 Martin Kozeny 2013-07-18 08:12:07 UTC
Thanks for advise, but actually this does not help, b/c when iterating over dependencies, there is a problem, when the dependency is not built, it is not possible to receive an implementation version.
Comment 7 Jesse Glick 2013-07-18 14:03:32 UTC
(In reply to comment #6)
> when the dependency is not built, it is not
> possible to receive an implementation version.

Right, but AFAIK you should not need to know that during the clean cycle, since you are not computing classpaths.