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
I was looking around for some way to set the package name in the build.sbt file instead of having to rely on the file structure of the templates. It would be nice if you could set a package prefix that would be appended to the beginning of the file structure name.
I don't really like this idea - since Scala templates are a DSL with a straight forward translation to Scala, we should consider features like this in the same vein as Scala source files, would you also have an sbt setting that prefixes package names from Scala source files? I don't think so. Perhaps we could support an @package directive at the start of the file, but I think using the directory structure by default makes sense since matching directory structure to package structure is a convention that's used (and in the case of Java, enforced) for all JVM languages anyway.
Activity
jroper commentedon Feb 3, 2015
I don't really like this idea - since Scala templates are a DSL with a straight forward translation to Scala, we should consider features like this in the same vein as Scala source files, would you also have an sbt setting that prefixes package names from Scala source files? I don't think so. Perhaps we could support an
@packagedirective at the start of the file, but I think using the directory structure by default makes sense since matching directory structure to package structure is a convention that's used (and in the case of Java, enforced) for all JVM languages anyway.