tweag / cooked-validators

MIT License
39 stars 11 forks source link

Reporting code coverage #283

Closed gabrielhdt closed 7 months ago

gabrielhdt commented 1 year ago

In order to improve the test suite, we may enable coverage reporting.

Coverage can be enabled simply using

$ cabal test all --enable-coverage

However, currently (on commit 0abf27d833cc6a4d861ae96de87f153cc980b995 of 2023-02-20) , this fails with

Error:
    Internal libraries only supported with per-component builds.
    Per-component builds were disabled because program coverage is enabled
    In the package 'typerep-map-0.6.0.0'

which should be fixed (not tested yet) using the following cabal.project.local

package *
  coverage: True
  library-coverage: True

package typerep-map
  coverage: False
  library-coverage: False

and then simply calling cabal test.