json-autotype icon indicating copy to clipboard operation
json-autotype copied to clipboard

Make running compilation test more robust...

Open mgajda opened this issue 6 years ago • 5 comments

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:

  • Stackage CI when using cabal >= 2.0 https://github.com/commercialhaskell/stackage/issues/4185
  • stack but only in the GitLab CI environment (#heisenbug) https://gitlab.com/migamake/json-autotype/-/jobs/126570099

#patches-accepted

mgajda avatar Nov 28 '18 18:11 mgajda

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.

workshub[bot] avatar Oct 04 '19 20:10 workshub[bot]

A user started working on this issue via WorksHub.

workshub[bot] avatar Dec 13 '19 04:12 workshub[bot]

@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?

sigrlami avatar Feb 28 '20 15:02 sigrlami

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.

mgajda avatar Mar 01 '20 11:03 mgajda

We discussed it within xml-typelift project, and we want to make it shared library to make it easier to test freshly generated code.

mgajda avatar Mar 01 '20 11:03 mgajda