Skip to content

Commit 686c653

Browse files
albinkcclaude
andauthored
fix: reenable compile task before running queued tasks (#367)
* fix: reenable compile task before running queued tasks When igniter writes newly generated source files to disk and then runs queued tasks (like `ash.codegen`), those tasks call `Mix.Task.run("compile")` which is a no-op because compile already ran earlier in the igniter pipeline — before the new files existed. This causes `Code.ensure_compiled/1` to fail with `:nofile` for any modules that were generated during the install process. Fix by re-enabling compile, app.config, and loadpaths before each queued task so that downstream tasks can trigger a fresh compilation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Clean up comments in run_next function Removed comments explaining the re-enabling of compile tasks. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 42779cf commit 686c653

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/igniter.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2132,6 +2132,7 @@ defmodule Igniter do
21322132

21332133
defp run_next([{task_name, args} | rest]) do
21342134
Mix.Task.reenable(task_name)
2135+
Enum.each(["compile", "app.config", "loadpaths"], &Mix.Task.reenable/1)
21352136
Mix.Task.run(task_name, args)
21362137
run_next(rest)
21372138
rescue

0 commit comments

Comments
 (0)