Fork me on GitHub
#tools-deps
<
2022-05-15
>
janezj21:05:56

Are there plans to extend tools-deps to support modules? I would really like to build library of modules (like kit-clj) with reusable code that I can include in my inhouse applications. But include only some modules not all, because I want small app jars. Polylith is not a solution because I would like mylib to be someday public and is not suitable for libs. But I want one big lib of prebuild services, to be sure that all parts are working together, and app,deps is easily maintainable. I know exoscale/deps-modules but is not perfect fit. In fact mylib will be small in LOC just planty of very small modules with glue code, but complete dependency tree would be huge.

:deps {cblus/services {:git/sha "..." :git/url ".." 
  :modules [:config :rabbits :fulcro :pg :pathom3 :web]}
:aliases ; here is a problem, because I would like to import some aliases from above repo

Alex Miller (Clojure team)22:05:56

In short, no I do not expect to make a concrete notion of modules in tools.deps /deps.edn

Alex Miller (Clojure team)22:05:50

In long, I think there are a variety of possible enhancements I am considering, some of which may help you

Alex Miller (Clojure team)22:05:18

Specifying an alias in a dep is one

👍 1
Ben Sless17:05:09

I have something sketched out, remind me here to upload to github in an hour or two in case I forget

mpenet17:05:53

We have another lib that adds common project tasks (and includes deps-modules), it also includes a fancy task runner that can understand multi modules repo (or not). I suppose that might get open sourced eventually

mpenet17:05:54

But that's strictly for us to have "one way to do it" across the org. All this stuff is easy with tools.deps&build

Ben Sless17:05:19

Here @UQ5QFFX54 It's mostly an experiment, but it works https://github.com/bsless/build.modulo

janezj13:05:03

@UK0810AQ2 I understand each module is referenced as separate dependency with all gitrepo coordinates. Alex mentioned new alias features that should reduce coordinate duplications. I am constantly commenting in and out, so i would like to avoid multiple references of the same repo {cblus/cblus {:git/url "<https://c>....cblus.git" :sha "66a3cb06a6ec7096f0ac2a3337971d"} #_{:local/root "../../gdm/cblues" I just don't understand what is the output of spit-project (you are referencing ::project :project).

Ben Sless06:05:41

@UQ5QFFX54 relative coordinates for modules should "just work" because they live in the same directory so if you depend on one directly it should be able to find others transitively. Spit project exists to pin dependencies for git deps, not for transitive does but external