José Valim
73d7762563
Avoid double tracing on captures
2024-05-25 11:13:29 +02:00
kristofka
4e478b3752
Correctly Macro.escape :quote triplet without meta ( #13594 )
...
Closes #13593 .
2024-05-24 11:33:03 +02:00
José Valim
ba579f1410
Use simpler solution for adjusting map line
2024-05-23 19:44:22 +02:00
José Valim
f0e97d0bef
Solve bootstrap issues on dynamic options to quote
2024-05-23 18:02:01 +02:00
José Valim
03d412f20e
Handle bind_quoted with context correctly, closes #13590
2024-05-23 17:36:36 +02:00
José Valim
f23434e31a
Make term_to_binary on BEAM chunks deterministic
2024-05-22 13:33:51 +02:00
José Valim
37d36f8bd6
Do not expand bind_quoted expressions twice
2024-05-20 18:01:02 +02:00
José Valim
92e0e34a1e
Respect line property when file is given, closes #13542
2024-05-20 17:10:11 +02:00
José Valim
21921dc951
Simplify escaping logic by reducing the number of vars
2024-05-20 14:31:25 +02:00
José Valim
a4429ac239
Do not crash on imports inside nested quotes, closes #13575
2024-05-20 13:13:07 +02:00
José Valim
f9263fdc54
Do not crash on invalid imports metadata
2024-05-20 12:44:37 +02:00
José Valim
5f2f626a05
Do not raise on Macro.Env.expand_import, closes #13573
2024-05-20 10:55:18 +02:00
Łukasz Samson
64d6d3d345
Fix typo in meta key name in elixir_quote ( #13570 )
...
It seems the bug has been introduced in df64d5c6a1 (and 169595f534 ) where `import` meta has been renamed to `imports` but some places were missed
This bug was present since 1.14.0
2024-05-18 10:38:31 +02:00
Jean Klingler
d11b41f65a
Revert alias shadowing warning due to false positives ( #13568 )
...
* Revert "Fix false positive with nested shadowed alias (#13564 )"
This reverts commit 8dc94db457 .
* Revert "Warn on unused shadowed aliases (#13550 )"
This reverts commit d1b3063050 .
2024-05-18 17:00:13 +09:00
Bryan Paxton
496cb2c892
Add support for sigils containing integers ( #13448 )
2024-05-17 12:40:02 +02:00
Jean Klingler
8dc94db457
Fix false positive with nested shadowed alias ( #13564 )
2024-05-17 08:13:19 +09:00
José Valim
d7ea2fa2e4
Handle cursor completion inside fn/rescue/catch/else/after
2024-05-14 17:04:57 +02:00
José Valim
203baf36af
Raise on left-over __cursor__
2024-05-10 15:17:35 +02:00
José Valim
7489ce8572
Perform type checking across comparison operators ( #13527 )
2024-05-02 14:09:41 +02:00
Łukasz Samson
2a7948a472
Fix warn case return value in pid expansion ( #13526 )
2024-05-02 13:36:42 +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
Jean Klingler
dc6fa24edd
Inline duration building in shift/2 functions ( #13489 )
...
* Inline duration building in shift/2 functions
* Rename __duration__! and define in all modules
2024-04-10 12:57:26 +09:00
José Valim
100d63bfcc
Inline and fix timeout typespec
2024-04-08 21:39:17 +02:00
Jean Klingler
98719ff200
Inline some pure functions calls ( #13483 )
2024-04-08 22:54:03 +09:00
José Valim
c3f48d71f7
Simplify prematch handling
2024-04-03 00:04:48 +02:00
José Valim
12f62e49ca
Re-add simplified purging logic ( #13455 )
2024-03-30 18:30:42 +01:00
José Valim
bcf747f080
Add code comments about async purging
2024-03-30 18:30:22 +01:00
Jean Klingler
1acb267e19
Mark with/1 internal clauses as generates ( #13454 )
2024-03-30 17:13:33 +09:00
José Valim
494a018abb
Ensure invalid only/except does not raise on define_import
2024-03-25 11:27:20 +01:00
José Valim
55704b92a3
Add more error handling to define_alias
2024-03-24 22:29:30 +01:00
José Valim
ac844f4dba
Add Macro.Env.define_import/4
2024-03-24 22:29:30 +01:00
José Valim
206a81bc64
Refactor elixir_import to work with ok/error tuples
...
Also do not raise if an import conflicts with a special form,
instead, discard it.
2024-03-24 22:29:30 +01:00
José Valim
be2e26f465
Add define_alias, define_require, and expand_alias
2024-03-22 19:11:59 +01:00
José Valim
097eee9d5f
Add Macro.Env.expand_import/5 and Macro.Env.expand_require/6 ( #13421 )
2024-03-21 10:51:10 +01:00
Jean Klingler
3da9af2150
Only infer size in pinned variable when needed ( #13423 )
2024-03-20 18:59:21 +09:00
José Valim
b8f069d08e
Fix parsing of ambiguous operators followed by containers
...
Closes #13402 .
2024-03-09 11:17:06 +01:00
Tiago Moraes
f9a139b7f8
Check exports on compile time context modules ( #13400 )
2024-03-08 18:47:23 +01:00
José Valim
b3710dea97
Always start IEx shell via -user
...
There is some uncertainty as to wether it will be possible
to start an IEx shell dynamically from a -noshell environment.
Therefore, this PR simplifies the shell booting to still
rely on -user, as it did earlier than Erlang/OTP 26.
2024-02-29 14:48:54 +01:00
José Valim
d120affb11
Emit defmodule tracing event
2024-02-26 18:28:40 +01:00
Jean Klingler
3c55db78f0
Use Erlang's implementation of jaro distance, fix bugs ( #13369 )
...
* Use Erlang's implementation of jaro distance, fix bugs
* Remove conditional compilation
2024-02-26 19:25:31 +09:00
José Valim
80af632a7e
Wrap (a -> b) into literals instead of plain lists, closes #13358
2024-02-24 22:48:05 +01:00
José Valim
129c5beef8
Decouple require expansion from alias
2024-02-24 21:19:46 +01:00
José Valim
dab3d22993
Deprecate escaping closing delimiter in uppercase sigils
...
This aligns our uppercase sigils with Erlang/OTP 27.
2024-02-24 20:05:10 +01:00
José Valim
514615d034
Apply end of expression more consistently, closes #13355
2024-02-18 11:25:19 +01:00
José Valim
38a571b73a
Purge modules asynchronously ( #13350 )
2024-02-15 20:33:31 +01:00
José Valim
04e2724591
Do not purge compiler modules during compilation, only after ( #13346 )
...
The compiler freezing is mostly caused by a bug upstream,
but it may be speed up compilation to avoid purging as
we compile, as purging blocks the code server.
A potential downside is higher memory usage during
compilation.
Closes #13264 .
2024-02-15 12:48:53 +01:00
José Valim
a2676855fd
Remove unused Args argument
2024-02-11 23:36:40 +01:00
José Valim
9973a2eded
Remove typespec from default requires
2024-02-08 15:43:20 +01:00
José Valim
6655d40376
Streamline and document the parser
2024-02-07 15:06:48 +01:00
José Valim
d68c8d6cdd
Unify handling of .. and ...
2024-02-07 12:26:39 +01:00