integrant

theeternalpulse 2019-07-14T21:31:56.026800Z

is there a way in aero to have a key completely removed from the final map. Let's say I have a key that's solely used from importing, and referenced by other areas of the config, but since integrant only allows keys that have an init, I want it to not be there in the final output. I figured I can just disassoc it from the map before doing integrant, but figured there may be an easier way to just ignore it altogether.

2019-07-14T22:02:18.038300Z

@theeternalpulse If I understand you correctly, you declare in your config map some kind of intermediary/helper component (that you use in some other components as a dependency) and you don’t want to have it in the final system map built by integrant. If that is correct I don’t think there is a solution out of the box. As you noticed you can dissoc it, but I think ignoring it is probably the best option. Integrant is not designed to keep only the major components of your system. It is designed to contain all the elements (even the smallest) that are relevant for initialising your system. In #duct, the extension of the Integrant concept, you can notice that Duct contains special key type for const values, so in the design, Duct encourages to keep even such a single values in the final system map. I mean the idea of removing it, it is quite interesting, although personally, I don’t see a lot of value in it. I like to have all the intermediary elements so I can see what data had been used to initiate all of my components. If I cut them off, it is not easy or it is even impossible to check from REPL what data had been used to initialise the components. I hope that helps 🙂

theeternalpulse 2019-07-14T22:30:46.040300Z

I guess dissoc'ing only at the final use is the best, allows debugging of the entire config at some point easier

theeternalpulse 2019-07-14T22:32:08.040800Z

I only have an "ignored" key because aero has functionality to do something like

:app-config #include #join [#or [#env HOME
                                  #env CONFIG-DIR] "/.parrot.config.edn"]

theeternalpulse 2019-07-14T22:32:31.041400Z

and ref it in the config at load-time

theeternalpulse 2019-07-14T22:32:42.041600Z

the aero ref not integrant

theeternalpulse 2019-07-14T22:33:08.042Z

I guess I can just make a dummy init that returns that same config

theeternalpulse 2019-07-14T22:33:32.042500Z

but dissoc is just be the most straightforward