Commit Graph
2448 Commits
Author SHA1 Message Date
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
José Valim d244eaf8be Remove end_of_expression from ->, closes #13318 2024-02-06 13:46:46 +01:00
José Valim fd4e6b530c Fix column marker for maps 2024-02-05 15:13:31 +01:00
Mitchell Hanberg eb1499ac29 Include from_brackets metadata in all cases (#13317) 2024-02-05 09:40:16 +01:00
José Valim 00d2be5af7 Fix error message 'a guards', closes #13296 2024-01-30 20:07:38 +01:00
Jean Klingler 0b95ca45c2 Translate with/1 as a closure (#13299)
* Translate with/1 as a closure

* Emit leaner code on with var <-
2024-01-30 21:26:39 +09:00
José Valim 55cd5a4a22 Revert "Do not escape \ in uppercase sigils, closes #8989"
This reverts commit 51d23cbba8
due to a regression.

Closes #13262.
2024-01-17 23:28:21 +01:00
José Valim e4a71032d5 Always log errors at the end 2024-01-17 23:14:20 +01:00
Artem Solomatin 53f45a93b6 Specify guide links for incorrect guards message (#13247) 2024-01-12 22:38:47 +01:00
José Valim 19bdfd0444 Improve misplaced operator | message 2024-01-12 20:14:27 +01:00
Jean Klingler 8cde231bbd behaviour -> behavior when not about OTP behaviours (#13240) 2024-01-09 15:25:14 +09:00
José Valim 3ae8475e41 Add bitmask types to descr (#13230)
The bitmap represents all non-divisible types.
Currently it implements all types in our system,
but atoms, lists, tuples, maps, and functions
will be given more precise types later on.

Dynamic has not been yet implemented nor
optimizations for term.
2024-01-07 19:30:48 +01:00
José Valim 748722dc0d Trim down current typed module implementation (#13226) 2024-01-06 11:33:26 +01:00
José Valim fa088a4358 Do not hardcode newlines 2024-01-04 13:01:52 +01:00
José Valim 926560350b Extract snippet in elixir_errors to simplify exception handling 2023-12-21 21:14:44 +01:00
José Valim 7f3d62108b Consider column in snippets, closes #13199 2023-12-21 19:26:06 +01:00
José Valim 3a52c2d729 Add source field to diagnostics 2023-12-21 17:05:47 +01:00
José Valim 71039d97d3 Do not warn unused imports twice, closes #13178 2023-12-14 17:18:13 +01:00
José Valim 4d712b25ea Normalize token missing and mismatched delimiter exceptions
Closes #13183.
Closes #13185.
Closes #13186.
Closes #13187.
2023-12-14 17:02:15 +01:00
Vinícius Müller 02b0876154 Improve diagnostics for unclosed heredocs (#13182) 2023-12-14 09:24:43 +01:00
José Valim aabe46536e Disable compiler optimizations only in module body 2023-12-10 03:23:45 +11:00
Vinícius Müller 1d978bf73c Improve unclosed delimiter messages (#13123) 2023-12-04 12:46:15 +01:00