▲ | ok123456 6 hours ago | |
You don't have to reason about them. You write a compiler that enforces stronger invariants above and beyond everything is an array/string/list/number/pointer. Good general-purpose programming languages provide type systems that do just this. It is criminal that the industry simply ignores this and chooses to use blobs of YAML/JSON/XML with disastrous results---creating ad-hoc programming languages without a typesystem in their chosen poison. | ||
▲ | jayd16 5 hours ago | parent | next [-] | |
The real issue isn't the code part. You can just call into whatever arbitrary thing you want for the actual script part. YAML is used for the declarative part of structuring the job graph. The host (in this case, GitHub) would need to call into your code to build the job graph. Which means it would need to compile your code, which means it needs its own build step. This means it would need to run on a build machine that uses minutes because GitHub is not going to just run arbitrary code for free. There's no guarantee that your arbitrary language is thread safe or idempotent so it can't really run in parallel like how a declarative file could be used. So now you're in a situation where you add another spin up and tear down step even if your actual graph gen call is zero cost. There's a reason it works the way it does. | ||
▲ | silverwind 3 hours ago | parent | prev | next [-] | |
There is https://github.com/SchemaStore/schemastore which is effectively a type system for yaml/json. | ||
▲ | oblio 3 hours ago | parent | prev [-] | |
> You write a compiler that enforces stronger invariants above and beyond everything is an array/string/list/number/pointer. https://www.reddit.com/r/funny/comments/eccj2/how_to_draw_an... |