▲ | foota 2 days ago | |
I don't know that I would particularly _want_ to modify starlark programmatically, but it's certainly not impossible. Build files in bazel for instance are nicely modifiable: https://bazel.build/concepts/build-files. | ||
▲ | arccy a day ago | parent [-] | |
Only if you stick to the lowest level constructs. Example with Terraform HCL: if everything was just declared as plain resources, you can modify them trivially. But HCL has functions, so people try to DRY their code by declaring some custom input variable, running maps/filters/reshaping it until it's unrecognizable and them generating a dynamic set of resources out of it. There's no way a program can work through the reverse of all the input reshaping logic to e.g. add another resource without knowledge of the custom input structure. |