Closed recursion-ninja closed 6 years ago
I encountered a strange runtime error while implementing this feature:
Invalid non-NFData closure (type 25087082) in Compact
@Boarders, do you have any idea how to diagnosis this. I'm assuming I need to add an NFData
instance for one of the types in the GraphState
, but I have no idea which one is type 25087082
.
Could it be a problem that the executable pcg
serialized the save state and the executable integration-tests
deserialized the save state?
Maybe we need to use something like cereal
instead?
@Boarders has merged this functionality into master using the binary
library.
Currently, most of the integration tests parse a data file for the desired value and compare it against a known value. This parsing is subject to possible failures. It would be much better to use the
SAVE()
command in PCG to serialize out a save state of the program's current working state after the script has completed and then have the integration tests read in and deserialize the save state to the complete and working Haskell object at the end of the PCG script and then use accessors to query the "solution" object for the desired value(s) to compare against.This will prevent issues regarding changes in output formats effecting the value parser(s) while simultaneously making accessing more values easier as we won't have to write new parsers for each desired value.