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

IDEA seems to leak transitive dependencies via modules into classpath #2924

Closed
lefou opened this issue Dec 14, 2023 · 0 comments · Fixed by #2925
Closed

IDEA seems to leak transitive dependencies via modules into classpath #2924

lefou opened this issue Dec 14, 2023 · 0 comments · Fixed by #2925
Milestone

Comments

@lefou
Copy link
Member

lefou commented Dec 14, 2023

I reproduced this in a customer project which I can't share. I don't have a small reproducer yet, but will outline the issue below:

  • IntelliJ IDEA 2023.2.5 (Ultimate Edition)

  • Mill 0.11.6

  • Project files generated under .idea with mill mill.idea.GenIdea/idea

  • Module A
    ** depends on slf4j-api 1.7
    ** depends on logback-classic 1.2 at runtime time

  • Module B
    ** depends on Module A
    ** depends on slf4j-api 2
    ** depends on logback-classic 1.4

Library dependencies are not exported (which is the default for GenIdea)

When started via the IJ runner with the classpath of Module B, the application cannot properly start as there is a logback-classic 1.2 jar in the classpath, which should not be the case. This results in no properly initialized Slf4j logger.

My suspicion is, that IntelliJ IDEA somehow leaks transitive dependencies.

I propose to try the following solution / workaround:

Reorder the library and module dependencies of the generated projects, such that library dependencies always come first. This should result in a classpath, where the library dependencies (resolved by Mill) will always come before other modules and their transitive dependencies (added by IDEA).

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

Successfully merging a pull request may close this issue.

1 participant