-
Notifications
You must be signed in to change notification settings - Fork 89
Compilation error using ScalaCaseClassRenderer and traits #110
Copy link
Copy link
Closed
Description
I'm configuring the buildinfo plugin like this at my build.sbt file:
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion)
buildInfoPackage := "com.mypackage.buildinfo"
buildInfoOptions += BuildInfoOption.Traits("myTraits.MyCustomTrait")
buildInfoObject := "Info"
buildInfoRenderFactory := ScalaCaseClassRenderer.applyThe goal is to have a case class with a Trait so I'd be able to reference to the resulting case class through such Trait.
The problem is that sbt throws a compilation error as the resulting case class looks like this:
case class Info extends myTraits.MyCustomTrait(
name: String,
version: String,
scalaVersion: String,
sbtVersion: String
) {
}And the sbt error is:
case classes without a parameter list are not allowed;
[error] use either case objects or case classes with an explicit () as a parameter list.
[error] case class Info extends myTraits.MyCustomTrait(
[error] ^
[error] one error found
[error] (compile:compileIncremental) Compilation failed
Apparently, the traits names should be added right after the class parameters rather than before.
SBT version: 0.13.8
Scala version: 2.11.7
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels