(no title)
H12 | 2 years ago
After reading the title, my assumption was that Pkl was yet another newer, better configuration language (a la TOML), but now that I've read the article, it sounds like it's more a language for _generating_ config.
Unless I'm mistaken, it sounds like an abstraction on top of your config files meant to help you build & re-use configuration in a more standardized way, rather than yet another config language into itself.
A problem space I'm familiar with is having a bunch of Terraform or Cloudformation configuration you want to share/repeat in multiple projects. Doing-so can get hairy quickly, as the path of least resistance is to copy-paste a bunch of config you barely understand from some other project, and then perform trial-and-error surgery to find and change a couple of lines to suit your project.
Is Pkl designed to help address that sort of problem? Or am I missing something?
bioballer|2 years ago
Yes, Pkl is meant to solve this problem. It's a single place for you to configure all your targets. Within the same codebase, you can generate static configuration, and also import the same Pkl source files into a runtime application, so you don't have to copy/paste things around.
H12|2 years ago
I see much more clearly how something like this could be extremely useful.
Too|2 years ago
Instead of copy-paste of json files or aws resources, you can write a terraform module to generate it.
If you need to copy paste a large chunk of terraform module it is time to schedule refactoring.
H12|2 years ago
This is possibly (if not likely) moreso a result of creating our terraform modules in a suboptimal way due to insufficient expertise than a shortcoming of Terraform itself.
It is also largely a result of having a backlog of scheduled redactors that is longer than I'd care to admit.
mimischi|2 years ago