Skip to content

Instantly share code, notes, and snippets.

@ryan-williams
Last active November 12, 2017 15:24
Show Gist options
  • Save ryan-williams/451da695c6aa6425affe3665c78a6419 to your computer and use it in GitHub Desktop.
Save ryan-williams/451da695c6aa6425affe3665c78a6419 to your computer and use it in GitHub Desktop.
sbt/coveralls crash with scalameta- macro-generated code
$ sbt clean coverage core/test core/coverageReport
[info] Loading global plugins from /Users/ryan/.sbt/0.13/plugins
[info] Loading project definition from /Users/ryan/c/hl/iterator/project
[info] Set current project to iterators-root (in build file:/Users/ryan/c/hl/iterator/)
[success] Total time: 0 s, completed Nov 12, 2017 3:22:09 PM
[info] Defining {.}/*:coverageEnabled
[info] The new value will be used by core/*:coverageEnabled, iterators-root/*:coverageEnabled, macros/*:coverageEnabled
[info] Reapplying settings...
[info] Set current project to iterators-root (in build file:/Users/ryan/c/hl/iterator/)
[info] Compiling 2 Scala sources to /Users/ryan/c/hl/iterator/macros/target/scala-2.11/classes...
[info] [info] Cleaning datadir [/Users/ryan/c/hl/iterator/macros/target/scala-2.11/scoverage-data]
[info] [info] Beginning coverage instrumentation
[info] [info] Instrumentation completed [43 statements]
[info] [info] Wrote instrumentation file [/Users/ryan/c/hl/iterator/macros/target/scala-2.11/scoverage-data/scoverage.coverage.xml]
[info] [info] Will write measurement data to [/Users/ryan/c/hl/iterator/macros/target/scala-2.11/scoverage-data]
[info] Compiling 38 Scala sources to /Users/ryan/c/hl/iterator/core/target/scala-2.11/classes...
[warn] <macro>:19: reflective access of structural type member method lastOpt should be enabled
[warn] by making the implicit value scala.language.reflectiveCalls visible.
[warn] This can be achieved by adding the import clause 'import scala.language.reflectiveCalls'
[warn] or by setting the compiler option -language:reflectiveCalls.
[warn] See the Scaladoc for value scala.language.reflectiveCalls for a discussion
[warn] why the feature should be explicitly enabled.
[warn] lazy val rest = main.lastOpt.map(fn).getOrElse(Iterator())
[warn] ^
[info] [info] Cleaning datadir [/Users/ryan/c/hl/iterator/core/target/scala-2.11/scoverage-data]
[info] [info] Beginning coverage instrumentation
[info] [info] Instrumentation completed [924 statements]
[info] [info] Wrote instrumentation file [/Users/ryan/c/hl/iterator/core/target/scala-2.11/scoverage-data/scoverage.coverage.xml]
[info] [info] Will write measurement data to [/Users/ryan/c/hl/iterator/core/target/scala-2.11/scoverage-data]
[warn] <macro>:23: match may not be exhaustive.
[warn] It would fail on the following inputs: Discard, EmitAlone
[warn] if (lteq(cost + curCost, limit)) take else if (idx == 0) elementTooCostlyStrategy match {
[warn] ^
[warn] two warnings found
[info] Compiling 49 Scala sources to /Users/ryan/c/hl/iterator/core/target/scala-2.11/test-classes...
[info] BufferedCollectWhileTest:
[info] - two
[info] - none
[info] - all
[info] - empty
[info] MapValuesTest:
[info] - empty
[info] - list
[info] - array
[info] Sliding2PrevTest:
[info] - empty
[info] - one
[info] - two
[info] - three
[info] CountByKeyTest:
[info] - empty
[info] - one
[info] - two
[info] - many
[info] Sliding2Test:
[info] - empty
[info] - one
[info] - two
[info] - three
[info] BufferedTakeWhileTest:
[info] - [1,10] half
[info] - [1,10] none
[info] - [1,10] one
[info] - [1,10] almost all
[info] - [1,10] all
[info] - empty
[info] - one, all
[info] - one, none
[info] SlidingIteratorTest:
[info] - empty
[info] - one
[info] - two
[info] - three
[info] - four
[info] FindLeftTest:
[info] - findleft
[info] GroupByLeftTest:
[info] - simple
[info] - rights first and last
[info] - rights not consumed
[info] RoundUpRightTest:
[info] - mixed
[info] - rights first
[info] SplitTest:
[info] - simple
[info] - double-space and trailing space
[info] - leading spaces, multiple-space, trailing spaces
[info] LeftMergeTest:
[info] - mixed
[info] - left empty
[info] StringIntTest:
[info] - different types
[info] DiscardElementTooCostlyTest:
[info] - empty
[info] - 1-10 9
[info] - 1-10 1
[info] - random
[info] - consecutive discards
[info] EmitAloneElementTooCostlyTest:
[info] - empty
[info] - 1-10 1
[info] - random
[info] ThrowOnTooCostlyElementTest:
[info] - empty
[info] - 1-10 10
[info] - 1-10 9
[info] - random
[info] SimpleTest:
[info] - ints
[info] - left tuples
[info] SliceTest:
[info] - 10
[info] IntsTest:
[info] - 1,3,5 2,4,6
[info] - 1,2,3 4,5,6
[info] - 1,2,3 1,2,3
[info] - 1,2,4,7,9 1,3,5,6,7,8
[info] - empty empty
[info] - empty 1
[info] - empty 1,10,100
[info] - 1 empty
[info] - 1,10,100 empty
[info] RunLengthTest:
[info] - empty
[info] - single
[info] - one run
[info] - two singletons
[info] - run singleton
[info] - singleton run
[info] - single run single
[info] - two runs
[info] - evens and odds
[info] - re-encode
[info] CountElemsTest:
[info] - empty
[info] - one
[info] - two
[info] - many
[info] SampleTest:
[info] - zero 0
[info] - zero 10
[info] - one 0
[info] - one 1
[info] - one 2
[info] - one 10
[info] - two 0
[info] - two 1
[info] - two 2
[info] - two 3
[info] - two 10
[info] - three 0
[info] - three 1
[info] - three 2
[info] - three 3
[info] - three 4
[info] - three 10
[info] - four 0
[info] - four 1
[info] - four 2
[info] - four 3
[info] - four 4
[info] - four 5
[info] - four 10
[info] - five 0
[info] - five 1
[info] - five 2
[info] - five 3
[info] - five 4
[info] - five 5
[info] - five 10
[info] - six 0
[info] - six 1
[info] - six 2
[info] - six 3
[info] - six 4
[info] - six 5
[info] - six 6
[info] - six 10
[info] - seven 0
[info] - seven 1
[info] - seven 2
[info] - seven 3
[info] - seven 4
[info] - seven 5
[info] - seven 6
[info] - seven 7
[info] - seven 10
[info] IntsTest:
[info] - 1,3,5 2,4,6
[info] - 1,2,3 4,5,6
[info] - 1,2,3 1,2,3
[info] - 1,2,4,7,9 1,3,5,6,7,8
[info] - empty empty
[info] - empty 1
[info] - empty 1,10,100
[info] - 1 empty
[info] - 1,10,100 empty
[info] GroupRunsPredicateTest:
[info] - end with run
[info] - start with run
[info] - one run
[info] - empty
[info] - no runs
[info] - true singleton
[info] - false singleton
[info] GroupRunsTest:
[info] - empty
[info] - one
[info] - two same
[info] - two different
[info] - three same
[info] - two same one different
[info] - three same skip one
[info] - two same two same
[info] - one then three
[info] IntsTest:
[info] - 1,3,5 2,4,6
[info] - 1,2,3 4,5,6
[info] - 1,2,3 1,2,3
[info] - 1,2,4,7,9 1,3,5,6,7,8
[info] - empty empty
[info] - empty 1
[info] - empty 1,10,100
[info] - 1 empty
[info] - 1,10,100 empty
[info] ContiguousTest:
[info] - empty
[info] - simple
[info] - one range
[info] - no ranges
[info] Sliding3Test:
[info] - empty
[info] - one
[info] - two
[info] - three
[info] - four
[info] - five
[info] ScanLeftValuesInclusiveTest:
[info] - left ints
[info] - left strings
[info] - left case classes
[info] ScanLeftValuesExclusiveTest:
[info] - left ints
[info] - left strings
[info] - left case classes
[info] ScanRightValuesInclusiveTest:
[info] - right ints
[info] - right strings
[info] - right case classes
[info] ScanRightValuesExclusiveTest:
[info] - right ints
[info] - right strings
[info] - right case classes
[info] IntStringTest:
[info] - different types
[info] BufferedDropWhileTest:
[info] - [1,10] half
[info] - [1,10] none
[info] - [1,10] one
[info] - [1,10] almost all
[info] - [1,10] all
[info] - empty
[info] - one, all
[info] - one, none
[info] IntStringTest:
[info] - different types
[info] Sliding2PadTest:
[info] - empty
[info] - one
[info] - two
[info] - three
[info] TakeEagerTest:
[info] - empty
[info] - take none
[info] - 10-2
[info] - 10-20
[info] Sliding3NextOptsTest:
[info] - empty
[info] - one
[info] - two
[info] - three
[info] - four
[info] - five
[info] OverlappingRangesTest:
[info] - trivial case
[info] - stable right-side ordering
[info] - all rights before
[info] - all rights after
[info] - fully skipped rights
[info] Sliding3OptTest:
[info] - empty
[info] - one
[info] - two
[info] - three
[info] - four
[info] - five
[info] NextOptionTest:
[info] - empty
[info] - one elem
[info] - two elems
[info] - ten elems
[info] DropRightTest:
[info] - drop-ones
[info] - drop-twos
[info] - drop-zero
[info] - except on invalid arg
[info] FinishTest:
[info] - empty
[info] - one
[info] - three
[info] SimpleIteratorTest:
[info] - done
[info] - buffer
[info] - empty toString
[info] - non-empty toString
[info] ExpandLastElementTest:
[info] - empty
[info] - one element
[info] - two elements
[info] Sliding2OptTest:
[info] - empty
[info] - one
[info] - two
[info] - three
[info] StringIntTest:
[info] - different types
[info] ScanLeftInclusiveTest:
[info] - scanL ints
[info] - scanL strings
[info] - scanL case class
[info] ScanLeftExclusiveTest:
[info] - scanL ints
[info] - scanL strings
[info] - scanL case class
[info] ScanRightInclusiveTest:
[info] - scanR ints
[info] - scanR strings
[info] - scanR case class
[info] ScanRightExclusiveTest:
[info] - scanR ints
[info] - scanR strings
[info] - scanR case class
[info] LevelTest:
[info] - empty
[info] - one empty
[info] - two empties
[info] - one empty one elem
[info] - one empty two elems
[info] - one elem one empty
[info] - two elems one empty
[info] - two ones
[info] - many elems
[info] - runs
[info] Run completed in 2 seconds, 348 milliseconds.
[info] Total number of tests run: 266
[info] Suites: completed 52, aborted 0
[info] Tests: succeeded 266, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
[success] Total time: 54 s, completed Nov 12, 2017 3:23:09 PM
[info] Waiting for measurement data to sync...
[info] Reading scoverage instrumentation [/Users/ryan/c/hl/iterator/core/target/scala-2.11/scoverage-data/scoverage.coverage.xml]
[info] Reading scoverage measurements...
[info] Generating scoverage reports...
[info] Written Cobertura report [/Users/ryan/c/hl/iterator/core/target/scala-2.11/coverage-report/cobertura.xml]
java.lang.RuntimeException: No source root found for '/Users/ryan/c/hl/iterator/<macro>' (source roots: '/Users/ryan/c/hl/iterator/core/src/main/scala/')
at scoverage.report.BaseReportWriter.relativeSource(BaseReportWriter.scala:28)
at scoverage.report.BaseReportWriter.relativeSource(BaseReportWriter.scala:16)
at scoverage.report.CoberturaXmlWriter.klass(CoberturaXmlWriter.scala:42)
at scoverage.report.CoberturaXmlWriter$$anonfun$pack$1.apply(CoberturaXmlWriter.scala:66)
at scoverage.report.CoberturaXmlWriter$$anonfun$pack$1.apply(CoberturaXmlWriter.scala:66)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(Traversable.scala:105)
at scoverage.report.CoberturaXmlWriter.pack(CoberturaXmlWriter.scala:66)
at scoverage.report.CoberturaXmlWriter$$anonfun$xml$3.apply(CoberturaXmlWriter.scala:90)
at scoverage.report.CoberturaXmlWriter$$anonfun$xml$3.apply(CoberturaXmlWriter.scala:90)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(Traversable.scala:105)
at scoverage.report.CoberturaXmlWriter.xml(CoberturaXmlWriter.scala:90)
at scoverage.report.CoberturaXmlWriter.write(CoberturaXmlWriter.scala:20)
at scoverage.ScoverageSbtPlugin$.scoverage$ScoverageSbtPlugin$$writeReports(ScoverageSbtPlugin.scala:177)
at scoverage.ScoverageSbtPlugin$$anonfun$coverageReport0$1.apply(ScoverageSbtPlugin.scala:113)
at scoverage.ScoverageSbtPlugin$$anonfun$coverageReport0$1.apply(ScoverageSbtPlugin.scala:104)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (core/*:coverageReport) No source root found for '/Users/ryan/c/hl/iterator/<macro>' (source roots: '/Users/ryan/c/hl/iterator/core/src/main/scala/')
[error] Total time: 2 s, completed Nov 12, 2017 3:23:11 PM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment