eginez / calvin

A minimalistic build tool for clojurescript projects that does not require the jvm
186 stars 9 forks source link

`calvin deps` prints * chars forever on fail #11

Closed hlolli closed 7 years ago

hlolli commented 7 years ago

This works

(defproject example "1.0.0"
  :dependencies [[andare "0.5.0"]
                 [macchiato/fs "0.0.6"]]
  )

this doesn't

(defproject example "1.0.0"
  :dependencies [[andare "0.5.0"]
                 [macchiato/fs "0.0.6"]
                 [IDontExists "6.6.6"]]
  )

and will print **** forever into the stdout.

ps. how do I differentiate npm devDependencies and npm dependencies in the project.clj file, how does one go around at all using npm dependencies without needing extra package.json file alongside project.clj?

eginez commented 7 years ago

Hey @hlolli yes that is a real bug, happy to get PR if you have some time 😄 . It should get fixed as soon as I get to it. Those are all good questions, I have a few ideas around the issue, namely I'd like the tool to make it transparent(somehow) to the developer where the dependecies are coming from. I also know some other people in the community have other ideas on it. Join us at the the clojurians slack in the #lumo channel we usually talk about these kind of things there

arichiardi commented 7 years ago

About the dependencies, maybe calvin should have its own calvin.edn for those?

arichiardi commented 7 years ago

It seems like the graph that it is generated for that dependency is a bit off:

  ...
  {:group "org.clojure", :artifact "data.json", :version "0.2.6"} (),
  {:group "org.hamcrest", :artifact "hamcrest-core", :version "1.1"}
  ()}
 {:group "IDontExists",
  :artifact "IDontExists",
  :version "6.6.6",
  :exclusions ()}
 {:group "IDontExists",
  :artifact "IDontExists", 
  :version "6.6.6", 
  :exclusions ()})

Note that the second item is usually a map of maps, but here it is just a map. This comes from huckleberry and I don't even know if it should be there, because it is not actually resolved I guess.

arichiardi commented 7 years ago

Ok digging a little bit more I see that status is false for deps that cannot be resolved in their entirety. Probably huckleberry should return a flag per top-level dependency which signals what was not resolved correctly. In any case, probably this bug could be (temporarily) solved by not printing if status is false)