Closed
Description
We add
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.3.1")
and then enable the ScoverageSbtPlugin plugin. With overageEnabled := true, we clean test.
sbt-scoverage produces a couple of coverage reports, but problems begin to occur:
[info] [info] Cleaning datadir [/Users/patrick/npl/core/target/scala-2.11/scoverage-data]
[info] [info] Beginning coverage instrumentation
[info] [warn] Could not instrument [EmptyTree$/null]. No pos.
[info] [warn] Could not instrument [EmptyTree$/null]. No pos.
[info] [warn] Could not instrument [EmptyTree$/null]. No pos.
[info] [warn] Could not instrument [EmptyTree$/null]. No pos.
[info] [warn] Could not instrument [EmptyTree$/null]. No pos.
[info] [warn] Could not instrument [EmptyTree$/null]. No pos.
[info] [warn] Could not instrument [EmptyTree$/null]. No pos.
...
[info] [warn] Could not instrument [EmptyTree$/null]. No pos.
[info] [warn] Could not instrument [EmptyTree$/null]. No pos.
[info] [info] Instrumentation completed [28579 statements]
[info] [info] Wrote instrumentation file [/Users/patrick/npl/core/target/scala-2.11/scoverage-data/scoverage.coverage.xml]
[info] [info] Will write measurement data to [/Users/patrick/npl/core/target/scala-2.11/scoverage-data]
Then, in the next project in our project dependencies:
[error] /Users/patrick/npl/runtime/src/main/scala/com/auvik/npl/table/TableActor.scala:199: type mismatch;
[error] found : _$5
[error] required: _$4
[error] r + (col -> compiled.run(r))
[error] ^
[error] /Users/patrick/npl/runtime/src/main/scala/com/auvik/npl/table/adapter/csv/CsvTable.scala:137: type mismatch;
[error] found : Any
[error] required: _$58
[error] (result._1 + (c -> compiled.run(result._1)), result._2)
[error] ^
[error] /Users/patrick/npl/runtime/src/main/scala/com/auvik/npl/tools/Compiler.scala:250: type mismatch;
[error] found : com.auvik.npl.table.Table.scala.PKey
[error] (which expands to) Any
[error] required: table.PKey
[error] val debugRow = updated.getOrElse(Row(table.pKey -> aggregate.primaryKey(aggregateContext)))
[error] ^
[error] /Users/patrick/npl/runtime/src/main/scala/com/auvik/npl/tools/RuntimeContext.scala:1255: type mismatch;
[error] found : com.auvik.npl.table.Table.scala.PKey
[error] (which expands to) Any
[error] required: tableInfo.PKey
[error] val debugRow = updated.getOrElse(Row(tableInfo.pKey -> aggregate.primaryKey(aggregateContext)))
[error] ^
This code typechecks without coverage. It seems like the code that fails involves type aliases including existential types.
Not sure if this belongs here or in scoverage itself.