This improves the documentation and scripts responsible for
generating files. The main changes from the user's point of view
are:
* The `generate` script now supports four subcommands:
* `generate kubernetes` - Generate all Kubernetes bindings
* `generate examples` - Generate examples for the preferred Kubernetes version
* `generate readme` - Generate the README from the Dhall template
* `generate preferred` - Generate top-level files that re-export the preferred
Kubernetes version
The `generate` script without arguments generates everything
* Generation should be faster and more incremental now
For example, regenerating the `README` by itself should go more quickly since
it no longer requires regenerating any examples or Kubernetes bindings if
they haven't changed
This required overhauling the internal Nix code for generating these files
to support more granular builds.
Another consequence of this change is that the preferred Kubernetes
version no longer packages `Prelude.dhall`, `README.dhall` or the
`examples`. Those are now only stored within the top-level directory.
Fixes https://github.com/dhall-lang/dhall-kubernetes/issues/86
The motivation of this is to more accurately model the Kubernetes
API semantics by not auto-omitting empty fields. This is because
a field set to `Some ([] : List T)` is not necessarily the same
as `None (List T)`.
This makes the typical case a bit more verbose (more `Some`s), but
the difference to the `./examples` shows that it's not too bad.
This improves the granularity of the Nix build graph in order to minimize
unnecessary rebuilds.
This also fixed several bugs in the package generation along the way, so
this change includes those fixes.