hcoles/highwheel

Some of the package level cyclic dependencies are not detected by highwheel but detected by Intellij

Opened this issue · 2 comments

I have created a sample project to show the issue.
https://github.com/lawrencexu/cyclic-dependency-test
Highwheel fails to find the package level cyclic dependencies when there is sub-package involved.
Is there any way to solve this issue?

The cycle is caused by referencing a static string. This is inlined by the compiler so it is not possible to tell from the bytecode where the string came from.

Fundamentally a bytecode based tool can't detect dependencies of this type.

@hcoles
Thank you very much for the quick response.
To better address this issue, I have updated the sample project and switched the static string to a normal method instead to avoid the optimization done by compiler and still get the same result.

From my understanding, it can be reproduced when
ClassA in package A references ClassB in package B
ClassC in a sub-package of package B references ClassA in package A

Intellij considers this scenario a package level cyclic dependency issue while highwheel does not.