You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We had the following exceptions on generating the coverage: java.nio.charset.MalformedInputException: Input length = 1. It turned out that Scoverage sets an UTF-8 encoding for writing files but not for reading, e.g. in CodeGrid. I suggest Source.fromFile(mfile.source, "UTF-8").mkString because Scoverage should not rely on the JVM default encoding if it is using UTF-8 for writing.
The text was updated successfully, but these errors were encountered:
Thanks for bringing this up, it's a solid point. It looks like this was actually added to the ScoverageHtmlWriter, but not the other writers. So while even in sbt there is a setting key to set the encoding, it will only be applied to the html reports. I plan to fix this and align the various writers to all have the same behavior where you can pass in an encoding, and if not, it will default to utf-8. Right now the behavior is actually a bit different and for backwards compatibility reason it defaulted to system, but I want to assume that most of the time, in fact almost all of the time, that's not desired.
We had the following exceptions on generating the coverage:
java.nio.charset.MalformedInputException: Input length = 1
. It turned out that Scoverage sets an UTF-8 encoding for writing files but not for reading, e.g. in CodeGrid. I suggestSource.fromFile(mfile.source, "UTF-8").mkString
because Scoverage should not rely on the JVM default encoding if it is using UTF-8 for writing.The text was updated successfully, but these errors were encountered: