-
Notifications
You must be signed in to change notification settings - Fork 27
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
Check for scope if test assign test scope to interdependent projects. #14
Conversation
@@ -81,13 +83,19 @@ object MavenProjectHelper { | |||
} yield depProject | |||
case _ => Nil | |||
} | |||
|
|||
def projectToClasspathDep(x: (Project, Boolean)): ClasspathDep[ProjectReference] = x match { | |||
case (project, true) => project % "compile->compile;test->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.
nice!
Hey @jsuereth, Can you take another look ? does it look good now ! |
@ScrapCodes Do you think this PR is still necessary? If so, could you please add a test case that triggers the bug before the PR, and yet passes after the PR is applied? My intuition is that messing with the translation between Maven and sbt scopes without adequate tests could miss some edge cases and potentially let issues leak through. |
Apache Spark currently uses a custom fork of the sbt-pom-reader plugin which incorporates this change and getting this patch merged upstream is probably a blocker to us moving back to the official sbt-pom-reader releases (see https://issues.apache.org/jira/browse/SPARK-14401). While I don't have time to work on this personally, I bet that we could try reverting this change in Spark's build, figure out what breaks, then use that knowledge to derive a regression test to add here. |
I attempted to use version 2.1.0-RC2 of this plugin in Spark (apache/spark#12310) and have an example of a test which fails without these changes:
In this case, we have a
I haven't dug in too deeply yet and will try to pull the output of |
This also looks related to #37. In short, it seems that several folks are experiencing similar problems with |
Another subtlety which I don't think this current PR handles correctly: in Maven, declaring a dependency on a |
This has remained with open questions but no progress for long enough that I'm closing it to get it out of the list. Reopen if there's disagreement. |
With this that
test-jar
struggle ends. We no longer need to detect that, I somehow "feel" if a project dependency on another project (in multiproject build) has test scope then we should do this.