Skip to content

Commit 6c55707

Browse files
committed
quick fix for hot code reload error
Co-authored-by: @mayel
1 parent 0519ab0 commit 6c55707

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/mix/tasks/compile/surface.ex

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,14 @@ defmodule Mix.Tasks.Compile.Surface do
201201
end
202202
end
203203

204+
if Version.match?(System.version(), ">= 1.14.0") do
205+
defp print_diagnostic(message, :warning, file, {line, col}) do
206+
IO.warn(message, file: file, line: line, column: col)
207+
end
208+
end
209+
210+
# TODO: Remove this clause in Surface v0.13 and set required elixir to >= v1.14
204211
defp print_diagnostic(message, :warning, file, line) do
205-
# Use IO.warn(message, file: ..., line: ...) on Elixir v1.14+
206212
rel_file = file |> Path.relative_to_cwd() |> to_charlist()
207213
IO.warn(message, [{nil, :__FILE__, 1, [file: rel_file, line: line]}])
208214
end

0 commit comments

Comments
 (0)