Skip to content

Coverage difference with Scala 2 library TASTy #19227

@nicolasstucki

Description

@nicolasstucki

Disabled tests

https://github.com/lampepfl/dotty/blob/16f1680ffb07026309f1a5287bdd12cda14db068/compiler/test/dotty/tools/dotc/coverage/CoverageTests.scala#L31-L36

https://github.com/lampepfl/dotty/blob/16f1680ffb07026309f1a5287bdd12cda14db068/compiler/test/dotty/tools/dotc/coverage/CoverageTests.scala#L39-L44

How to reproduce

First remove the assumeFalse(..., Properties.usingScalaLibraryTasty) from CoverageTests, and then

$ sbt > set ThisBuild/Build.useScala2LibraryTasty := true > scala3-bootstrapped/testOnly dotty.tools.dotc.coverage.CoverageTests 

Output

The following checkfiles have some differences.

tests/coverage/run/i16940/i16940.scoverage.check
@@ -196,6 +196,23 @@ Object <empty>.Test$ <init> 539 +540 +25 +DurationInt +Apply +false +0 +false +3 + +11 +i16940/i16940.scala +<empty> +Test$ +Object +<empty>.Test$ +<init> +539 548 25 seconds @@ -205,7 +222,7 @@ false false 3.seconds -11 +12 i16940/i16940.scala <empty> i16940$package$ @@ -222,7 +239,7 @@ false false Future {\n if (option) {\n Thread.sleep(500)\n }\n synchronized {\n val tmp = test\n Thread.sleep(1000)\n test = tmp + 1\n }\n} -12 +13 i16940/i16940.scala <empty> i16940$package$ @@ -239,7 +256,7 @@ false false Thread.sleep(500) -13 +14 i16940/i16940.scala <empty> i16940$package$ @@ -256,7 +273,7 @@ true false {\n Thread.sleep(500)\n } -14 +15 i16940/i16940.scala <empty> i16940$package$ @@ -273,7 +290,7 @@ true false -15 +16 i16940/i16940.scala <empty> i16940$package$ @@ -290,7 +307,7 @@ false false synchronized {\n val tmp = test\n Thread.sleep(1000)\n test = tmp + 1\n } -16 +17 i16940/i16940.scala <empty> i16940$package$ @@ -307,7 +324,7 @@ false false Thread.sleep(1000) -17 +18 i16940/i16940.scala <empty> i16940$package$
tests/coverage/pos/TypeLambdas.scoverage.check
@@ -59,6 +59,23 @@ TypeLambdas$ Object covtest.TypeLambdas$ test +310 +311 +14 +ArrowAssoc +Apply +false +0 +false +1 + +3 +TypeLambdas.scala +covtest +TypeLambdas$ +Object +covtest.TypeLambdas$ +test 324 334 15 @@ -69,7 +86,7 @@ false false println(m) -3 +4 TypeLambdas.scala covtest TypeLambdas$ @@ -86,7 +103,7 @@ false false println(tuple) -4 +5 TypeLambdas.scala covtest TypeLambdas$

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coverageCode coverage, see https://dotty.epfl.ch/docs/internals/coverage.htmlarea:scala2-library-tastyAny issue generaing or using the Scala 2 library TASTyitype:bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions