deps-new

2023-12-03T16:13:38.775029Z

is there a way to use deps-new as a library, not as a cli tool ? My use case ist to re-use the logic which "copies" root folder to target and does substitutions including use of template-fn from my own code. I do not want to create a full new clojure project but to "add" folders to an existing directory and re-use the template-fn logic.

2023-12-03T16:15:53.198529Z

I tried to call the org.corfield.new/create fn and it does work, but it makes the assumption that root dir and template.edn are on classpath, correct ?

2023-12-03T16:16:44.918449Z

This would not be the case in my scenario, they would exist at "local dir/file"

2023-12-03T16:17:43.154999Z

the find-root fn makes this assumption, at least.

2023-12-03T16:20:03.614379Z

I suspect that the code after line: https://github.com/seancorfield/deps-new/blob/b95abea24cd35e2d677b73a0fbfc01b5c67f9ffe/src/org/corfield/new.clj#L53 would not assume anymore that things are on classpath, so would be re-suable potenialy

seancorfield 2023-12-03T17:45:49.737539Z

Can you create an issue with your analysis and I'll take a look? I know some folks are using it as a library but I think they're just relying on the classpath... Being able to specify a different root, or multiple additional roots, would probably be a good enhancement.

seancorfield 2023-12-03T18:45:03.437899Z

If create took an option that specified additional directories to search, it could pass that to find-root as additions to the classpath roots... would that work for you?

seancorfield 2023-12-03T18:45:46.139859Z

:src-dirs [] would seem like a reasonable option to add I think @carsten.behring?

seancorfield 2023-12-03T18:50:47.588499Z

(I created an issue -- see the main channel... feel free to add thoughts to it)

seancorfield 2023-12-03T20:32:09.828989Z

OK, :src-dirs is available on develop if you want to try that out with the latest commits.

2023-12-03T18:47:21.405549Z

2023-12-03T20:30:34.181949Z