jw3 commented on pull request #431: URL: https://github.com/apache/incubator-daffodil/pull/431#issuecomment-708839422
Argument handling is getting out of control. I implemented some stuff today just to move the idea forward but didnt like doing it. https://github.com/jw3/incubator-daffodil/blob/validator_spi/impl/daffodil-lib/src/main/scala/org/apache/daffodil/api/Validator.scala#L41-L55 The complexity is that we need to convert the CLI arguments as strings to the proper type. But only the validator implementation knows how to do that. The handling of these strings prior to conversion and the interface needed to support the CLI makes the API usage scary. The code from today to try to bridge some of the gap was modeled after [typesafe config](https://github.com/lightbend/config). And it hit me tonight we should just use that and it would offload a bunch of complexity and eliminate a bunch of code in this PR. Benefits are - well known library - allow us to accept configuration on cli or from file - accept configuration in form of java props, json, or hocon - can pull configuration from environment - provides well known typed getters and setters - unsurprising validation and error handling - less of Daffodil to maintain - Apache 2.0 licensed Unless there are objections to using it, Im going to work it into the next iteration while responding to the latest feedback. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
