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
When building an application with complex configuration read from many sources it is desirable being able to report precisely on the source location of any given setting when appropriate.
For example when reporting configuration errors it is highly desirable being able to report precisely the source of the conflicting setting to facilitate fixing the situation.
Another example is when reporting some collection of configuration settings for user checking.
I believe for input formats, the "precise source" of the setting would be a pair of location of resource and line number from where the setting effective value has been read.
The text was updated successfully, but these errors were encountered:
Interesting feature. The following API could do the trick:
sealed trait Source
case object NA extends Source
case class Resource( name: String, lineNumber: Int )
//in Configuration class
// returns None if the key does not exists
def getSource( key: String ): Option[Source] = ...
It should be possible to implement it, by including another map in the Configuration class storing the key->source relationship. It is also possible to retrieve the line number with the scala parsers. So it could be easy to add it to the standard formats. However, it will require a lot of work with other formats like YAML.
When building an application with complex configuration read from many sources it is desirable being able to report precisely on the source location of any given setting when appropriate.
For example when reporting configuration errors it is highly desirable being able to report precisely the source of the conflicting setting to facilitate fixing the situation.
Another example is when reporting some collection of configuration settings for user checking.
I believe for input formats, the "precise source" of the setting would be a pair of location of resource and line number from where the setting effective value has been read.
The text was updated successfully, but these errors were encountered: