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 246139 - Netbeans "fix-dependencies" build target removes needed dependency
Summary: Netbeans "fix-dependencies" build target removes needed dependency
Status: NEW
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 8.0.1
Hardware: PC Solaris
: P3 normal (vote)
Assignee: pgebauer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-30 14:28 UTC by Alexander Simon
Modified: 2015-09-09 11:22 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 Alexander Simon 2014-07-30 14:28:12 UTC
Example:
"fix-dependencies" build target removes
org.openide.util.lookup dependency from module org.netbeans.modules.dlight.libs.common
As result ValidateModulesTest is failed and prevent to push from cnd-main repository.

Target should not remove org.openide.util.lookup dependency because module depend on org.openide.filesystems.
Comment 1 Jaroslav Tulach 2014-08-01 03:41:24 UTC
Justification for P2 is missing. A test is failing, but I don't understand who calls fix-dependencies and why its misbehavior is considered so urgent.
Comment 2 Alexander Simon 2014-08-01 09:58:03 UTC
(In reply to Jaroslav Tulach from comment #1)
> Justification for P2 is missing. A test is failing, but I don't understand
> who calls fix-dependencies and why its misbehavior is considered so urgent.
Hi Jaroslav,

C/C++ plug-in periodically migrates to new platform API and/or redesign own modules. As result some unused dependencies appear in C/C++ modules.
To cleanup unneeded dependencies CND team periodically (in fact before code freeze) run "fix-dependencies" target. It worked perfectly for ages.
I fixed C/C++ dependencies a week before NB 8.0.1 code freeze.
It results in stopping "push cnd-main" task for 5 days. It is critical before code freeze.

The second: How I can rely on the module manager message:
warning: had to upgrade dependencies for module org.netbeans.modules.dlight.libs.common: added = [module org.openide.util.lookup] removed = []; details: [FileObject implements Lookup.Provider]
if "fix-dependencies" violates it?
IMHO should be done one of:
- fix "fix-dependencies" target
- remove "fix-dependencies" target
- remove constraint from the module manager
Comment 3 Jaroslav Tulach 2014-08-06 11:12:21 UTC
> It results in stopping "push cnd-main" task for 5 days. It is critical
> before code freeze.

Maybe you can try to build your modules before you push your change? Or backout and try to be more careful on second iteration?

> The second: How I can rely on the module manager message:
> if "fix-dependencies" violates it?

Just report a bug (like you did) and let's fix it. You just does not have to claim it is a release stopper, when it is not.
Comment 4 Martin Kozeny 2014-08-15 16:22:29 UTC
Problem is causing method simplify() in ant task FixDependencies, where is every dependency one after another extracted from project.xml file and then nb-javac is invoked. If nb-javac fails, particular dependency is added back, if not dependency is left extracted.
Comment 5 Jaroslav Tulach 2014-08-18 16:31:37 UTC
(In reply to Martin Kozeny from comment #4)
> Problem is causing method simplify() in ant task FixDependencies, where is
> every dependency one after another extracted from project.xml file and then
> nb-javac is invoked. If nb-javac fails, particular dependency is added back,
> if not dependency is left extracted.

Well, that is the whole point of the fix-dependencies task! Ultimately it should remove unneeded dependencies while keeping the project compilable, right? The question is how it can end up being uncompilable.