component

donaldball 2016-08-31T15:10:27.000004Z

Has anyone else done anything structured around validating components’ configurations? My usual approach is to validate the config values types before building a system, but to defer any run-time validation (e.g. the server is up and accepts our credentials) to the start method, where I just raise for problems. Needless to say, this doesn’t present a good UX. I’m trying out a Validate protocol now, where components can report anything that stands in the way of them being able to start, with a utility fn that walks up the tree collecting errors as far as it can go.

donaldball 2016-08-31T15:10:48.000005Z

This feels like a common problem, so I’m curious what approaches others might have used.

seancorfield 2016-08-31T16:49:48.000007Z

We’re about to go down the path of spec’ing our components so we may be wandering about in that territory shortly, but I don’t believe we have much possibility of "bad configuration" in the way we set things up so I don’t know what our experiences will be — or whether they’d be relevant to you @donaldball

donaldball 2016-08-31T16:51:54.000008Z

I’m thinking more along the lines of “password is not accepted” than “password is not a string”, though both are germane problems to present to the operator