Fork me on GitHub

I'm revisiting this project after a year of last looking at it (29th March, if I recall 馃檪 )


I'm about to start on a new project and I was going to see if I could use polylith and see how it works out for me. One thing I want to retouch again and is important, is the use of a "dependency" library (the one I prefer is juxt Clip). In that, I can "wire" together various things (like database connections, redis connections, and configuration for jetty/ring and so on and so forth). I was wondering then, would the idea be to have the -main that initialises juxt clip in a component? Does anyone have any prior insight/experience of using clip (or mount, or integrant) with Polylith and an approach I could learn from?


Hi @U11EL3P9U! I haven鈥檛 heard Clip before so I can鈥檛 comment on that. I know some people uses Stuart Sierra鈥檚 Component with Polylith. We use mount in our project at work. We have states in several components that fetch configuration from AWS Systems manager when they get initialised, so we do not have config files around. Mount states depend on each other by just requiring a state from another namespace, which goes well with Polylith鈥檚 idea in my opinion. However, I haven鈥檛 actually used other options like Integrant or Component in a real project to say mount is better or worse. You can have a look at and also check out @U04V70XH6鈥檚 to see how you could use Component in a project.

馃憦 1

Thank you. I'm currently experimenting with integrating Juxt Clip in a fresh example project to see how it might work. Let's see what happens!

馃憤 1

I suppose (not related to clip per se), but a -main being a public API should go into base?


Exactly, external/public API鈥檚 should go into bases


I think I have the info I need 馃檪


I think Component users initialise their state in the bases as well.


Well, got it to work with Juxt Clip


pretty straight-forward


If you have a public repo, it would be nice to share with the rest of the world! 馃挭


I could do 馃檪 I want to redo it, and tidy things up.


Going to ask a question in the main channel...


So, got a little example running that uses juxt cilp to inject certain things (like db connection etc). I've noticed, and this most likely already answered, there is duplication in the deps.edn. So, in my dev alias in the workspace, I had to relist all the reitit dependencies that are also listed in the bases/rest-api/deps.edn file. This seems also to be the case (which I used as a basis for reference) in (thanks @furkan3ayraktar). Is this just a given of how this all works?


Duplication of dependencies only necessary in case you are using Cursive IDE ( It鈥檚 also mentioned in the documentation.


Interesting. I don't use that (I use vim + conjure). Will read and digest.


Ah right, so in my workspace deps.edn, I can reference, for example, {:extra-deps {bases/rest-api {local/root "bases/rest-api"}}}}


and it will pull in those deps


Hey folks, is there any nicer way of getting a projects classpath (from the command line) than cd-ing to its subfolder and using the clojure cli?


Hi! There is no command for that in the poly CLI at the moment. What is your use case for this? If we can justify it, we can add a new command for this. It wouldn鈥檛 be too hard to include it in the CLI tool since we have the code for calculating the classpath for the tests already in the workspace.


the main input to that is a classpath


I figured it wouldn't be too far from what's already available


Should I open a github issue?


Also, while I'm here asking questions, how difficult you think it would be to add a command to poly CLI that returns the commits that affect a project? We're trying to figure out how we could keep for our projects once they are migrated


Yeah, you can open a Github issue.


For the latter, I鈥檓 not sure but @U1G0HH87L could answer that better. If we have it somewhere in the code, maybe we can include it in the workspace map, so that you can extract from there. I think, a separate command for this could be to much for poly tool, however, that鈥檚 just my opinion. Also, @U1G0HH87L is playing with letting users of poly CLI to add their own commands to the tool. Once that happens, this could be something you can add easily, as long as it鈥檚 in the workspace map.


While waiting for custom commands to be implemented, you can create an alias in your workspace and include the the polylith repo, see how :extra-deps is included + your own code that uses the poly code to read the workspace. The workspace contains which bricks a project contains, e.g. projects:poly:component-names:src. Based on that information and the bricks, you should be able to implement this yourself (with support from me, if needed) @U08BJGV6E.


Thank you both!