-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Circular dependency between java3d-core and java3d-utils #17
Comments
It has always been that way which is why you have to build java3d and There used to be more circular issues that I removed over time, this is the Harvey On Thu, Apr 9, 2015 at 9:32 AM, Curtis Rueden notifications@github.com
|
Thanks for the quick reply, @hharrison. The easiest way to fix it would be to just merge the two projects! But I understand if that is deemed somehow too disruptive of a change. Do you have a preferred approach for eliminating the remaining circular references? There are several reasons it would be a really good idea to completely address this issue. For one thing, Maven does not support circular dependencies. So it will not be possible to address #14 properly until this issue is resolved. |
I'll try and give a brain dump of the issues involved while I have a few
Harvey On Thu, Apr 9, 2015 at 9:40 AM, Curtis Rueden notifications@github.com
|
Here are some "option 4" possibilities: 4a) In
4b) Use dependency injection / service discovery. Specifically: add some kind of geometry service that declares the needed API, then call it from
4c) Split the projects into more pieces, to ensure the dependency graph has no cycles. This would also be disruptive, and have significant consequences, including making the project structure less intuitive. I list it here mainly for completeness. If option 4a or 4b interests you, let me know and I can look into creating a patch set for it. |
@hharrison OK, I took a crack at option 4b. Right now I implemented on top of my |
This avoids a dependency on j3d-core-utils's com.sun.j3d.utils.geometry package. If j3d-core-utils is present on the classpath, it can provide the same backing implementation as before, but the option is now open to provide an alternative service implementation with clean licensing. This addresses hharrison#17.
This avoids a dependency on j3d-core-utils's com.sun.j3d.utils.geometry package. If j3d-core-utils is present on the classpath, it can provide the same backing implementation as before, but the option is now open to provide an alternative service implementation if desired. This addresses hharrison#17.
This code was migrated from java3d-core's Font3D class, in order to address hharrison/java3d-core#17.
Merged your changes as-proposed into version 1.6.2, thanks a lot for the work and sorry for the wait! |
The class
javax.media.j3d.Font3D
ofj3d-core
imports classes from packagecom.sun.j3d.utils.geometry
, which is part ofj3d-core-utils
. And thej3d-core-utils
project imports many classes fromj3d-core
. This creates a circular dependency between artifacts.My understanding is that the
java3d-utils
should depend onjava3d-core
, but not vice versa. Correct? If so, what is the best way to correct this issue?The text was updated successfully, but these errors were encountered: