Skip to content

Commit dcf31be

Browse files
authored
Do not use protocols during consolidation to avoid races (#13856)
1 parent 6cd46d7 commit dcf31be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/elixir/lib/protocol.ex

+2-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,8 @@ defmodule Protocol do
498498

499499
defp extract_matching_by_attribute(paths, prefix, callback) do
500500
for path <- paths,
501-
path = to_charlist(path),
501+
# Do not use protocols as they may be consolidating
502+
path = if(is_list(path), do: path, else: String.to_charlist(path)),
502503
file <- list_dir(path),
503504
mod = extract_from_file(path, file, prefix, callback),
504505
do: mod

0 commit comments

Comments
 (0)