This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-16
Channels
- # announcements (3)
- # babashka (25)
- # beginners (71)
- # calva (18)
- # clj-kondo (52)
- # cljs-dev (94)
- # cljsrn (12)
- # clojure (33)
- # clojure-europe (52)
- # clojure-nl (2)
- # clojure-uk (27)
- # clojurescript (18)
- # clojureverse-ops (4)
- # datomic (64)
- # deps-new (27)
- # depstar (5)
- # events (5)
- # fulcro (5)
- # graalvm (12)
- # graalvm-mobile (82)
- # helix (2)
- # introduce-yourself (1)
- # juxt (5)
- # lsp (10)
- # malli (7)
- # missionary (1)
- # off-topic (41)
- # pathom (69)
- # pedestal (6)
- # re-frame (4)
- # reagent (8)
- # releases (9)
- # remote-jobs (8)
- # shadow-cljs (3)
- # sql (46)
- # tools-deps (44)
- # uncomplicate (1)
- # vim (83)
Hey hello I'm having the following error when trying to use templates from maven repositories:
clj -X:new :template dv.fulcro-template :name my-username/my-project-name
Output:
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
/home/delboni/Workpaces/180s/deps.edn (No such file or directory)
Full report at:
/tmp/clojure-14243314588760477617.edn
But if I run this it works fine:
clj -X:new :template app :name my-username/my-project-name
Output:
Generating a project called my-project-name based on the 'app' template.
Strangely if I create a empty deps.edn file in the folder I'm executing the clj-new command it works fine also:
echo "{}" >> deps.edn
clj -X:new :template dv.fulcro-template :name my-username/my-project-name
Output:
Downloading: dv/fulcro-template/clj-template/maven-metadata.xml from clojars
Downloading: dv/fulcro-template/clj-template/maven-metadata.xml from release
Generating fresh 'clj new' dv.fulcro-template project.
Is there some configuration I'm missing? https://github.com/rafaeldelboni/dotfiles/blob/master/clojure/deps.ednLooks like a bug in the latest release of clj-new
. Sorry about that. I switched it to use tools.deps.alpha
's create-basis
function and it seems that assumes there is always a deps.edn
file in the current directory 😞
I'm gonna watch this issue thanks a lot for your work
Version 1.1.314
should work fine?
1.1.321 will be available in just a few moments with a fix...
Woah thanks!!
Just tested, worked fine!
Thanks for you super fast support
I should have caught that change in behavior, sorry. Thanks for reporting it!
# with clj-new 1.1.317 installed:
(! 531)-> clojure -Tnew create :template dv.fulcro-template :name myname/myapp
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
/Users/sean/clojure/fresh/deps.edn (No such file or directory)
Full report at:
/var/folders/p1/30gnjddx6p193frh670pl8nh0000gn/T/clojure-10389015204938500302.edn
# updating to new release:
(! 532)-> clojure -Ttools install com.github.seancorfield/clj-new '{:git/tag "v1.1.321"}' :as new
Checking out: at 87bb8452d4e47386ea0afb5e7b0ccb4344f19cdc
Installed new
(! 533)-> clojure -Tnew create :template dv.fulcro-template :name myname/myapp
Generating fresh 'clj new' dv.fulcro-template project.
(I really need to figure out a solid way to write a test suite for clj-new
!)
You could create a simple gh-action that get your current commit, compiles and try to generate some templates (and even a remote template) If something goes wrong the clj -X:new command outputs an stderr and fails
Is a full integration test, but could catch something like what happened today 😁
if you want I can do this via PR
I know how to set up Actions and CI etc.
The tricky part is writing the actual tests 🙂
See what I did for depstar
: I'd want to do something similar for clj-new
so that I can verify the generated projects are actually correct.
(I think clj-new
is my only project without CI setup right now)
I've made a quick and dirty one https://github.com/rafaeldelboni/clj-new/blob/develop/.github/workflows/tests.yml Do you think if something would help until you write the unit tests?
Oh actually this bug wouldn't happen because the deps.edn should exists haha
Like I said: the tricky part is the actual tests, not the CI workflow stuff 🙂
Did you look at the depstar
test setup and the test suite there?
Yeah, I was just thinking about some basic checks, but you right :)