I hoped you would just take over configurator package. Have tried contacting u/bos?
FromValue interface has really detailed errors, but it is missing the location information. I think it would be great if you could show users the location in source file where they made a mistake.
For something like generic JSON data, carrying location around would be too much memory overhead, but config files are usually not that big. Have you thought about adding something like Maybe (Line, Column, Filename) to a Value?
I have not contacted bos regarding this fork, or the maintainership of configurator. I haven't given that possibility much thought one way or the other.
As for source file locations, yes I have been meaning to add filenames. I have not though about adding line and column information, but I'm not opposed.
Right now the list of errors/warnings generated from the MaybeParser/ValueParser/ListParser infrastructure is wrapped up into a single error message and tagged with the (Filename, key name as it appears in the file) if a key was found, or a list of key names that were examined if the key was not found. (Though the filename isn't filled in at this time, which I should file an issue about.)
I hoped you would just take over configurator package. Have tried contacting u/bos?
FromValue interface has really detailed errors, but it is missing the location information. I think it would be great if you could show users the location in source file where they made a mistake.
For something like generic JSON data, carrying location around would be too much memory overhead, but config files are usually not that big. Have you thought about adding something like
Maybe (Line, Column, Filename)to a Value?I have not contacted bos regarding this fork, or the maintainership of configurator. I haven't given that possibility much thought one way or the other.
As for source file locations, yes I have been meaning to add filenames. I have not though about adding line and column information, but I'm not opposed.
Right now the list of errors/warnings generated from the
MaybeParser/ValueParser/ListParserinfrastructure is wrapped up into a single error message and tagged with the (Filename, key name as it appears in the file) if a key was found, or a list of key names that were examined if the key was not found. (Though the filename isn't filled in at this time, which I should file an issue about.)Ed's trifecta (and the parsers package) might be a useful place to look if you want good error reporting with source locations.