Skip to content

Commit 8a876d6

Browse files
committed
Do not assume all files have started to compile, closes #9943
1 parent 831b12a commit 8a876d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/elixir/lib/kernel/parallel_compiler.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,11 @@ defmodule Kernel.ParallelCompiler do
427427

428428
# The goal of this function is to find leaves in the dependency graph,
429429
# i.e. to find code that depends on code that we know is not being defined.
430+
# Note that not all files have been compile yet, so they may not be in waiting.
430431
defp without_definition(waiting, files) do
431432
nillify_empty(
432433
for {pid, _, _, _} <- files,
433-
{_, ^pid, ref, on, _, _} = List.keyfind(waiting, pid, 1),
434+
{_, ^pid, ref, on, _, _} <- List.wrap(List.keyfind(waiting, pid, 1)),
434435
not Enum.any?(waiting, fn {_, _, _, _, defining, _} -> on in defining end),
435436
do: {ref, :not_found}
436437
)

0 commit comments

Comments
 (0)