Fix circular dependencies #8
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Fiji updater reports circular dependencies when trying to upload to
ntaktupdae site. Thanks to help from @ctrueden I was able to identify duplicate classes that appear both in the shadedscripting-kotlinjar and theorg.jetbrains.kotlin:kotlin-script-runtime:jar:1.4.30:runtimetransitive dependency. Theorg.jetbrains.kotlin:kotlin-compiler-embeddable:jar:1.4.30:compiledependency that pulls in this transitive dependency is marked as optional. No other dependency haskotlin-script-runtimeas dependency so I am a bit confused about whykotlin-script-runtimeis installed in the first place. Removing it from the shaded jar solved the issue of duplicate classes. I have yet to confirm that the Fiji updater does not report any circular dependencies after this fix.For reference, discussion on gitter
For completeness, this is the Maven dependency tree:
Solution
I found out that
org.jetbrains.kotlin:kotlin-scripting-jsr223:jarhaskotlin-compiler-embeddableas a transitive dependency with scoperuntime. For some reason, this transitive dependency would only show inmvn dependency:treewhen I did not havekotlin-compiler-embeddableas dependency forscripting-kotlin. In the end, the solution was to simply includekotlin-scripting-jsr233and its transitive dependencies in the shaded jar. I tested this branch in a cleanFiji.appand distributed/ to/installed from thentaktupdate site.