Theodor Fiedler
bc5cf4c4db
Consolidate spelling of life cycle ( #13541 )
2024-05-06 11:56:13 +02:00
Theodor Fiedler
d884cbc3ca
Fix random typos ( #13540 )
2024-05-06 11:55:48 +02:00
Tim Chambers
8d0ecb5268
Correct typo in set-theoretic types doc ( #13538 )
2024-05-05 21:16:09 +02:00
José Valim
10a2f8a095
Add a note about modules and keywords in is_atom/1
2024-05-05 19:42:40 +02:00
José Valim
0043b1e1af
Use dynamic(type) on pretty printing
2024-05-05 15:29:42 +02:00
Brian Cardarella
18ba88c89f
Update mix.ex ( #13536 )
...
Grammar correction
2024-05-05 20:03:05 +09:00
José Valim
0fd44dd5e3
Add docs and changelog around gradual set-theoretic types
2024-05-05 11:17:30 +02:00
José Valim
6b4291645c
Warn on undefined exceptions
2024-05-04 20:41:51 +02:00
José Valim
b1d1ba5e1a
Define a type for __CALLER__
2024-05-04 20:41:51 +02:00
José Valim
5acdb97403
Type check rescued exceptions
2024-05-04 20:41:51 +02:00
Jean Klingler
8e4a0aae0d
Replace semi-column by comma before otherwise ( #13535 )
2024-05-05 01:26:31 +09:00
José Valim
5cbea01734
Remove more hardcoded dynamic conversions
2024-05-04 17:37:23 +02:00
Jean Klingler
27164e33be
Add Kernel.is_non_struct_map/1 guard ( #13534 )
2024-05-04 23:59:12 +09:00
Jean Klingler
17c8bafffc
Link to defexception in Exception doc and mention the behaviour ( #13533 )
2024-05-04 00:42:49 +09:00
Jean Klingler
d5eb65bd70
Document default unit of DateTime.utc_now/1 ( #13532 )
2024-05-04 00:38:34 +09:00
Jean Klingler
66bce03c69
Reimplement and optimize intersection of map types ( #13524 )
...
* Reimplement interesection of map types
* Extract and reuse symmetrical merge & intersection
* Move to the bottom of the file
2024-05-03 16:06:54 +09:00
José Valim
47279b1e45
Optimize atom type check
2024-05-02 14:21:31 +02:00
Andreas Donig
d391b855c2
Mention the Erlang uri_string module in the URI moduledoc ( #13525 )
2024-05-02 14:10:35 +02:00
José Valim
7489ce8572
Perform type checking across comparison operators ( #13527 )
2024-05-02 14:09:41 +02:00
José Valim
68ac7b2d70
Perform dump diffs on non-reproducible binary beams
2024-05-02 13:57:03 +02:00
Łukasz Samson
2a7948a472
Fix warn case return value in pid expansion ( #13526 )
2024-05-02 13:36:42 +02:00
José Valim
5422815fde
Include max cases in ExUnit reports ( #13521 )
...
Some CI environments may report the wrong number
of cores to the Erlang VM. So we choose to print
the number of max cases along side the seed
(both which affect randomness of tests) at the
top of each suite.
2024-05-02 11:09:32 +02:00
José Valim
80a20d20bb
More improvements to module attributes guides
2024-05-02 10:29:20 +02:00
José Valim
a7673c6c7e
Add initial type checking for guards and %expr{} in patterns
2024-05-02 10:05:41 +02:00
José Valim
d2604632cd
Check that docs are not hidden in suite, closes #13516
2024-05-02 01:26:43 +02:00
José Valim
00818b6045
More clarifications to module attributes as constants
2024-05-02 01:17:16 +02:00
José Valim
426fe7dd67
Remove type hint added after rebase
2024-05-01 11:36:15 +02:00
José Valim
b378a2d560
Ensure translators are persisted across logger restarts
2024-05-01 11:35:01 +02:00
José Valim
ce922c2d8f
Improve typing error messages
2024-05-01 09:04:03 +02:00
Jean Klingler
e557b10c4f
Remove dot hint when the issue is a missing key in a map ( #13519 )
2024-04-30 22:19:45 +02:00
José Valim
017481da6f
Properly infer open and closed maps
2024-04-30 18:49:17 +02:00
José Valim
d8906c3ddc
Track simple variable assignment in type system
2024-04-30 15:59:58 +02:00
José Valim
80621b6416
Remove cyclic dependencies in typed modules
2024-04-30 14:32:53 +02:00
José Valim
514355f3d9
Type inference for structs and type checking for dot/remote ( #13518 )
...
We now warn:
* `expr.field` when `expr` may not be a map
* `expr.call()` when `expr` may not be an atom
* `expr.call(...)` when `expr` may not be an atom
* `&expr.foo/1` when `expr` may not be an atom
Furthermore, we lay down the ground work for checking undefined
and deprecation warnings across unions. For example, if you write
this code:
mod = if something?, do: Foo, else: Bar
mod.some_function()
In the future, it will warn if any of Foo OR Bar do not define the relevant function.
Finally, we improve pretty printing of maps and aliases in types.
2024-04-30 14:15:32 +02:00
José Valim
a1743d49ff
Return if the key is optional on map_get
2024-04-29 18:29:41 +02:00
José Valim
e6254668e3
Use explicit open_map and closed_map functions
2024-04-29 16:36:40 +02:00
Jean Klingler
34ef9226ef
Use deterministic key order when quoting maps ( #13517 )
2024-04-29 22:45:25 +09:00
José Valim
1ea2dfa05c
Fix unmatched branch in map emptiness check
2024-04-29 15:43:56 +02:00
José Valim
30db5d91fb
More consistent naming in descr
2024-04-29 14:21:29 +02:00
Guillaume Duboc
5911a98c3c
Map types representation ( #13512 )
2024-04-29 13:37:38 +02:00
Matt O'Neill
b8760a1e35
Add some signposting to the String docs for pattern matching ( #13514 )
2024-04-28 09:36:27 +02:00
José Valim
813c5aaba2
Update docs for module attributes
...
It is not necessary to push module attributes as a mechanism
for constants. In fact, regular functions are a better default
for constants in the majority of the cases.
2024-04-27 21:52:09 +02:00
David JULIEN
c5816a227f
Add :all and :none for Logger.level/0 ( #13513 )
...
According to https://www.erlang.org/doc/man/logger#get_primary_config-0 and https://www.erlang.org/doc/man/logger#type-primary_config ,
returned type for `:logger.get_primary_config` is:
```erlang
#{level => level() | all | none,
metadata => metadata(),
filter_default => log | stop,
filters => [{filter_id(), filter()}]}
```
Thus, inside `Logger.level/0` fun, `level` could also be `all` and `none` when calling:
```elixir
%{level: level} = :logger.get_primary_config()
```
2024-04-26 12:29:52 +02:00
Jean Klingler
cb9c303bc0
Add GenServer.format_status/1 callback ( #13511 )
2024-04-25 00:08:22 +09:00
Julian Doherty
0b7d634406
Allow custom override of system defined CA certificates ( #13504 )
...
Via the HEX_CACERTS_PATH environment variable.
2024-04-24 09:39:03 +02:00
José Valim
a019425f74
Revert "Use undefined node names for rpc/remote nodes ( #13509 )"
...
This requires a properly configured hostname,
which is not always available.
2024-04-23 17:19:50 +02:00
José Valim
d96855d150
Document epmdless deployment
2024-04-23 15:35:51 +02:00
José Valim
0cb9460388
Use undefined node names for rpc/remote nodes ( #13509 )
2024-04-23 15:18:20 +02:00
José Valim
68a9894d97
Add since annotations to new mix test flags
2024-04-23 13:04:51 +02:00
José Valim
67c3ad5196
Add brackets around keyword lists when formatting with when, closes #13503
2024-04-23 09:34:03 +02:00