build-canaries / nevergreen

:baby_chick: A build monitor with attitude
https://nevergreen.io
Eclipse Public License 1.0
215 stars 38 forks source link

Investigate switching io-ts to zod for configuration validation #358

Closed GentlemanHal closed 1 year ago

GentlemanHal commented 1 year ago

I recently found out about Zod, which is TypeScript-first schema validation with static type inference

We currently use io-ts for this, which is working fine but can be a little confusing at times. Particularly it is written in a functional style, which nothing else in the codebase is.

Zod has a nice comparison to io-ts, which brings up some of these problems with io-ts.

Is it worth trying to switch? Will it make the code cleaner and easier to understand? Will it give useful error messages?