spring-attic / eclipse-integration-gradle

Gradle Tooling for Eclipse
Eclipse Public License 1.0
298 stars 108 forks source link

Project cycle detection may be buggy #80

Closed andrask closed 9 years ago

andrask commented 9 years ago

Recently, I started seeing similar errors:

A cycle was detected in the build path of project 'xxx'. The cycle consists of projects {aaa, bbb, ccc, ddd, xxx, mmm, hhh}

I tried to look up the cycle in vain. I cannot find the dependencies that form the cycle. I don't know if the list is an odered one, I suppose it is. The issue is that I found cases when the preceding project didn't have dependency on the succeeding one. E.g. aaa->bbb dependency did not exist.

The command line gradle compilation has no cyclic dependency issues at all.

Could someone clarify the situation for me?

kdvolder commented 9 years ago

It is hard to give you specific information without a sample project to try out. The only thing that comes to mind right now is that commandline gradle may not have cycles while eclipse project do because commandline gradle 'dependencies' are more finegrained.

In particular, Eclipse projects merge 'test' and 'normal' dependencies into a single classpath. So it is theoretically possible that this creates a cycle in Eclipse project dependencies that doesn't arise on the commandline.

kdvolder commented 9 years ago

If you attach a sample project we can try to analyze and explain what is happening.

andrask commented 9 years ago

As I have no clue what the issue is, I can't prepare an example project. First I would be happy to know at least whether the list shown in the error message is ordered or not. The error is probably provided by eclipse but it's really annoying.

andrask commented 9 years ago

I loaded the projects in Idea which showed me a completely legible cause for the cycle. Eclipse is quite bad at this apparently. Thanks for your help.

kdvolder commented 9 years ago

The error is probably provided by eclipse but it's really annoying. ... Eclipse is quite bad at this apparently.

Maybe it might be a good idea to raise an Eclipse bug to request the error message to be improved. Especially if you have a concrete example/ideas of how it could be done much better.

I would raise the bug for you, but I didn't hit this problem myself, so not sure I'd be able to characterize the problem and explain 'the better way' very well.