| Summary: | Circular dependency error reported that could be resolved due to main and test build separation | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Eric Milles <eric.milles> | ||||||
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> | ||||||
| Status: | CLOSED MOVED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | loskutov, pspeed-eclipse | ||||||
| Version: | 4.13 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | stalebug | ||||||||
| Attachments: |
|
||||||||
|
Description
Eric Milles
Created attachment 279899 [details] Example of circular dependencies between test and main sources The comes from the Apache Groovy project (https://github.com/apache/groovy), which has Gradle submodules. The core project's tests depend on the subprojects groovy-ant, groovy-xml, groovy-test, groovy-macro and groovy-dateutil. I also tried using the "without_test_code" attribute, which I had missed. It is still reporting a cycle. If I delete the errors and try to build either project first, there is an error saying the dependent project must be built first.
/ProjectA
.classpath
<classpathentry kind="src" path="src/main"/>
<classpathentry kind="src" path="src/test"><!-- tests ProjectA using ProjectB fixtures -->
<attributes>
<attribute name="test" value="true" />
</attributes>
</classpathentry>
<classpathentry kind="src" path="/ProjectB" combineaccessrules="false">
<attributes>
<attribute name="test" value="true" />
<attribute name="without_test_code" value="true" />
</attributes>
</classpathentry>
/ProjectB
.classpath
<classpathentry kind="src" path="src/main"/><!-- provides test support using ProjectA API -->
<classpathentry kind="src" path="src/test">
<attributes>
<attribute name="test" value="true" />
</attributes>
</classpathentry>
<classpathentry kind="src" path="/ProjectA" combineaccessrules="false">
<attributes>
<attribute name="without_test_code" value="true" />
</attributes>
</classpathentry>
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. Created attachment 289072 [details]
Sample project illustrating the incorrect cyclic dependency error.
I've attempted to create a "simple as possible" project that illustrates the issue. Two projects: framework and basic. Basic depends on interfaces from framework. Framework depends on basic for tests only.
I will note that as compared to our real project, the 'basic' dependency also appears in the "Java Build Path -> Libraries" tab. I'm a bit new to Eclipse so it's possible I have missed something in the setup of these projects. However, on our real project this bug is also evident and that project lists the test dependency only in the 'Java Build Path -> Projects' tab.
(In reply to Paul Speed from comment #4) > Created attachment 289072 [details] > Sample project illustrating the incorrect cyclic dependency error. > > I've attempted to create a "simple as possible" project that illustrates the > issue. Two projects: framework and basic. Basic depends on interfaces from > framework. Framework depends on basic for tests only. > > I will note that as compared to our real project, the 'basic' dependency > also appears in the "Java Build Path -> Libraries" tab. I'm a bit new to > Eclipse so it's possible I have missed something in the setup of these > projects. However, on our real project this bug is also evident and that > project lists the test dependency only in the 'Java Build Path -> Projects' > tab. Bugzilla is not used anymore for bug tracking. Please report this issue at https://github.com/eclipse-jdt/eclipse.jdt.core/issues . Please also make sure you have tried to reproduce with latest 4.27 Eclipse. |