Reject unknown fields when parsing .yaml
files
#587
Labels
C-Low Hanging Fruit
Ideal issue for new contributors.
L-Parsing
Parsing the Swarm language from a string into an AST.
S-Nice to have
The bug fix or feature would be nice but doesn't currently have much negative impact.
Z-Developer Experience
This issue seeks to make life easier for developers writing Scenarios or other Swarm code.
Z-Feature
A new feature to be added to the game.
Is your feature request related to a problem? Please describe.
I just spent a frustrating 20 minutes trying to figure out why my scenario didn't work the way I wanted, until I finally realized that the
seed:
field should be at the top level, rather than indented underworld:
. No error was generated because (1) theseed
is optional, and (2) unknown fields are simply ignored.Describe the solution you'd like
We should have a standard way to check for, and reject, unknown/misplaced/misspelled fields. For example, see this StackOverflow question: https://stackoverflow.com/questions/67375099/prevent-unknown-field-names-in-aeson-parsejson
The text was updated successfully, but these errors were encountered: