4 ms·
What I like: - the validation system - ability to split large configuration files into smaller files and enhance readability (I know Java / Spring Boot apps a
by xyst 3y ago
What I like:
- the validation system
- ability to split large configuration files into smaller files and enhance readability (I know Java / Spring Boot apps already have this ability using profiles)
- multiple language support
Wonder if it’s possible to have more complicated validation functions. The example given validates 1 configuration (“port must be greater than 1000”). But there are times when some configuration is valid by itself however in the presence of other configuration the configuration(s) will possibly be ignored.
Given:
- configA
- configB supersedes configA in app
When:
- both configA and configB set in pkl
Then:
- at compile time, should throw a validation error
Criticisms:
- documentation (in typical Apple fashion) appears to be lacking. Couldn’t find anything on the validation system
- missing LSP support
- yet another config language to support/learn
- mxey 3y agothe validation you are asking for sounds like what CUE does. If you say a: 5 a: 3 That’s an error. If you want the ability to "override", you have to write it like this, for example: a: *5 | int a: 3 This also works for struct/list members, so you can set defaults for all fields, and stuff like that. https://cuelang.org/docs/about/ https://cuelang.org/docs/about/