Kit looks great! I think that prebuilt modules + generators is exactly the type of tooling I've wanted when developing applications in Clojure, and have enjoyed using similar tools with Elixir + Phoenix.
A question I have after reading the blog post: how does versioning of modules work? Examples:
There's a security problem in an auth module I'm using, and I need to upgrade my service. What's the right way to upgrade the module?
I just installed a module and there's a bug in the latest version in the way it merged my config. I revert the changes, can I also try an earlier version of the module?
I have been using a module that hasn't been updated in awhile. I'd like to use a newer version of a library that it installed; what's the right way to override what the module is doing?
Very excited about this, I think that it will help a lot of people by easing evolving a code base over time in the same way luminus helped with boot strapping a new one.
And it's a good question about versioning. Currently, it's not in scope, but could definitely be added later. Module config is a map, so it would be a matter of adding a new key there. Then when modules are installed, they write to the install log in the project. So the modules could write out the version that was last installed.
Then there could be a concept if migrations in the modules potentially. So, a module could look at the installed version and figure out what needs updating based on that.
Thanks for the suggestion, I'll add it in to the roadmap. :)
It's likely you've thought of this, but what if modules were consumed as libs and included in a consumers deps.edn, and then kit could use whatever is on the class path?
You could keep the explicit module config in kit.edn if you like, or even allow walking the class path to find all available modules.
There is already a set of libraries for stuff that can be abstracted that way, and those can be included via deps.edn. However, the point of a module is to add functionality directly into assets controlled by the user. For example, if we add support of ClojureScript or HTML, we'd add HTML template files, package.json, etc.
17
u/lilactown Jan 08 '22
Kit looks great! I think that prebuilt modules + generators is exactly the type of tooling I've wanted when developing applications in Clojure, and have enjoyed using similar tools with Elixir + Phoenix.
A question I have after reading the blog post: how does versioning of modules work? Examples:
There's a security problem in an auth module I'm using, and I need to upgrade my service. What's the right way to upgrade the module?
I just installed a module and there's a bug in the latest version in the way it merged my config. I revert the changes, can I also try an earlier version of the module?
I have been using a module that hasn't been updated in awhile. I'd like to use a newer version of a library that it installed; what's the right way to override what the module is doing?
Very excited about this, I think that it will help a lot of people by easing evolving a code base over time in the same way luminus helped with boot strapping a new one.