I mentioned at the beginning of the year that I would be focusing on improving the dhall-kubernetes experience. More specifically, my goal is to enable the Dhall analog of Helm, which several contributors are independently converging on.
To give those contributors better visibility into what is going on, I though I would use this thread to summarize my personal roadmap for change I plan to propose and implement to improve the Kubernetes experience.
Performance
The first thing I’m focusing on is improving the performance of the language on large-scale examples. This is a good thing to do in general, but it’s essential for Kubernetes support since the Kubernetes schema is large.
The two things I plan to do are:
-
Propose a new caching mechanisms that users can opt into (e.g. using
cache:sha256:…) that hashes and caches expressions exactly the way they were writtenI expect this to greatly improve caching performance and also reduce the size of cached expressions. This will also have a bonus effect of improving the UX for importing cached expressions, since they won’t be α-normalized when fetched from cache.
-
Propose more efficient support for
withThis will either be via https://github.com/dhall-lang/dhall-lang/pull/1050 or another proposal in the same spirit (depending on the discussion on that issue)
-
Complete
store.dhall-lang.orgto cache packages like KubernetesI outlined this in RFC: proxy.dhall-lang.org and I think I’m pretty close to completing this with a few small tweaks on the Nixpkgs side of things. This should improve the first-time experience by speeding up the resolution of the
dhall-kubernetespackage.This will eventually be combined with the work on the documentation generator to create a package repository where the same URL can serve either the documentation or the cached expression depending on the
Acceptheader
Ergonomics
All of the ergonomic changes I plan are going to be related to the with keyword:
-
Add support for updating
Optional/Listvalues using?/*, respectivelyIn other words, let the user write something like:
x with foo.?.bar.*.baz -
Add support for updating
Maps usingwithif the keys are statically knownSee https://github.com/dhall-lang/dhall-lang/issues/979 for more details
-
Change the
::operator to desugar towithexpressions instead of//In other words,
Example::{ foo.bar = 1, baz = True }would now desugar to(Example.default with foo.bar = 1 with baz = True) : Example.Type
Feedback
I hope that helps give other people some idea of what I have in mind. Also, feel free to share feedback on that or new ideas on this thread.
I’m also trying to spread out the language changes over time, so as not to exhaust maintainers of other bindings. There’s no rush on my end because these changes are mostly backwards-compatible and therefore don’t require switching over the ecosystem ASAP.