José Valim
d74dff2bcf
Transform the struct update syntax into a type assertion
...
This transforms the struct update into a type assertion,
requiring the type system to be sure the expression has
precisely the given struct type.
The struct update syntax may still be deprecated in the
future but this will provide a safer migration path and
allow us to engage in more conversations with the community.
2025-06-11 13:39:14 +02:00
José Valim
59a1ad9138
Allow captures to be reconstructed on type system pretty printing
2025-06-11 13:30:51 +02:00
Joe Yates
502207c9f7
Fix use of prefer with '-ing' ( #14568 )
2025-06-10 11:17:13 +02:00
José Valim
c3bc849550
Point out module must be required before macro usage in match/guard
2025-06-10 10:14:56 +02:00
José Valim
f8de42a053
Filter @compile debug_info when explicitly set to true
...
Closes #14567 .
2025-06-10 09:59:05 +02:00
Jean Klingler
84d806603d
More precise error message when escaping a regex with a ref ( #14560 )
...
* More precise error message when escaping a regex with a ref
* Refactor as do_quote_map_value
* Yet another refactoring proposal
2025-06-07 21:56:10 +09:00
José Valim
c39286ef9c
Improve error report and checks on function application ( #14541 )
2025-05-28 15:25:37 +02:00
José Valim
fb19dec15c
Include lines in == Compilation error in file ... == slogans ( #14538 )
...
Closes #14535 .
2025-05-27 10:31:17 +02:00
José Valim
8de98a8a86
Raise nice error message when escaping maps/structs with references, closes #14497
2025-05-20 10:35:17 +02:00
José Valim
1f9433feaa
not_a_map.key should raise BadMapError for consistency
2025-05-20 09:58:15 +02:00
José Valim
f400ac9555
Mention patterns are not allowed in function heads
...
Closes #14496 .
2025-05-20 09:00:33 +02:00
José Valim
64a387da82
Load modules lazily and only if needed ( #14453 )
2025-04-28 12:45:25 +02:00
José Valim
f1ad48181e
Trace on definition callbacks, closes #14427
2025-04-26 08:42:56 +02:00
José Valim
c20222ba0b
Trace on load functions, see #14427
2025-04-26 08:42:56 +02:00
José Valim
247fd711cf
Emit trace events for super calls, closes #14395
2025-04-08 09:45:11 +02:00
José Valim
bb8761a3c7
Properly track imported function calls in tracer
...
Closes #13878 .
2025-04-08 09:25:20 +02:00
José Valim
468228a236
Add :indentation to Code.string_to_quoted/2 ( #14406 )
2025-04-07 16:02:01 +02:00
Jean Klingler
a6a38e130f
Handle non-binary bitstring in struct default values ( #14363 )
2025-03-25 18:07:07 +09:00
José Valim
3e89296916
Preserve backwards compatibility in elixir_erl, closes #14323
2025-03-14 20:13:07 +01:00
José Valim
c1e79d189c
Support Erlang/OTP 28
2025-02-20 18:10:23 +01:00
Jonatan Männchen
e1d171e5c7
Add inline License / Copyright to Erlang files ( #14255 )
2025-02-05 13:50:00 +01:00
José Valim
29e3b78da8
Allow controlling which applications are used during inference
2025-02-03 18:13:18 +01:00
José Valim
9628bf83d9
Show non-expanded struct assocs in struct update deprecation warning
2025-01-22 17:22:01 +01:00
José Valim
b339deb204
Simplify token pruning, closes #14139
2025-01-20 18:51:29 +01:00
José Valim
83a70d799c
Deprecate struct update syntax
...
The struct update syntax was added early in Elixir to help validate
at compile-time that the update keys were valid. However, for a couple
releases already, Elixir's static analysis can perform such validation
more reliably and find more error if you pattern match on the struct
when the variable is defined instead.
This deprecation simplifies the language and pushes developers to
better alternatives.
Closes #13974 .
2025-01-18 10:08:31 +01:00
José Valim
e4f7ee448c
Perform type inference using reverse arrows on all non-branching constructs ( #14145 )
2025-01-15 21:15:22 +01:00
Daniel Drexler
b18aaa0d71
Improve warning for charlists ( #14160 )
...
The current warning for single-quoted character lists is confusing
because it appears to be a stylistic note instead of a deprecation
warning. This commit updates the language to make the reasoning clearer
and to more clearly describe what `mix format --migrate` will change
about the users' code.
2025-01-09 09:22:02 +01:00
José Valim
d713e47dbe
Improve error message for invalid default arguments
2025-01-02 18:35:46 +01:00
Harrison Chienjo
8302dbf519
Fix typos ( #14128 )
2024-12-29 19:42:09 +01:00
José Valim
c1c2cf8a65
Type checking of protocol dispatch ( #14117 )
2024-12-27 19:40:26 +01:00
Jonatan Kłosko
3ee2ecabff
Remove duplicated metadata in nested call AST ( #14122 )
2024-12-27 11:36:52 +01:00
José Valim
30764fe67d
Add type checking of protocol implementations ( #14115 )
2024-12-26 09:00:45 +01:00
José Valim
182e4b5304
Track source for warnings, closes #14093
2024-12-22 11:03:45 +01:00
José Valim
fe089dea56
Do not validate clauses of overridable functions, closes #14094
2024-12-22 09:55:05 +01:00
Jean Klingler
5882a52e73
Deprecate complex module expressions in &mod.fun/arity captures ( #14095 )
2024-12-22 16:22:42 +09:00
Jean Klingler
853e9ca7b9
Remove no_parens when using capture with arity ( #14090 )
2024-12-20 22:27:11 +09:00
José Valim
27a825aaf3
Annotate nifs to accumulate
2024-12-20 10:03:44 +01:00
José Valim
6443322382
Emit warnings for duplicate patterns instead of errors
2024-12-16 19:30:42 +01:00
José Valim
a506ebc257
Avoid crashes on diagnostics with tabs, closes #14073
2024-12-16 12:09:02 +01:00
Jonatan Kłosko
fb7f24e4d5
Make :source_path in docs chunk a charlist ( #14071 )
2024-12-13 16:57:40 +01:00
José Valim
3de7658489
Postpone requirement for pin on bitstring
2024-12-11 17:40:53 +01:00
José Valim
098c01a7ee
Introduce deprecations scheduled for v1.19
2024-12-11 11:59:36 +01:00
sobolevn
1ab6cdc2db
Deprecate single quotes in quoted atoms and calls ( #14047 )
...
Closes #13958 .
2024-12-10 19:31:11 +01:00
José Valim
77ea87ae29
Parse OTP release
2024-12-10 19:30:25 +01:00
José Valim
66c82a2361
Fix error message around single quote keywords
2024-12-10 19:29:32 +01:00
José Valim
ef7c11814f
Require Erlang/OTP 26+ ( #14045 )
2024-12-10 15:38:02 +01:00
José Valim
71441623cc
Update CHANGELOG and TODOs
2024-12-10 14:58:44 +01:00
José Valim
793c114721
Add JSON encoding and decoding ( #14021 )
2024-12-10 12:14:30 +01:00
Eksperimental
eadbd8bdf3
Fix typos ( #14023 )
...
The typos were detected by this app: https://pypi.org/project/typos/
running the following command
typos --exclude "lib/elixir/unicode/" --exclude "man/" --exclude "typos" --format brief
2024-12-01 16:59:24 +01:00
José Valim
8eba863f8f
Properly track stab inside container_cursor_to_quoted, closes #13826
2024-11-25 14:46:23 +01:00