Skip to content

Commit 3f0608b

Browse files
author
José Valim
committed
Raise readable error for mismatched sources, closes #9218
1 parent 9797a46 commit 3f0608b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/mix/lib/mix/compilers/elixir.ex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,12 @@ defmodule Mix.Compilers.Elixir do
264264
nil -> {[file], false}
265265
end
266266

267-
{source, sources} = List.keytake(sources, file, source(:source))
267+
{source, sources} =
268+
List.keytake(sources, file, source(:source)) ||
269+
Mix.raise(
270+
"Could not find source for #{inspect(file)}. Make sure the :elixirc_paths configuration " <>
271+
"is a list of relative paths to the current project or absolute paths to external directories"
272+
)
268273

269274
source =
270275
source(

0 commit comments

Comments
 (0)