Open mgajda opened 6 years ago
This issue is now published on WorksHub. If you would like to work on this issue you can start work on the WorksHub Issue Details page.
A user started working on this issue via WorksHub.
@mgajda I think this type of testing should be optional. As generated files in 90% of cases are ADT inside the business application which forces recompilation anyway. But for CI it should be enabled. Thoughts?
We can improve error message to make it clear that it may be pure compilation setup flaw.
However, we get more bug reports thanks to this features, which improves the code quality here.
We discussed it within xml-typelift
project, and we want to make it shared library to make it easier to test freshly generated code.
json-autotype
currently compiles the generated Haskell code immediately after producing it, in order to verify that it indeed can parse all the input files.We can either bank on the solution that disables this type of testing (which is not the best practice), or fix these weird environments that fail to run it properly.
Currently it fails on:
cabal >= 2.0
https://github.com/commercialhaskell/stackage/issues/4185stack
but only in the GitLab CI environment (#heisenbug) https://gitlab.com/migamake/json-autotype/-/jobs/126570099patches-accepted