integrant

teodorlu 2020-06-22T11:14:33.072500Z

Do you prefer to hand-craft your integrant setup for new projects, or do you use a template? I'm looking for a simple, reasonable setup that uses integrant.repl and differentiates between configuration in dev and prod.

2020-06-26T08:28:53.074200Z

I’d recommend also including test as a profile (normally ontop of dev) too

teodorlu 2020-06-26T11:31:48.076300Z

And use it for unit tests? I often just "mix the dev ad test profile", because I want to run tests from the REPL. But I guess unit tests don't need dependencies like integrant.repl.

2020-06-26T11:33:38.076600Z

I mix the profiles too; but it’s nice to be able to run a dev system and a test system simultaneously; sometimes with different subsets of data etc

2020-06-26T11:34:17.076800Z

my apps repl usually has a dev system running, and various test ones (when the tests run)

2020-06-26T11:34:55.077Z

I actually have a large set of profiles that include :dev :dev-only :test

2020-06-26T11:35:56.077200Z

:dev-only is excluded from test, but included in :dev and allows for spot checking and performance testing with larger sets of data; that you don’t want your tests to have to load etc…

2020-06-26T11:36:32.077400Z

The test profile typically contains small targeted sets of test data; and various tweaks (ports etc)

2020-06-26T11:40:40.077600Z

Sorry we’re also mixing terms here too… There are profiles in terms of lein profiles or tools.deps aliases. Essentially what you get on the classpath. And there are profiles in terms of integrant systems; i.e. what keys you initialise etc. I’m talking about both; not just whats on the classpath.

teodorlu 2020-06-22T11:22:12.072600Z

I really like the way Duct works, but I'm looking for something more lightweight.

kwrooijen 2020-06-22T11:29:36.072900Z

Duct is pretty lightweight if you remove all the modules imho

kwrooijen 2020-06-22T11:30:10.073100Z

You could just exclusively use the Duct profiles for dev / prod. And then write your own keys

kwrooijen 2020-06-22T11:30:49.073300Z

But then again, if it's only dev / prod you need, might as well merge it in yourself

teodorlu 2020-06-22T11:44:46.073500Z

> Duct is pretty lightweight if you remove all the modules imho Good point. "Duct without modules" should be very similar to a "reasonable Integrant template".

kwrooijen 2020-06-22T11:48:53.073700Z

Yeah, and it has integrant.repl set up. Maybe it's worth a shot

kwrooijen 2020-06-22T11:49:57.073900Z

Duct core also has auto reloading

👍 1