Allow for lazy dependencies when validating
brabster opened this issue · 2 comments
https://blog.juxt.pro/posts/component-meet-schema.html
This is very pertinent information, and if anyone has a specific idea on how to leverage this, I'm all ears.
The article is from a user perspective, who can do validations when the system is being assembled. As a library, we are doing validation on the constructor of the component. We cannot necessarily do all the validations described, am I wrong?
At any rate, this is the kind of things that would fit in a section in the README. A paragraph on the kind of validation mentioning that we do, the kind of validations that is possible to do, and a link to Juxt's article.
@danielsz yes, it looks like they add a new lifecycle stage 'check' for clients to call as they see fit.
Assuming that the same argument applies to this library (i.e. dependencies may not be available to validate at the point we want to validate them under DI etc.) the first dumb thought that I had was whether it would be possible to make validation 'lazy', taking place when the dependency is fully satisfied somehow.
That said, if no-one's complained then it's maybe not an issue for the consumers of this lib and so not worth worrying about?
Closing for now. Feel free to reopen if you have plans to submit a PR or want to continue the discussion.