You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using either 1.6.0 or 1.7.0-SNAPSHOT, the presence of source generators causes extra sourceFolder entries to be added to the module. A simple example that demonstrates this issue:
importsbt._importKeys._objectApplicationBuildextendsBuild {
valmain=Project("foo", file(".")).settings(
sourceGenerators in Compile+=Def.task {
valfile1= (sourceManaged in Compile).value /"one"/"Test.java"IO.write(file1, """package one;class Test {}""")
valfile2= (sourceManaged in Compile).value /"two"/"Test.java"IO.write(file2, """package two;class Test {}""")
Seq(file1, file2)
}.taskValue
)
}
This leads to a module file containing extra src_managed/main/one and src_managed/main/two source folders:
There are two obvious ways to solve this by either using sourceManaged as sources or use managedSources as sources. Having both leads nesting of source directories which causes this error.
My fix uses managedSources and ignores any sourceManaged directories which are subfolders of managedSources.
Using either 1.6.0 or 1.7.0-SNAPSHOT, the presence of source generators causes extra sourceFolder entries to be added to the module. A simple example that demonstrates this issue:
This leads to a module file containing extra
src_managed/main/one
andsrc_managed/main/two
source folders:In the real world, this is causing problems with Play 2.3.1, leading to errors like this when compiling from IntelliJ:
The text was updated successfully, but these errors were encountered: