Closed stcarrez closed 5 months ago
Hello,
I was originally reluctant to include source location information in TOML_Value
since that kind of information isn’t really part of the values themselves: it’s ignored during serialization, comparisons/equality, … and will necessarily be absent for all values that are not created by a parser (for instance for a value created by the Create_Table
function).
But at the same time as you noted, this feature would be really useful for most uses of ada-toml, it would be really convenient to track it in TOML_Value
and I don’t see other realistic designs… so I’ll give it a try. :-)
This is an improvement suggestion. It would be nice to know the
Source_Location
where aTOML_Value
is defined in the file.This is useful when the TOML file is correct but you want to report some configuration error specific to your tool (such as an invalid value, ...).
Example with Alire, if we write an invalid tag somewhere, we get the error:
I don't think we need the path name since there is no ambiguity on the file name.