Fork me on GitHub
Shayden Martin23:10:43

Can someone help me understand the reason behind the recommendation not to mix keywords and maps in a single composite profile?

Shayden Martin23:10:47

In particular, I want to make a small addition to an existing profile where in I add a single entry to :source-paths. In my scenario, this seems preferable:

{:profile-1 { ... }
 :profile-2 [:profile-1
             {:source-paths ["extra/path"]}]}
over this:
{:profile-1 { ... }
 :profile-3 {:source-paths ["extra/path"]}
 :profile-2 [:profile-1 :profile-3]}


Might be they don't merge properly/behave as you'd expect. Not sure though. Also, recommendation isn't a hard no 🙂 It's more like "you have been warned"

Shayden Martin22:10:23

Thanks for the response. My fear is that they won’t merge properly. Without understanding the rationale behind the recommendation, it may as well be a hard no unfortunately because I don’t know what risks I’m assuming by ignoring it.


you can use the lein-pprint plugin to see the effective merged config for a given profile


my suspicion is that it doesn't deep merge the profiles, and just overwrites the top level keys if provided