koanf icon indicating copy to clipboard operation
koanf copied to clipboard

Support for pkl

Open StefMa opened this issue 1 year ago • 6 comments

It would be great if this library has support for apples "new" configuration language pkl.

Some info can be found here: https://github.com/apple/pkl/discussions/849

StefMa avatar Dec 28 '24 16:12 StefMa

Perhaps we should close this as the aforementioned thread confirmed the hard dependency on the external pkl binary?

knadh avatar Feb 14 '25 12:02 knadh

What's wrong with having the pkl binary as a dependency? 🤔 Sure not the most elegant solution, but if someone wants to use that 🤷‍♂️.

If you are against it, also fine for me. However, we might can also keep it until they lift the restriction with the binary? 🤔

StefMa avatar Feb 14 '25 12:02 StefMa

While koanf is agnostic to whatever happens in a provider, given that the pkl ecosystem (eg: docs) itself doesn't lend much clarity on how it works, feels a bit off ship a provider that has an external bin dependency.

That said, it's not a big deal. If you'd like to send a PR (which can clearly document that it requires the pkl bin to be installed), then it's fair enough I guess.

knadh avatar Feb 16 '25 09:02 knadh

Hi @StefMa. Has your familiarity with pkl grown? If yes, do you think a PR is viable?

knadh avatar Jul 11 '25 11:07 knadh

Hey @knadh, I haven't followed up on this. But since they only provide a binary, I thought it doesn't make sense to move forward (for now).

In meantime, they created this issue (Provide a C library (libpkl) for Pkl). There is also some progress already happening.

I'm not 100% familiar with Go and a C library. But I guess this solution would be better instead of shiping a standalone binary, right?

StefMa avatar Jul 11 '25 11:07 StefMa

I found this: https://github.com/apple/pkl-go/pull/149

Haven't looked into the code yet, but might be interesting 🙃

StefMa avatar Jul 21 '25 19:07 StefMa