You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug moldybread.nim reports "Must set value of logfile in config.yml. See default_config.yml." when there is a YamlConstructionError. This is misleading because it can be caused by a wide variety of things including:
If you're running an old version of moldybread with a new config.yml, there is a mismatch in keys and values between the compiled type, the yaml/serialization library, and the config.
If you're running a new version of moldybread with an old config.yml, there is a mismatch in keys and values between the compiled type, the yaml/serialization library, and the config.
To Reproduce
Run moldybread head against a config.yml that has an extra key.
Run moldybread head against a config.yml that is missing a key.
Expected behavior
The message should indicate what the problem is: that the yaml being used doesn't isn't aligned with the current version of moldybread.
Screenshots
With no handling, here's what we'd see with a missing field:
Error: unhandled exception: While constructing ConfigSettings: Missing field: "max_results" [YamlConstructionError]
With no handling, here's what we'd see with an extra field:
Error: unhandled exception: While constructing ConfigSettings: Unknown field: "yo" [YamlConstructionError]
With current handling, this is what we see: Must set value of logfile in config.yml. See default_config.yml.
🤦♂️
Additional context
The Yaml Library we are using makes this a little difficult. Minimally, we should just get the exception handler to reflect reality better. If possible, it'd be nice to point out what the problem is.
Also, it should be said that the current handler is recent, so any old versions of moldybread should have an error similar to an unhandled exception.
The text was updated successfully, but these errors were encountered:
Describe the bug
moldybread.nim
reports"Must set value of logfile in config.yml. See default_config.yml."
when there is a YamlConstructionError. This is misleading because it can be caused by a wide variety of things including:To Reproduce
Expected behavior
The message should indicate what the problem is: that the yaml being used doesn't isn't aligned with the current version of moldybread.
Screenshots
With no handling, here's what we'd see with a missing field:
Error: unhandled exception: While constructing ConfigSettings: Missing field: "max_results" [YamlConstructionError]
With no handling, here's what we'd see with an extra field:
Error: unhandled exception: While constructing ConfigSettings: Unknown field: "yo" [YamlConstructionError]
With current handling, this is what we see:
Must set value of logfile in config.yml. See default_config.yml.
🤦♂️
Additional context
The Yaml Library we are using makes this a little difficult. Minimally, we should just get the exception handler to reflect reality better. If possible, it'd be nice to point out what the problem is.
Also, it should be said that the current handler is recent, so any old versions of moldybread should have an error similar to an unhandled exception.
The text was updated successfully, but these errors were encountered: