tools-build

roklenarcic 2022-08-30T12:02:38.901529Z

I’ve restarted working on a project that has worked for me before and the first command I’ve ran had this enigmatic message:

roklenarcic@Roks-MacBook-Pro paginator % clj -Tbuild test
Error building classpath. Bad coordinate for library , expected map: nil

roklenarcic 2022-08-30T12:03:05.926759Z

I don’t see anyhing special in deps and it’s been untouched since last release build tons of time ago

roklenarcic 2022-08-30T12:06:22.331969Z

:aliases {:build {:deps {io.github.seancorfield/build-clj
                          {:git/tag "v0.8.0" :git/sha "9bd8b8a"}}
                   :ns-default build}

Alex Miller (Clojure team) 2022-08-30T12:10:03.524939Z

That is a validation error on the structure of your deps.edn, might be in your main :deps, not in the alias

roklenarcic 2022-08-30T12:10:37.666529Z

{:paths ["src"]
 :deps {org.clojure/clojure {:mvn/version "1.10.1"}
        org.clojure/core.async {:mvn/version "1.3.618"}}

 :aliases {:build {:deps {io.github.seancorfield/build-clj
                          {:git/tag "v0.8.3" :git/sha "7ac1f8dee188894cee4199aaf2fbe7c6708a8680"}}
                   :ns-default build}
           :test {:extra-paths ["test"]
                  :extra-deps {org.clojure/test.check {:mvn/version "1.1.1"}
                               io.github.cognitect-labs/test-runner
                               {:git/tag "v0.5.0" :git/sha "48c3c67"}
                               clj-http/clj-http {:mvn/version "3.10.1"}
                               cheshire/cheshire {:mvn/version "5.10.0"}}}}}

Alex Miller (Clojure team) 2022-08-30T12:10:50.069669Z

Could also be in your .clojure/deps.edn

roklenarcic 2022-08-30T12:11:04.823459Z

Because clj -Spath -T:build works

roklenarcic 2022-08-30T12:11:15.747929Z

But clj -Tbuild doesn’t

roklenarcic 2022-08-30T12:12:19.719689Z

Ah, it’s :build not build

roklenarcic 2022-08-30T12:12:25.608529Z

sorry about htat

Alex Miller (Clojure team) 2022-08-30T12:12:27.520739Z

Yeah

Alex Miller (Clojure team) 2022-08-30T12:12:54.658049Z

But that should be a better error, sorry about that

seancorfield 2022-08-30T15:31:47.857289Z

-Tbuild would try to invoke an installed tool called build; -T:build uses the alias :build

Alex Miller (Clojure team) 2022-08-30T15:40:35.410169Z

actually, seems like seems like I did improve this error in 1.10.3.1040 so maybe you're on an older version

Alex Miller (Clojure team) 2022-08-30T15:41:25.233829Z

on current I get Error building classpath. Unknown tool: build

seancorfield 2022-08-30T15:42:05.115919Z

Folks gotta keep their CLIs up-to-date 🙂

seancorfield 2022-08-30T15:42:49.960669Z

1.10.3.1040 was nine months ago...