Skip to content

Commit 74fab3c

Browse files
committed
Update parallel compiler docs, closes #14821
1 parent f1a6a4e commit 74fab3c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lib/elixir/lib/kernel/parallel_compiler.ex

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,9 @@ defmodule Kernel.ParallelCompiler do
146146
the current file stops being compiled until the dependency is
147147
resolved.
148148
149-
It returns `{:ok, modules, warnings}` or `{:error, errors, warnings}`
150-
by default but we recommend using `return_diagnostics: true` so it returns
151-
diagnostics as maps as well as a map of compilation information.
152-
The map has the shape of:
149+
It must be invoked with `return_diagnostics: true` as option, so it returns
150+
`{:ok, modules, warnings_info}` or `{:error, errors, warnings_info}`,
151+
where `warnings_info` has the shape:
153152
154153
%{
155154
runtime_warnings: [warning],
@@ -209,7 +208,8 @@ defmodule Kernel.ParallelCompiler do
209208
* `:beam_timestamp` - the modification timestamp to give all BEAM files
210209
211210
* `:return_diagnostics` (since v1.15.0) - returns maps with information instead of
212-
a list of warnings and returns diagnostics as maps instead of tuples
211+
a list of warnings and returns diagnostics as maps instead of tuples.
212+
This option must be set to true, except for backwards compatibibility reasons.
213213
214214
* `:max_concurrency` - the maximum number of files to compile in parallel.
215215
Setting this option to 1 will compile files sequentially.
@@ -243,10 +243,9 @@ defmodule Kernel.ParallelCompiler do
243243
Opposite to compile, dependencies are not attempted to be
244244
automatically solved between files.
245245
246-
It returns `{:ok, modules, warnings}` or `{:error, errors, warnings}`
247-
by default but we recommend using `return_diagnostics: true` so it returns
248-
diagnostics as maps as well as a map of compilation information.
249-
The map has the shape of:
246+
It must be invoked with `return_diagnostics: true` as option, so it returns
247+
`{:ok, modules, warnings_info}` or `{:error, errors, warnings_info}`,
248+
where `warnings_info` has the shape:
250249
251250
%{
252251
runtime_warnings: [warning],
@@ -265,8 +264,9 @@ defmodule Kernel.ParallelCompiler do
265264
Setting this option to 1 will compile files sequentially.
266265
Defaults to the number of schedulers online, or at least `2`.
267266
268-
* `:return_diagnostics` - when `true`, returns structured diagnostics
269-
as maps instead of the legacy format. Defaults to `false`.
267+
* `:return_diagnostics` (since v1.15.0) - returns maps with information instead of
268+
a list of warnings and returns diagnostics as maps instead of tuples.
269+
This option must be set to true, except for backwards compatibibility reasons.
270270
271271
"""
272272
@doc since: "1.6.0"

0 commit comments

Comments
 (0)