tools-build 2022-02-18

Why doesn't b/compile-cljdeduce :src-dirs from the basis? 🤔

could b/javac be handled in the same way as b/compile-clj?

Alex Miller (Clojure team) 2022-02-21T21:13:57.735299Z

Generally Java source isn't on the classpath and thus isn't on :paths, so no

✅ 1
Alex Miller (Clojure team) 2022-02-18T14:27:26.985739Z

seems like it could

Alex Miller (Clojure team) 2022-02-18T14:29:09.144889Z

there might be some reasons not to do it (classes dir with copied resources in :paths) but could be a reasonable default

Thanks, that was a quick fix! The intent extends to other features requiring :src-dirs like b/write-pom . What do you think?

Alex Miller (Clojure team) 2022-02-19T18:47:22.165529Z

that one is a bit trickier as it separates srcs from resources, which are often lumped together in :paths

Prompted by a question from @jr0cket I have updated the build-clj README with examples of running basic tools.build tasks directly from the CLI, without needing a build.clj file: https://github.com/seancorfield/build-clj#standalone-cli-usage (so build-clj can be used in an alias across any projects, even if they haven't migrated to a separate build.clj file yet).

👍 2
Alex Miller (Clojure team) 2022-02-18T19:12:02.874649Z

you could add an alias for the long ns name in your deps.edn alias: :ns-aliases {do org.corfield.build} and then the commands would be like

clojure -T:build do/run-tests

👍 1
👍🏻 1

Yeah, I'll leave that up to John when (if) he updates :project/jar and :project/uberjar to no longer use depstar 🙂

Updates to those aliases coming soon, I promise. Thanks for these examples, it make it much clearer.

👍🏻 1