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 180717 - Customizer removes <build-prerequisite/>
Summary: Customizer removes <build-prerequisite/>
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
: 184764 (view as bug list)
Depends on:
Blocks: 179299
  Show dependency tree
 
Reported: 2010-02-15 03:46 UTC by Jan Lahoda
Modified: 2011-03-17 09:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2010-02-15 03:46:18 UTC
[recent build]

Open java.hints module, go to Project/Properties and try to add a new dependency (e.g. on classfile). Review the resulting project.xml: the dependency was added correctly, but also the "<build-prerequisite/>" option was removed from the dependency on org.netbeans.modules.java.hints.processor. This module provides an annotation processor, and without the build-prerequisite option the processor module may be built after the java.hints module, so the annotation processing will not occur, and no hints will be available.
Comment 1 Jesse Glick 2010-02-15 14:13:07 UTC
Obvious workaround (review changes before committing and revert undesired changes), so not a P2.

This is also a rather obscure case, since you are relying on an otherwise unnecessary runtime dependency to add something to the compile-time processor path; normally the processor would reside in the same module as the annotations it processes, so such deps would simply be <compile-dependency/>s as well, which is why no GUI exists to manage <c-d> and <b-p> separately. You would be better advised to create one module containing the annotations and the processor, and another with the standard hints, in which case this bug would never have been encountered.
Comment 2 Quality Engineering 2010-03-03 22:15:55 UTC
Integrated into 'main-golden', will be available in build *201003040200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/ab1cf1b98f31
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #180717: adding warning about the bug.
Comment 3 Jesse Glick 2010-04-13 16:09:21 UTC
Possibly related problem: I updated some deps in php.project and found that a <build-prerequisite/> on org.netbeans.modules.gsf.api had gotten a <compile-dependency/> and <run-dependency> too.
Comment 4 Jesse Glick 2010-04-15 20:43:37 UTC
ModuleDependency needs to keep richer state, and ProjectXMLManager has to read and write that correctly in getModuleDependency(String,ModuleList,Element) and createModuleDependencyElement. It was never the intention to support changes via the GUI to the more exotic combinations (build dep with or without compile dep; missing run dep), but the GUI must preserve such states in existing elements which are not directly being edited.
Comment 5 Jesse Glick 2010-04-22 18:24:36 UTC
*** Bug 184764 has been marked as a duplicate of this bug. ***
Comment 6 Jaroslav Tulach 2010-04-22 19:34:20 UTC
My problem is that the system adds additional runtime dependencies. This is problem for OSGi bundles that wish to manually specify Import-Package in manifest but compile against compile-time dependencies.
Comment 7 Jesse Glick 2010-04-23 15:36:16 UTC
core-main #b3ca3e1fbe56
Comment 8 Quality Engineering 2010-04-24 05:23:55 UTC
Integrated into 'main-golden', will be available in build *201004240200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b3ca3e1fbe56
User: Jesse Glick <jglick@netbeans.org>
Log: #180717: Customizer removes <build-prerequisite/>
Comment 9 Quality Engineering 2011-03-17 09:54:20 UTC
Integrated into 'main-golden', will be available in build *201103170400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/6a2f9ec6bdbf
User: Jesse Glick <jglick@netbeans.org>
Log: A side effect of #181418 is that adding a module as a runtime-only dep no longer suffices to include it in processorpath.
Simpler to just have java.hints include java.hints.processor in its regular classpath.
Anyway this obviates any issues like #180717 since the dep will no longer have an unusual structure.
(I still advise moving the annotations and processor into one API module, and providing concrete hints in another.)