Closed type1fool closed 3 weeks ago
In addition to resolving the bug, it may be useful to add an option to Config.configure/6 to force a new config block for the given app_name and config_path.
This would be interesting, but there is some complexity there, like how to make sure that subsequent calls to config will actually use that block. We want to try to honor whatever existing configuration patterns the user has in their config files, so I hesitate to set up the pattern that every generator always ends up appending to config even if the user has already configured some aspect of the library/app...not sure, needs more thought.
With the main
branch Igniter, I am seeing correctly formatted atoms. 🎉 The indentation is still a bit unusual, but that's no big deal. Thank you!
Yeah, I think we can encode some "preference" there with some sourceror metadata? Its not super easy to manage that formatting though.
Describe the bug Config modifications result in string-atoms as keys when
config_path
is a module name. This appears to only be the case when Igniter modifies existing code, and not when a new config block is inserted.To Reproduce
Expected behavior
Actual behavior
The following
:yolo
config was modified - only:ecto_repos
&:generators
existed before running the Igniter task.This config was added by the Igniter task, and this key did not exist previously.
** Runtime
Additional context
In addition to resolving the bug, it may be useful to add an option to
Config.configure/6
to force a newconfig
block for the givenapp_name
andconfig_path
.