JuliaCI / Coverage.jl

Take Julia code coverage and memory allocation results, do useful things with them
MIT License
174 stars 68 forks source link

Debugging the Coveralls errors #314

Closed DilumAluthge closed 3 years ago

DilumAluthge commented 3 years ago

@vtjnash Take a look at these lines:

https://github.com/JuliaCI/Coverage.jl/blob/e0655f8bd26824ac7afc8e135b25e4ca2f804e18/src/coveralls.jl#L46-L46

If I understand correctly, MbedTLS.digest returns a Vector{UInt8}.

However, the Coveralls API documentation (https://docs.coveralls.io/api-introduction) has this "example of what a source file would look like as JSON":

{
  "name":     "lib/example.rb",
  "source_digest":   "1eb14b3a053f951ca925f2fd4d633eeb",
  "coverage": [null, 1, null]
}

If I understand correctly, this means that source_digest needs to be a string.

Is there a way for me to convert the output of MbedTLS.digest into a string in a way that is compatible with what the Coveralls API expects?

DilumAluthge commented 3 years ago

I'll try bytes2hex and see if Coveralls accepts that.

vtjnash commented 3 years ago

Seems like a good observation and fix