Closed jfilby closed 1 year ago
You need the sparse
pragma in order to automatically ignore Option
types, see docs.
As for the defaultVal
problem, please ensure that you have imported yaml
(or yaml/annotations
) before using it. If this doesn't help, could you give a minimal reproducible example, not just the one line?
Closing due to lack of feedback, assuming this is solved.
This is likely solved, I haven't had time to retest. Thanks.
I have tried the defaultVal pragma and make the type an Option, neither one works.
When using an option type:
When running an the YAML field isn't specificed:
When using the defaultVal pragma:
This fails to compile:
This is with Nim v.1.6.10.