
Hi all, What analysis does the hackage server run to determine the coverage level of, or rating given to, a particular package? For example, for one package it is showing this icon: https://img.shields.io/static/v1?label=Coverage&message=32%&color=red What does that actually mean? The build log states: Code Coverage expressions 32% (224/684) booleanguards 100% (0/0) conditions 20% (1/5) qualifiers 100% (0/0) alternatives 27% (5/18) local declarations 40% (6/15) top-level declarations 32% (29/90) Is it possible to see details of how hackage is arriving to these conclusion, and to replicate these results locally? Thanks, Ivan

Hi Ivan,
Was that icon just a part of a README? If not, could you
give a link?
In any case, people at the #hackage Matrix/IRC channel may
know about any plans to add that (#hackage is a shared room
for Hackage and related topics such as ghcup, cabal,
Stackage-Hackage interoperation, etc.; all are welcome).
Cheers,
Mikolaj
On Sat, May 7, 2022 at 7:31 PM Ivan Perez
Hi all,
What analysis does the hackage server run to determine the coverage level of, or rating given to, a particular package?
For example, for one package it is showing this icon:
https://img.shields.io/static/v1?label=Coverage&message=32%&color=red
What does that actually mean? The build log states: Code Coverage expressions 32% (224/684) booleanguards 100% (0/0) conditions 20% (1/5) qualifiers 100% (0/0) alternatives 27% (5/18) local declarations 40% (6/15) top-level declarations 32% (29/90)
Is it possible to see details of how hackage is arriving to these conclusion, and to replicate these results locally?
Thanks,
Ivan _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

Looks like it's built into Hackage and not just in the Readme. The
bytestring package is a good example with several badges including code
coverage; if you click the "Build | InstallOK" badge, you get a more
detailed report.
https://hackage.haskell.org/package/bytestring
On Sat, May 7, 2022 at 11:46 AM Mikolaj Konarski
Hi Ivan,
Was that icon just a part of a README? If not, could you give a link?
In any case, people at the #hackage Matrix/IRC channel may know about any plans to add that (#hackage is a shared room for Hackage and related topics such as ghcup, cabal, Stackage-Hackage interoperation, etc.; all are welcome).
Cheers, Mikolaj
On Sat, May 7, 2022 at 7:31 PM Ivan Perez
wrote: Hi all,
What analysis does the hackage server run to determine the coverage level of, or rating given to, a particular package?
For example, for one package it is showing this icon:
https://img.shields.io/static/v1?label=Coverage&message=32%&color=red
What does that actually mean? The build log states: Code Coverage expressions 32% (224/684) booleanguards 100% (0/0) conditions 20% (1/5) qualifiers 100% (0/0) alternatives 27% (5/18) local declarations 40% (6/15) top-level declarations 32% (29/90)
Is it possible to see details of how hackage is arriving to these conclusion, and to replicate these results locally?
Thanks,
Ivan _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

Hi Mikolaj
For an example, see the badges at:
https://hackage.haskell.org/package/bytestring/
And the info at:
https://hackage.haskell.org/package/bytestring-0.11.3.1/reports/1
As Tikhon says, the badges are not part of the README. They are inserted by
hackage.
Ivan
On Sat, 7 May 2022 at 14:56, Tikhon Jelvis
Looks like it's built into Hackage and not just in the Readme. The bytestring package is a good example with several badges including code coverage; if you click the "Build | InstallOK" badge, you get a more detailed report.
https://hackage.haskell.org/package/bytestring
On Sat, May 7, 2022 at 11:46 AM Mikolaj Konarski
wrote: Hi Ivan,
Was that icon just a part of a README? If not, could you give a link?
In any case, people at the #hackage Matrix/IRC channel may know about any plans to add that (#hackage is a shared room for Hackage and related topics such as ghcup, cabal, Stackage-Hackage interoperation, etc.; all are welcome).
Cheers, Mikolaj
On Sat, May 7, 2022 at 7:31 PM Ivan Perez
wrote: Hi all,
What analysis does the hackage server run to determine the coverage level of, or rating given to, a particular package?
For example, for one package it is showing this icon:
https://img.shields.io/static/v1?label=Coverage&message=32%&color=red
What does that actually mean? The build log states: Code Coverage expressions 32% (224/684) booleanguards 100% (0/0) conditions 20% (1/5) qualifiers 100% (0/0) alternatives 27% (5/18) local declarations 40% (6/15) top-level declarations 32% (29/90)
Is it possible to see details of how hackage is arriving to these conclusion, and to replicate these results locally?
Thanks,
Ivan _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

I've made some progress. If I'm not mistaken, Hackage is running the tests
with coverage enabled [1], it's then running hpc to analyze program
coverage [2], that's being included in the report [3-5].
I think it would be very useful for package maintainers and devs to be able
to replicate what the hackage server does in a docker image, not just for
coverage, but for everything. One of my packages is showing that the tests
fail [6]; I suspect it's due to a bug in cabal [7], but the report on
hackage does not help me understand what went wrong.
Ivan
[1]
https://github.com/haskell/hackage-server/blob/b4ea1c73ba85f24985259fd1df466...
[2]
https://github.com/haskell/hackage-server/blob/b4ea1c73ba85f24985259fd1df466...
[3]
https://github.com/haskell/hackage-server/blob/b4ea1c73ba85f24985259fd1df466...
[4]
https://github.com/haskell/hackage-server/blob/b4ea1c73ba85f24985259fd1df466...
[5]
https://github.com/haskell/hackage-server/blob/9637bd45ba8c321bb9a938c47a15c...
[6] https://hackage.haskell.org/package/copilot-core-3.9
[7] https://github.com/haskell/cabal/issues/6440
On Sat, 7 May 2022 at 15:15, Ivan Perez
Hi Mikolaj
For an example, see the badges at: https://hackage.haskell.org/package/bytestring/
And the info at: https://hackage.haskell.org/package/bytestring-0.11.3.1/reports/1
As Tikhon says, the badges are not part of the README. They are inserted by hackage.
Ivan
On Sat, 7 May 2022 at 14:56, Tikhon Jelvis
wrote: Looks like it's built into Hackage and not just in the Readme. The bytestring package is a good example with several badges including code coverage; if you click the "Build | InstallOK" badge, you get a more detailed report.
https://hackage.haskell.org/package/bytestring
On Sat, May 7, 2022 at 11:46 AM Mikolaj Konarski
wrote: Hi Ivan,
Was that icon just a part of a README? If not, could you give a link?
In any case, people at the #hackage Matrix/IRC channel may know about any plans to add that (#hackage is a shared room for Hackage and related topics such as ghcup, cabal, Stackage-Hackage interoperation, etc.; all are welcome).
Cheers, Mikolaj
On Sat, May 7, 2022 at 7:31 PM Ivan Perez
wrote: Hi all,
What analysis does the hackage server run to determine the coverage level of, or rating given to, a particular package?
For example, for one package it is showing this icon:
https://img.shields.io/static/v1?label=Coverage&message=32%&color=red
What does that actually mean? The build log states: Code Coverage expressions 32% (224/684) booleanguards 100% (0/0) conditions 20% (1/5) qualifiers 100% (0/0) alternatives 27% (5/18) local declarations 40% (6/15) top-level declarations 32% (29/90)
Is it possible to see details of how hackage is arriving to these conclusion, and to replicate these results locally?
Thanks,
Ivan _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
participants (3)
-
Ivan Perez
-
Mikolaj Konarski
-
Tikhon Jelvis