Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317579 - Generation screwed by transitive deps..
Summary: Generation screwed by transitive deps..
Status: RESOLVED INVALID
Alias: None
Product: Tigerstripe
Classification: Technology
Component: Core (show other bugs)
Version: 0.5   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal with 4 votes (vote)
Target Milestone: 0.5M0   Edit
Assignee: Richard Craddock CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-22 09:49 EDT by Steve Jerman CLA
Modified: 2010-09-08 09:54 EDT (History)
2 users (show)

See Also:


Attachments
Diagram (37.97 KB, image/png)
2010-06-22 09:49 EDT, Steve Jerman CLA
no flags Details
Demonstate transitive dep issue. (220.37 KB, application/binary)
2010-09-07 13:38 EDT, Steve Jerman CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Jerman CLA 2010-06-22 09:49:50 EDT
Created attachment 172415 [details]
Diagram

Hi Guys,

I was thinking last night about dependencies in Tigerstripe and why you needed to list all dependencies (including transitive ones) for generation to work properly...

So.. with attached diagram... (and this will be the same with projects or modules I think)

Without EhasD Module E will insist on Module C and B being in dependencies. This is because of the superclass hierarchy. (enforced by JDT)

Adding EhasD will ‘need’ Module D listed as a dependency... but doesn’t insist that module A is added.... However generation of Module E will not work correctly if getOtherEnd() is needed....

What do we do about this? 

Steve
Comment 1 Eric Dillon CLA 2010-07-13 14:26:28 EDT
Steve?

What is the status on this? I seem to remember you said this was triggered by something else and wasn't really a problem.

If so, let's close this.
Eric
Comment 2 Richard Craddock CLA 2010-07-21 06:29:00 EDT
There is something unstated going on here...

"you needed to list all dependencies (including transitive ones) for generation to work properly"


I don't think its a surprsise that you need all dependencies present for generation to work (by definition you are dependant on them).

Is this just an issue when doing headless generation, that the headless build does not "assemble" the dependencies in the same way that you would normally have already done in your workspace?

I don't think this would be an issue with Modules (provided that they are installed in the eclipse being used). 

I thnk we really need a much clearer statement of what the issue is, before we can start on this one.
Comment 3 Richard Craddock CLA 2010-08-16 10:32:46 EDT
I have recreated the example model in workspace projects.

NOTE THAT my model "E" does not have a dependency on model "A"

I created a test plugin that had a rule for the association that looks like this :

$artifact.getAEnd()
$artifact.getAEnd().getType().getName()
$artifact.getAEnd().getOtherEnd().getType().getName()
$artifact.getAEnd().getOtherEnd().getType().getArtifact().getExtendedArtifact().getName()



And I got the following output

org.eclipse.tigerstripe.workbench.internal.core.model.AssociationEnd@1d53ecf
ClassE
ClassD
ClassA

So I think this is the expected behaviour.

(Now I will try with a few "modules" instead of local projects.
Comment 4 Richard Craddock CLA 2010-08-16 10:43:48 EDT
So I made Projects A B C and D into modules, and closed the local projects.

The generation was still correct.

So I don;t know what the issue is here.

I can only guess that when doing a headless build, the requirted projects are not being correctly walked to get get their dependencies.


But that is a guess, and without an example I will have to close this as "works for me"
Comment 5 Richard Craddock CLA 2010-08-31 05:05:19 EDT
No further information forthcoming, so I'm closing this.
Comment 6 Steve Jerman CLA 2010-09-07 13:38:24 EDT
Created attachment 178343 [details]
Demonstate transitive dep issue.
Comment 7 Steve Jerman CLA 2010-09-07 13:39:21 EDT
See attachment. Hopefully a simple demonstration of the issue ... which occurs in multiple situations.
Comment 8 Eric Dillon CLA 2010-09-07 18:10:30 EDT
Re-assigning to Richard with the additional details.
Comment 9 Richard Craddock CLA 2010-09-08 09:54:09 EDT
I checked out these models as per the attachment....

The list of Enum Artifacts that is in the pdf includes (amongst others):

AlarmSeverityEnum
BusinessLifeCycleStateEnum

These are not in the project, or the referneced module, but come from a modeul refernced by teh modeul (ie a transitive dependency)


This would appear to be what you are asking for.....so I am closing this again.