-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
In order to remove noise from build files we could have Context be concrete, but undefined on the BasicBuild and then inject it later
class BasicBuild{
def context: Context = throw new Exception("Context is injected by CBT via refinement")
}A concrete build.scala would then simply look like this:
class Build extends BasicBuild{ ... }instead of this
class Build(context: Context) extends BasicBuild(context){ ... }cbt would have another source file that it would compile together with the user provided source files for every build:
class BuildWithContext(override val context: Context) extends Buildcbt would then instantiate BuildWithContext instead of Buildas it is now.
We could also make Build a trait, but this would obfuscate compile errors in case of unimplemented abstract members. They would show as missing in BuildWithContext instead of missing inBuild where they make more sense for the user.
(cc @densh)
Reactions are currently unavailable