portable-scala/sbt-crossproject

Add a test for Scala-version-dependent shared source directories

sjrd opened this issue · 2 comments

As seen on Gitter - ☝️ February 19, 2021 12:46 PM
Eric K Richardson
@ekrich
I was just looking at this https://scalacenter.github.io/scala-3-migration-guide/docs/macros/migration-tutorial.html and thinking that I don't have to provide a way to segregate scala-2 and scala-3 code. What I found was this will not work in a cross project because there is no shared/scala-2/scala-3. I this an oversight or can this be improved?

sbt:sjavatime-root> ++2.13.4; show unmanagedSourceDirectories
[info] Setting Scala version to 2.13.4 on 5 projects.
[info] Excluded 1 projects, run ++ 2.13.4 -v for more details.
[info] Reapplying settings...
[info] set current project to sjavatime-root (in build file:/Users/eric/workspace/sjavatime/)
[info] sjavatimeJS / Compile / unmanagedSourceDirectories
[info]     List(/Users/eric/workspace/sjavatime/sjavatime/js/src/main/scala, /Users/eric/workspace/sjavatime/sjavatime/js/src/main/scala-2.13, /Users/eric/workspace/sjavatime/sjavatime/js/src/main/scala-2, /Users/eric/workspace/sjavatime/sjavatime/js/src/main/java, /Users/eric/workspace/sjavatime/sjavatime/shared/src/main/scala-2.13, /Users/eric/workspace/sjavatime/sjavatime/shared/src/main/scala)
[info] sjavatimeNative / Compile / unmanagedSourceDirectories
[info]     List(/Users/eric/workspace/sjavatime/sjavatime/native/src/main/scala, /Users/eric/workspace/sjavatime/sjavatime/native/src/main/scala-2.13, /Users/eric/workspace/sjavatime/sjavatime/native/src/main/scala-2, /Users/eric/workspace/sjavatime/sjavatime/native/src/main/java, /Users/eric/workspace/sjavatime/sjavatime/shared/src/main/scala-2.13, /Users/eric/workspace/sjavatime/sjavatime/shared/src/main/scala)

Seth Tisue
@SethTisue
13:10
@ekrich seems like a failure of sbt-crossproject to keep pace with sbt
Eric K Richardson
@ekrich
14:09
I was maybe thinking that - what about the built in cross project stuff, any movement on not requiring the plugin?

I think this was fixed in #132.