Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbols with non-printable characters produce invalid scoverage.coverage #15384

Closed
armanbilge opened this issue Jun 6, 2022 · 1 comment · Fixed by #16235
Closed

Symbols with non-printable characters produce invalid scoverage.coverage #15384

armanbilge opened this issue Jun 6, 2022 · 1 comment · Fixed by #16235
Assignees
Labels
area:coverage Code coverage, see https://dotty.epfl.ch/docs/internals/coverage.html itype:bug
Milestone

Comments

@armanbilge
Copy link
Contributor

Compiler version

3.2.0-RC1-bin-20220604-13ce496-NIGHTLY

Minimized code

//> using scala "3.2.0-RC1-bin-20220604-13ce496-NIGHTLY"
//> using option "-coverage-out:."

def `\r\n\f` = ()
@main def main = `\r\n\f`

Output

# Coverage data, format version: 3.0
# Statement data:
# - id
# - source path
# - package name
# - class name
# - class type (Class, Object or Trait)
# - full class name
# - method name
# - start offset
# - end offset
# - line number
# - symbol name
# - tree name
# - is branch
# - invocations count
# - is ignored
# - description (can be multi-line)
# '' sign
# ------------------------------------------
0
coverage.scala
<empty>
coverage$package$
Object
<empty>.coverage$package$


0
8
0


DefDef
false
0
false
def `\r\

1
coverage.scala
<empty>
coverage$package$
Object
<empty>.coverage$package$
main
18
32
1
main
DefDef
false
0
false
@main def main


Expectation

The non-printable characters should be escaped, otherwise they cannot be deserialized. See the related Scala 2 issue for more details:

/cc @ckipp01 @TheElectronWill

@armanbilge armanbilge added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Jun 6, 2022
@TheElectronWill TheElectronWill added area:coverage Code coverage, see https://dotty.epfl.ch/docs/internals/coverage.html and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Jun 6, 2022
@TheElectronWill TheElectronWill self-assigned this Sep 27, 2022
TheElectronWill added a commit to TheElectronWill/dotty that referenced this issue Oct 23, 2022
@TheElectronWill TheElectronWill linked a pull request Oct 23, 2022 that will close this issue
TheElectronWill added a commit to TheElectronWill/dotty that referenced this issue Oct 23, 2022
TheElectronWill added a commit to TheElectronWill/dotty that referenced this issue Oct 24, 2022
@armanbilge
Copy link
Contributor Author

Thanks @TheElectronWill!!

@Kordyjan Kordyjan added this to the 3.2.2 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:coverage Code coverage, see https://dotty.epfl.ch/docs/internals/coverage.html itype:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants