Skip to content

Commit dd1d0a9

Browse files
albinkcclaude
andcommitted
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>
1 parent 42779cf commit dd1d0a9

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

lib/igniter.ex

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2132,6 +2132,14 @@ defmodule Igniter do
21322132

21332133
defp run_next([{task_name, args} | rest]) do
21342134
Mix.Task.reenable(task_name)
2135+
2136+
# Re-enable compile and related tasks so that queued tasks which
2137+
# invoke `Mix.Task.run("compile")` (e.g. `ash.codegen`) actually
2138+
# trigger a fresh compilation of newly written source files.
2139+
# Without this, compile is a no-op because it already ran earlier
2140+
# in the igniter pipeline before the new files were written to disk.
2141+
Enum.each(["compile", "app.config", "loadpaths"], &Mix.Task.reenable/1)
2142+
21352143
Mix.Task.run(task_name, args)
21362144
run_next(rest)
21372145
rescue

0 commit comments

Comments
 (0)