integrant-repl icon indicating copy to clipboard operation
integrant-repl copied to clipboard

Update integrant-repl to latest integrant version

Open agorgl opened this issue 1 year ago • 6 comments

Integrant is now on version 0.10.0, but this library still uses 0.8.1.

Also the from 0.9.0 onwards the usage of prep/prep-key is deprecated: https://github.com/weavejester/integrant/blob/master/CHANGELOG.md#090-2024-04-29 and this library uses them with set-prep! at its core

agorgl avatar Aug 29 '24 20:08 agorgl

Thanks for the reminder. I've been working on some design issues with Integrant that I wanted to resolve before updating this library. It's been taking longer than I expected, unfortunately, but I think I'm nearly there.

weavejester avatar Aug 29 '24 21:08 weavejester

I suppose the work that needs to be done to comply with the new integrant api is to rename all the prep references to expand and all the prepper to expander?

agorgl avatar Aug 30 '24 08:08 agorgl

Well, you can use set-prep! and change it from ig/prep to ig/expand. I'm going to be slightly changing the way expand works in future, however, which is why I've been holding off on updating this library. I just haven't worked out exactly how, yet.

weavejester avatar Aug 30 '24 08:08 weavejester

I suppose if I'm not using any of the prep or expand stages (just the init/halt), returning the system-map/configuration from the function passed to set-prep! should be enough?

agorgl avatar Aug 30 '24 08:08 agorgl

If you're not using integrant.core/prep or integrant.core/expand, you don't need to use integrant.repl/prep at all.

weavejester avatar Aug 30 '24 08:08 weavejester

Yes, but this https://github.com/weavejester/integrant-repl/blob/13a771900b4c40e5f7f56863f1115b9007557364/src/integrant/repl.clj#L17 kinda forces you to set a 'prepper'. I guess its all about semantics, maybe some word that would indicate that the library needs an 'init-ready' input should be used :).

Also why not internalize the use of prep/expand, and just require from the user to set the system configuration? A set-conf! api would make more sense

agorgl avatar Aug 30 '24 08:08 agorgl

0.4.0 has been released with updated dependencies.

weavejester avatar Nov 01 '24 21:11 weavejester