Skip to content
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

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

Open
lawrencexu opened this issue Feb 14, 2019 · 2 comments

Comments

@lawrencexu
Copy link

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?

@hcoles
Copy link
Owner

hcoles commented Feb 14, 2019

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.

@lawrencexu
Copy link
Author

lawrencexu commented Feb 14, 2019

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants