ash-project / igniter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add `fetch_dependencies_before_continuing/1`

ibarakaiev opened this issue · comments

Is your feature request related to a problem? Please describe.
Not really a problem, but sometimes a step might depend on fetching additional dependencies. Example: mix igniter.install ash_money adds :ash_money to the list of dependencies, then runs its installers, then ash_money sets up the Postgres stuff, but that also depends on :ex_money_sql, which needs to be fetched before proceeding. It would also be better for DX if mix deps.get doesn't need to be separately run once an igniter completes.

Describe the solution you'd like
Something like Igniter.fetch_dependencies_before_continuing/1 would be helpful. It would print out a confirmation message that dependencies are to be installed after changes are applied, run mix deps.get, then proceed to the remaining steps. This might also simplify the logic in Igniter.Util.Install.

Describe the alternatives you've considered
One option is to manually add mix deps.get as Igniter.add_task/3 into the pipeline, but that would deviate from the user experience of the first prompt, i.e. mix igniter.install ... would print a human-friendly message at first, and then just "the following tasks will be run: mix deps.get".