integrant

Mark Wardle 2025-10-03T13:09:54.010169Z

Hi all. I have been reading about the new changes to integrant (thanks @weavejester!) - and it occurs to me that with the ability to 'deprofile', and the ability to pass in vars, I could almost get away with dropping my use of aero and just read my system configuration file as edn, and my secrets file as edn, and then just use integrant? Has anyone else done this? My integrant configuration is currently in an edn file with a mix of aero reader tags (#include, #end, #profile and #ref), and integrant tags (#ig/ref), and my own custom tags (e.g #clj/var). It looks as if integrant's profiling can cope with a priority list (e.g. [:test :dev] will use :test if it exists or fallback to :dev) whereas aero has a profile or a default.

Mark Wardle 2025-10-03T13:10:38.601759Z

If it's of any interest or value to anyone, my current integrant configuration is https://github.com/wardle/pc4/blob/main/components/config/resources/config/config.edn

weavejester 2025-10-03T16:12:30.847649Z

It's interesting that there's a lot of overlap between your configuration setup and the duct/main project, which is essentially a tool for running Integrant configurations. The only incompatibility that I can see is that duct/main doesn't currently have support for including from the classpath. The #duct/include tag works purely off the filesystem. However, I don't think this would be too hard to add... Perhaps appending a resource: psuedo-protocol would do it.

Mark Wardle 2025-10-03T19:58:44.467179Z

Thanks! I must admit I haven't really looked at duct or duct/main - but I now see you are already combining the config with the vars in the way I described. It looks good as those vars could be populated from anywhere or anything. I probably want to keep control of how the system is started, as perhaps unusually I am building multiple products that potentially share different components. Thanks for the pointers.

weavejester 2025-10-03T20:50:25.093219Z

Yeah, I was hesitant to even mention it as Duct isn't designed with Polylith in mind, and I certainly wouldn't recommend it in its current state. However it doesn't feel like it would take much more work to support Polylith in future, and since your project uses both Polylith and Integrant, I'm curious to know more about it. If you don't mind me asking, is it just the configuration and dependencies that govern how the different applications are started? Or is there more to it?

Mark Wardle 2025-10-03T21:18:52.915999Z

At the moment yes that’s right. I haven’t encountered a situation so far that would need anything more but I’m still in the process of migrating an old Apple WebObjects application to this new approach so still working it all out.

Steven Lombardi 2025-10-09T15:05:22.108159Z

I'm interested in this thread. I'm a polylith and aero user as well.