Candidates found by cross-checking @specs against the type signatures
inferred by the compiler (see #15559): these specs declared strictly
wider return types than the functions can produce, where the gap
carries no intentional API room (deliberately abstract contracts, such
as atom() covering future values, are left untouched):
* File.Stream.t/0: type the struct fields (mirrors IO.Stream.t/0)
* Map.new/0: %{} instead of map()
* Logger.levels/0: Exclude deprecated :warn
* Macro.Env.location/1 and Macro.Env.stacktrace/1: precise shapes
* Remove compatibility code for OTP26-
* Remove support for application/erlang+html docs v1
* Remove workaround for bug in older OTP versions
* Update OTP version checks
* Remove OTP25- skipping in tests
* More test cleanup
Previously, when the configuration directive `always_evaluate_messages`
was set to true an exception was raised when a function that returns a
tuple was given to Logger:
```
Logger.info(fn -> {"", []} end)
```
Would result in:
```
** (Protocol.UndefinedError) protocol String.Chars not implemented for Tuple
Got value:
{"", []}
```
The filtering documentation implied that the msg attribute of the
logger event map could be a binary, but according to the erlang types
(https://www.erlang.org/doc/apps/kernel/logger.html#t:log_event/0) it
can't be a binary.
This change updates the docs with an example that comports with the
actual typing.
Prompt
======
There is a format/2 function in inspect/algebra.ex that
calls format/3 recursively that returns a list of binaries.
Instead of doing so, I want you to pass a binary as accumulator,
<<>>, and then instead of `[head | format(...)]`, on every
operation you will do `format(<<acc::binary, result::binary>>, ...)`.
Notes
=====
The assistant was able to detect an issue with `collapse/4`
but it was unable to fix it. That and the changes to
mix/tasks/format.ex were addressed manually.
The previous docs didn't mention that logger may drop messages
entirely. This should give a fair overview of the built-in overload
protections, similar to erlang/otp#8855.
---
Co-authored-by: Andrea Leopardi <an.leopardi@gmail.com>