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 137510 - project synchronization does not handle transitive dependencies
Summary: project synchronization does not handle transitive dependencies
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Eclipse project importer (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks: 79782
  Show dependency tree
 
Reported: 2008-06-17 23:36 UTC by David Konecny
Modified: 2008-07-17 04:53 UTC (History)
0 users

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 David Konecny 2008-06-17 23:36:54 UTC
Scenario:
* Eclipse projA depend on projB; they are imported to NB
* "exported" classpath entry C is added to Eclipse projB
* projB is synchronized in NB

The problem is that C is not added to projA.
Comment 1 Jesse Glick 2008-06-18 00:29:31 UTC
(Note: projC has to also be imported before synchronizing projB.)

I would not expect projA to be changed when I asked to synchronize projB. Currently asking to synch projA reports that
it is already up to date, which is incorrect. If however you force it - e.g. remove B from A in Eclipse, synch, readd B
to A in Eclipse and synch again - then A correctly gets B and C.
Comment 2 David Konecny 2008-06-18 01:20:03 UTC
Re. "projC" - or C can be exported jar file entry - it does not have to be project. Anything on eclipse project
classpath can be exported.

Re. "I would not expect projA to be changed when I asked to synchronize projB" - not doing so you force user to go up
the project dependency tree and synch project one by one and most importantly in *correct order*. Perhaps it is
artificial but in case of deeper dependencies (eg. projA <- projB <- projC <- projD) it could be really confusing for
end user (eg. export jar file in projD and synch in following order: projC, projB, projA, projD; still requires to synch
projC, projB and projA to propagate projD's new JAR entry)

I'm starting to wonder whether per-project synchronization make sense at all. Perhaps "Sych with Eclipse" should synch
all opened imported projects from Eclipse in one go. We could still trigger this action from ProjectOpenHook but
coalesce it: 
* after IDE startup it would be called just once regardless of number of eclipse based projects; 
* opening a single eclipse based project would trigger synch; 
* we could still keep action on project's popup menu for easy discoverability; 
* perhaps executing action should show dialog listing all updated and all uptodate projects to make it clear what happend
What do you think?
Comment 3 Jesse Glick 2008-06-18 01:45:17 UTC
Would be great if NB simply listened to the .classpath (and whatever other metadata it cares about) of the Eclipse
workspace and synched automatically whenever it detected a change.

Or there could be a menu item File > Import > Resynchronize Open Projects. Would be pretty discoverable (you would have
seen it when you first ran File > Import > Eclipse Workspace) but otherwise out of the way.
Comment 4 David Konecny 2008-07-14 13:19:23 UTC
Synchronization rewritten to be workspace based and that resolves this issue as well. f1de3c52bf8a
Comment 5 Quality Engineering 2008-07-17 04:53:43 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #324 build
Changeset: http://hg.netbeans.org/main/rev/f1de3c52bf8a
User: David Konecny <dkonecny@netbeans.org>
Log: #137510 - synchronization rewritten to be workspace based instead of project based