brandonchinn178 / hpc-lcov

Convert HPC coverage output to LCOV format
http://hackage.haskell.org/package/hpc-lcov
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

hash in tix file for Main does not match hash in mix file #12

Open brandon-leapyear opened 4 years ago

brandon-leapyear commented 4 years ago

Describe the bug

If you have two projects, one with a test suite and one with an executable, then running hpc-lcov on the .tix file generated by the executable will find the wrong .mix file for the Main module

Steps to Reproduce

stack test --coverage package1
stack build --coverage package2
stack exec package2-exe
hpc-lcov --file package2-exe.tix --main-package package2

Expected behavior

Environment

Additional context

Workaround: delete or move the Main.mix file for the test suite

brandon-leapyear commented 4 years ago

:sparkles: This is an old work account. Please reference @brandonchinn178 for all future communication :sparkles:


Possible solution: if tixModuleName tixModule is Main, only allow the mix directory for --main-package to be used