Thx for deps-new. It is a game changer for big-config. I'm planning to port deps-new to babashka. The synergy between the two libraries is that I'm using clojure for devops to generate configuration files instead of curating them manually. I have used this idea successfully with terreform and ansible. deps-new is usually invoked only one time but for devops I'm invoking it every terraform plan using big-config workflow facilities. The goal of using clojure for devops is to dry infracoding because I think that the DRY principle applies to both code and infracoding.
Is there an interest in a babashka version of deps-new outside my use case?
#bigconfig
Hey @alberto.miorin. The #babashka-neil tool is already using deps-new via neil new template . What is there to port? Perhaps I haven't been watching deps-new updates, but older versions ran with bb for sure
oh interesting, deps-new now uses tools-build: https://github.com/seancorfield/deps-new/blob/bbe04adacec62e5542dbc896c8f75770fa76e2be/src/org/corfield/new.clj#L11
I guess that's fine since it seems to only use file related things (copying, deleting stuff). I'd say tools.build is a bit of a heavy dep to just do that, but it loads in bb. The problem I'm seeing now is:
user=> (require '[org.corfield.new])
clojure.lang.ExceptionInfo: Cyclic load dependency: org.corfield.new->[ org.corfield.new.impl ]->[ org.corfield.new.impl ] [at /private/tmp/deps-new/src/org/corfield/new/impl.clj:5:3]
user=>This is because of a self-requiring namespace. When I change this to :
[org.corfield.new.impl :as-alias impl]
then it works in bb againI guess that clause can be removed wholesale since it doesn't seem to be doing anything
user=> (new/scratch {:name 'foo})
Creating project from org.corfield.new/scratch in foo
nilThx @borkdude. I'll do some tests. My goal is to have the fast start-up time of babashka in big-config projects. Right now I have tested only babashka clojure that invokes big-config that invokes deps-new and it has the 4 secs tax of the JVM. My plan was to remove the deps on tools.* in deps-new.
tools.build should be easy to eliminate, but as I've shown above it you don't even have to, it's just the self-requiring namespace that's currently not working in deps-new
deps-new has always wrapped tools.build for handling templates. That cyclic require sounds like a bug. Can one of you file a GH issue and I'll take a look?
interesting, didn't know that
thanks for fixing. @alberto.miorin deps-new should now be usable again in bb
How does neil know to use the latest deps-new?
it requires a manual update
haven't updated in a while
Ah, OK.