crystal icon indicating copy to clipboard operation
crystal copied to clipboard

fix generators and re-enable generator tests

Open petertseng opened this issue 3 years ago • 2 comments

The generators are currently broken. When they are fixed, the maintainer of this track should re-enable the generator tests in GitHub Actions by uncommenting the commented line in the workflow.

https://github.com/exercism/crystal/blob/890ceee8c07858d2543fabb491a74b771f0a0c8f/.github/workflows/tests.yml#L23

petertseng avatar Feb 02 '22 10:02 petertseng

The person who wishes to solve this will notice that the generators are not compiling because of JSON.mapping. They will rightfully notice that this can be solved by using https://github.com/crystal-lang/json_mapping.cr. That will probably be deemed sufficient for the time being.

It is a possibility to convert all generators to use JSON::Serializable instead of JSON.mapping, but that's a lot of effort for net zero change in functionality, so the person who wishes to solve this issue does not have much incentive to do this. But, what they could do is use json_mapping for the short term and open another issue for the task of switching to JSON::Serializable for later.

petertseng avatar Feb 04 '22 06:02 petertseng

I've tested the generator in this PR: https://github.com/exercism/crystal/pull/269

It works with luhn, binary, and clock (which I am implementing but is not in the repository yet)

@petertseng - What do you think?

marksiemers avatar Apr 18 '22 23:04 marksiemers