cljs-dev

weavejester 2026-05-01T13:00:10.338949Z

Does anyone know how I'd use the ClojureScript build API to produce an ordered set of output filepaths, i.e. the set of sources that would be fed into the deps-file cljs_deps.js. It looks like I use add-dependency-sources combined with add-js-sources and add-goog-base , judging from the code in cljs.closure/build, but I can't seem to get the same output. It's possible that I need to compile the sources again in order to calculate the dependencies? I guess I could always trigger a build, then parse cljs_deps.js but that seems ugly considering that in theory I have all the information needed to produce the results directly. It would be very nice if the compiler environment retained dependency information, but the data in the environment seems incomplete - i.e. it retains some dependencies but not all.

weavejester 2026-05-01T13:12:53.995559Z

Maybe it is simpler just to build, then parse goog/deps.js and cljs_deps.js. That looks like it would get me all the build files in load order.

weavejester 2026-05-06T17:36:23.723429Z

Parsing the dep files works, particular for the simple case where I'm just handling the :output-to. But for modules and multiple outputs, I'll need to do some more complex parsing, and that's sent me back to trying to figure out how to get the inputs directly. Does anyone have any idea how to get the dependency tree of files in a ClojureScript build? It seems like information that should be readily available, but there's no documented way of retrieving it.