Skip to content

Commit 9cf8454

Browse files
committed
Add known limitations to docs
1 parent 3620b84 commit 9cf8454

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

lib/elixir/lib/code.ex

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,8 +1746,15 @@ defmodule Code do
17461746
* `:module_definition` (since v1.20.0) - stores if the module definition should
17471747
be `:compiled` (the default) or `:interpreted`. Note this does not affect the
17481748
`.beam` file written to disk, only how the contents inside `defmodule` are
1749-
executed. Setting it to `:interpreted` may offer better compilation times for
1750-
large projects.
1749+
executed. Using the `:interpreted` mode may offer better compilation times for
1750+
large projects, however, it comes with some downsides:
1751+
1752+
* Errors during compilation may have less precise stacktraces
1753+
1754+
* Anonymous functions within `defmodule` can have only up to 20 arguments.
1755+
If this is an issue, you can use maps or tuples to group the data.
1756+
Note the functions themselves inside `defmodule`, such as the ones defined
1757+
inside `def` and friends, can still have up to 255 arguments
17511758
17521759
* `:no_warn_undefined` (since v1.10.0) - list of modules and `{Mod, fun, arity}`
17531760
tuples that will not emit warnings that the module or function does not exist

0 commit comments

Comments
 (0)