-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
Isolate scoverage modules from their parent modules #3118
Isolate scoverage modules from their parent modules #3118
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think with the changes from #3090 and #3064, the classpath part of interest is outer.localRunClasspath
. If we override the runClasspath
and remove outer.localRunClasspath
from it and add outer.scoverage.localRunClasspath
, we should be done, without needing to introduce the shadow test module.
Also, this PR changes various other places unrelated to the essential feature. It would be good to keep the changeset minimal.
I removed the unrelated changes I will open an other PR for those one if you are ok with that |
Co-authored-by: Tobias Roeser <le.petit.fou@web.de>
6dc6647
to
974c029
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thank you!
@romain-gilles-ultra Could you please update the PR description to reflect the actual change? |
Done |
## Context I encountered an issue with the way scoverage plugin alters the dependency tree of the test module by changing its module dependency from the `outer` module to the `outer.scoverage` module. This shadow modification of the dependency tree produces a side effect that impacts the IDEA configuration generation. When the IDEA configuration generation resolves the dependencies instead of using the outer module as a dependency for the test project it depends on the `outer.scoverage` module which should not be generated as it does not exist factually but more virtually. ## Solution Instead of modifying the dependency tree at compile-time I change it at runtime by removing the `outer.localRunClasspath()` from the `test.runClasspath()` and appending, instead, the `outer.scoverage.localRunClasspath()` This resolves the issue of modifying the dependency tree but introduces one more compilation as when the `outer.localRunClasspath()` is resolved it will force the compilation of the outer module. In the previous version only the `outer.scoverage` was compiled and not both of them. Pull request: com-lihaoyi#3118
Context
I encountered an issue with the way scoverage plugin alters the dependency tree of the test module by changing its module dependency from the
outer
module to theouter.scoverage
module.This shadow modification of the dependency tree produces a side effect that impacts the IDEA configuration generation.
When the IDEA configuration generation resolves the dependencies instead of using the outer module as a dependency for the test project it depends on the
outer.scoverage
module which should not be generated as it does not exist factually but more virtually.Solution
Instead of modifying the dependency tree at compile-time I change it at runtime by removing the
outer.localRunClasspath()
from thetest.runClasspath()
and appending, instead, theouter.scoverage.localRunClasspath()
This resolves the issue of modifying the dependency tree but introduces one more compilation as when the
outer.localRunClasspath()
is resolved it will force the compilation of the outer module. In the previous version only theouter.scoverage
was compiled and not both of them.