tools-build

jumar 2023-08-09T12:18:04.973479Z

Using the compile-clj function provided by tools-build, is it possible to only compile a subset of namespaces, not the whole of :src-dirs? We have something like this in our leiningen project and I'm trying to migrate that

:aot [#"^myapp\.database\.migrations\..*"]
So only want to compile namespaces in that specific package, nothing else. Of course, those namespaces depend on bunch of other nses from elsewhere in the app.

✅ 1
jumar 2023-08-09T12:38:03.743979Z

I found filter-nses which does the trick. https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-compile-clj

:filter-nses - coll of symbols representing a namespace prefix to include