tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
2020-09-12T02:32:36.204600Z

With cli 673, and 681 clojure -Stree => Option changed, use: clj -X:deps tree clojure -X:deps tree => Unqualified function can't be resolved: tree

seancorfield 2020-09-12T03:15:18.205600Z

@hugod It works fine for me (aside from showing tools.deps.alpha as a dependency and everything it depends on -- which was the problem with -X:deps mvn-pom in the last release).

seancorfield 2020-09-12T03:15:41.206100Z

Do you perhaps have your own :deps alias, shadowing the system installed one?

2020-09-12T10:56:28.217300Z

That was it thanks. Should have thought of that. Might be nice to have a warning if you define your own :deps alias.

seancorfield 2020-09-12T03:16:48.206700Z

(! 993)-> clojure -Sdescribe
{:version "1.10.1.681"
 :config-files ["/usr/local/Cellar/clojure@1.10.1.681/1.10.1.681/deps.edn" "/Users/sean/.clojure/deps.edn" "deps.edn" ]
 :config-user "/Users/sean/.clojure/deps.edn"
 :config-project "deps.edn"
 :install-dir "/usr/local/Cellar/clojure@1.10.1.681/1.10.1.681"
 :config-dir "/Users/sean/.clojure"
 :cache-dir ".cpcache"
 :force false
 :repro false
 :main-aliases ""
 :repl-aliases ""}
(! 994)-> clojure -X:deps tree
org.clojure/clojure 1.10.1
  org.clojure/core.specs.alpha 0.2.44
  org.clojure/spec.alpha 0.2.176
org.clojure/tools.deps.alpha 0.9.795 <---------- none of this should be here!
  javax.inject/javax.inject 1
  com.cognitect.aws/api 0.8.408
    org.clojure/data.json 0.2.7
    commons-codec/commons-codec 1.13
    com.cognitect/http-client 0.1.101
      org.eclipse.jetty/jetty-http 9.4.15.v20190215
        org.eclipse.jetty/jetty-io 9.4.15.v20190215
^ @alexmiller FYI

2020-09-12T03:29:28.207Z

here i get:

$ clj -X:deps tree
Cloning: <https://github.com/clojure/tools.deps.alpha>
Checking out: <https://github.com/clojure/tools.deps.alpha> at e160f184f051f120014244679831a9bccb37c9de
Unqualified function can't be resolved: tree

$ clj -h | grep 681
Version: 1.10.1.681

2020-09-12T03:31:45.207700Z

looks like i've got the following in my ~/.clojure/deps.edn:

:deps
   {
    :extra-deps {org.clojure/tools.deps.alpha
                 {:git/url "<https://github.com/clojure/tools.deps.alpha>"
                  :sha "e160f184f051f120014244679831a9bccb37c9de"}}
   }

2020-09-12T03:33:42.208Z

...and with -Srepro i don't get that message

seancorfield 2020-09-12T03:57:13.208500Z

Yup, bad idea. You should only have that under an alias.

seancorfield 2020-09-12T03:58:42.209100Z

You're essentially breaking the :deps alias in the system installed deps.edn...

seancorfield 2020-09-12T03:58:48.209300Z

@sogaiu ^

dominicm 2020-09-12T05:38:28.210100Z

Maybe the system deps should have a namespace?

seancorfield 2020-09-12T06:05:50.210800Z

Or maybe system aliases should be "reserved" so you can't overwrite them?

2020-09-12T06:18:26.212800Z

@seancorfield yes, thanks. i think it was a left-over from here: https://github.com/seancorfield/dot-clojure/blob/d4aba12ec24834200b70ee0c06a30fb0538bddc0/deps.edn#L167 - my bad for not keeping up-to-date

seancorfield 2020-09-12T06:19:07.213400Z

Yeah, I changed that when I realized that it conflicted with the system one 😞

seancorfield 2020-09-12T06:19:34.213600Z

Now it's this: https://github.com/seancorfield/dot-clojure/blob/develop/deps.edn#L164

seancorfield 2020-09-12T06:20:06.214700Z

(and that's an outdated branch -- the latest versions of add-lib require builds from source because they include Java code)

2020-09-12T06:20:12.214800Z

ah thanks!

seancorfield 2020-09-12T06:21:40.215400Z

I update that file a lot -- so it's a good idea to keep git pulling it regularly 🙂

👍 1
seancorfield 2020-09-12T06:22:00.215900Z

I'm adding -X compatible stuff now as well, for folks on the latest prerelease of the CLI: https://github.com/seancorfield/dot-clojure/blob/develop/deps.edn#L15-L18

seancorfield 2020-09-12T06:22:15.216300Z

Both -M:new and -X:new will work.

seancorfield 2020-09-12T06:23:00.217100Z

clojure -M:new lib myname/myproject or clojure -X:new :name myname/myproject (since :template is defaulted to lib).