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 43845 - Ability to check for cyclic dependencies between projects
Summary: Ability to check for cyclic dependencies between projects
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: API
Depends on:
Blocks: 41535 43848 43849
  Show dependency tree
 
Reported: 2004-05-25 17:19 UTC by Adam Sotona
Modified: 2004-08-13 12:11 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Sotona 2004-05-25 17:19:26 UTC
User can easily setup cyclic project dependencies
and let Ant loop "inifinitelly".

For J2ME project (where some project queries are
forwarded) this can easily cause out of memory
errors or other strange exceptions.

It is not problem to detect the cycles in each
project type during each critical action but there
is missing at least some common UI to display warning.

Currently J2ME project detect cycle during project
dependencies resolution in customizer and during
each query for sources and javadoc. Singleton
dialog with warning and list of involved projects
is displayed in case of cycle detection.

If you decide to detect the cycles and show the
warning in project infrastructure trasparently to
project types, I'll remove our UI.
Otherwise the warning dialog needs to be common
and have some public API.
Comment 1 Jesse Glick 2004-05-25 17:56:47 UTC
Will leave this method to represent need for e.g. a utility method in
ProjectUtils to ensure that a proposed addition to the set of
subprojects for a given project will not cause a cycle. Don't bother
trying to detect cycles in random queries etc.; better to prevent them
from occurring to begin with.

See also issue #43848 (java/j2seproject) and issue #43849 (web/project).
Comment 2 Jesse Glick 2004-06-16 22:40:55 UTC
committed   * Up-To-Date  1.3        
projects/projectapi/src/org/netbeans/api/project/ProjectUtils.java
committed   * Up-To-Date  1.5        
projects/projectapi/src/org/netbeans/spi/project/SubprojectProvider.java
added       * Up-To-Date  1.1        
projects/projectapi/test/unit/src/org/netbeans/api/project/ProjectUtilsTest.java