I was experimenting with making deps-new templates that are aimed at babashka. These templates don't end up with a deps.edn file for neil to add an alias to (there's a bb.edn, but bb.edn doesn't use aliases afaik).
deps-new is quite happy to process one of these templates:
Using the template from neil works, but throws after deps-new runs:
$ neil new bobisageek/bb-template bbt2 --overwrite true --local/root "./bb-template"
Creating project from bobisageek/bb-template in bbt2
----- Error --------------------------------------------------------------------
Type: java.io.FileNotFoundException
Message: bbt2/deps.edn (No such file or directory)
Location: /home/linuxbrew/.linuxbrew/bin/neil:236:18
----- Context ------------------------------------------------------------------
232:
233: (defn ensure-neil-project [{:keys [dir deps-file]}]
234: (let [deps-file (resolve-deps-file dir deps-file)
235: _ (println "deps file:" deps-file)
236: deps-edn (slurp deps-file)
^--- bbt2/deps.edn (No such file or directory)
237: edn (edn/read-string deps-edn)]
At first I thought, "well, bb.edn is sort of the deps-file in this case, and indeed, adding --deps-file "bb.edn" to the neil command line quells the error, but in a way, that's not an ideal outcome, because it adds the neil alias, and since bb.edn doesn't use aliases, it's a little superfluous.
The solution I had in mind is basically to swallow the exception, and if there's no deps file to which to add the alias, then :shrug: . I suppose there could also be an option to disable the call to assoc-project-meta! (which adds the neil alias), but that feels a bit "neither necessary nor sufficient" to me, because it says that a consumer needs to know that neil is going to try to add the alias (which isn't clear in neil new --help) and needs to sort of preempt the exception caused by the assumption of a deps.edn file.
I was experimenting with making deps-new templates that are aimed at babashka. These templates don't end up with a
deps.edn
file for neil to add an alias to (there's a bb.edn, but bb.edn doesn't use aliases afaik).deps-new
is quite happy to process one of these templates:Using the template from
neil
works, but throws afterdeps-new
runs:At first I thought, "well, bb.edn is sort of the deps-file in this case, and indeed, adding
--deps-file "bb.edn"
to theneil
command line quells the error, but in a way, that's not an ideal outcome, because it adds the neil alias, and since bb.edn doesn't use aliases, it's a little superfluous.The solution I had in mind is basically to swallow the exception, and if there's no deps file to which to add the alias, then :shrug: . I suppose there could also be an option to disable the call to
assoc-project-meta!
(which adds the neil alias), but that feels a bit "neither necessary nor sufficient" to me, because it says that a consumer needs to know that neil is going to try to add the alias (which isn't clear inneil new --help
) and needs to sort of preempt the exception caused by the assumption of adeps.edn
file.