-
-
Notifications
You must be signed in to change notification settings - Fork 364
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
Mark test module as test sources; change sbt module root #298
Conversation
@@ -321,7 +324,9 @@ object GenIdeaImpl { | |||
compileOutputPath: Path, | |||
generatedSourceOutputPath: Path, | |||
libNames: Strict.Agg[String], | |||
depNames: Strict.Agg[String]) = { | |||
depNames: Strict.Agg[String], | |||
isTest: Boolean |
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.
@@ -65,13 +65,13 @@ trait MavenModule extends JavaModule{outer => | |||
) | |||
override def resources = T.sources{ millSourcePath / 'src / 'main / 'resources } | |||
trait Tests extends super.Tests with MavenTests { | |||
override def millSourcePath = outer.millSourcePath | |||
override def millSourcePath = outer.millSourcePath / 'src / 'test |
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 thought that we can make parentModule/src/test
as a root for test module. @lihaoyi Don't you mind that?
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.
Or maybe we can do special handling of base path in GenIdea itself, cause this change may break current builds, when you rely on path of your test module. This happened in Play Json build.
Seems to fail with cross-modules, need to fix it |
@lihaoyi ready for review |
Looks good to me. Once you flesh out the PR description feel free to squash and merge |
This PR fixes #201
It's achieved by introducing
intellijModulePath
, which is different frommillSourcePath
for sbt/maven module's tests.For instance:
module path in Intellij is:
module
module's test path in Intellij is:
module/src/test
.Meanwhile
millSourcePath
didn't change