Morning! Day 2 of Polylith - new question: Whenever I create a new project, the generated deps.edn file includes Clojure version 1.11.1. I'd like it to be 1.12.0. Is this configurable somehow?
The code looks good as far as I can tell. Proposed change sounds useful for power users of Polylith. I am mostly working in one (big) project and I haven't been bothered by the current defaults. But some customization options for brick scaffolding could be nice!
Not as far as I know. The templating system behind the create command is a bit basic. I'd certainly like more control over it.
Pr to poly?
Haha... yeah, in my copious free time... 🙂
I didnt mean you
I meant bumping the clj version in the templates shpuldnt be too hard I'm guessing
It's all hard-coded into the creator component right now. Changing the default version would be easy but really folks want more control over what goes into each part.
The default version is here: https://github.com/polyfy/polylith/blob/master/components/creator/src/polylith/clj/core/creator/shared.clj
I'd like to have new source/test files contain a copyright message. I'd want to be able to suppress creation of resources by default. I'd prefer several different things in test files (requiring the source ns :as sut, using a different testing library by default, etc). Basically, I'd want to be able to provide Selmer-style templates for most files. I'd have to think about what the design of it should look like, and how you could provide per-workspace templates (and override global too, perhaps).
So, some of it would be workspace.edn config and some would be per-`create` command override maybe. Maybe modeled after deps-new (which leverages tools.build for all of this).
Thosr sound like great improvements actually
Couldn't poly leverage deps-new as a lib?
It could just leverage tools.build directly, TBH. deps-new is a fairly thin wrapper that provides a CLI for vars to substitute and some programmatic extension points (which poly wouldn't need).
But tools.build requires files on the filesystem rather than resources in a JAR so I think explicit Selmer usage would be better so you could rely on the classpath instead.
(although, given how simple Polylith's current file "templates" are, just strings in code as defaults would also work with Selmer)
I'll give it some thought...
For consideration and feedback: https://github.com/polyfy/polylith/issues/516
@msolli See the main channel for a PR I submitted to update Polylith to default to Clojure 1.12.0.
And a first cut PR for using Selmer templates for the create commands: https://github.com/polyfy/polylith/pull/520 -- feedback welcome!