Fork me on GitHub
#tools-build
<
2022-02-18
>
Adam Helins12:02:28

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

Alex Miller (Clojure team)14:02:09

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

Adam Helins08:02:38

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)18:02:22

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

Darin Douglass20:02:03

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

Alex Miller (Clojure team)21:02:57

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

1
seancorfield18:02:26

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)19:02:02

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
seancorfield19:02:35

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

practicalli-johnny00:02:14

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

1