Skip to content

Use plain text as internal format (not XML) #233

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

Merged

Conversation

gslowikowski
Copy link
Member

Since Scala version 2.13.0-M4 there is no scala-compiler -> scala-xml dependency.

The simplest solution is to avoid using XML in the classes used in the context of Scalac plugin.

It's value is always equal to `scoverage.Location.sourcePath`. Replace it with delegating method with the same name.
Change format of `scoverage.coverage.xml` file (containing information about instrumented statements) from XML to plain test (and file name to `scoverage.coverage`).

In Scala version 2.13.0-M4 the dependency `scala-compiler` -> `scala-xml` was removed and since Scalac plugin cannot add its own dependencies, one of the solutions is to resign from XML format.

The code generating reports will still use `scala-xml` dependency. It's not a problem because it's executes in the context of the build tool (SBT, Maven or Gradle), not Scalac.

The side effect of this change is increased performance because writing and reading plain test files is much faster than XML files, especially when these files are large.
It improves file readability.
@gslowikowski gslowikowski merged commit f9068db into scoverage:master Sep 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant