Commit Graph
5104 Commits
Author SHA1 Message Date
Jean Klingler 730fd0f824 Warn on deprecated ~~~ unary op in tokenizer (#14870) 2025-10-29 19:27:48 +09:00
José Valim 1738ed453f Do not include signatures twice in beam files 2025-10-23 00:01:32 +02:00
José Valim 613f631487 Simplify always true and always false bdd nodes 2025-10-21 12:51:11 +02:00
José Valim f08a84af10 Make bdd functions public to aid debugging 2025-10-21 12:40:29 +02:00
José Valim ec87c6b111 Improve protocol violation warnings 2025-10-18 18:32:28 +02:00
José Valim 0c595489b6 Improve protocol type error to list possible root causes 2025-10-18 18:32:22 +02:00
José Valim baa25991fa Do not escape dbg options, closes #14839 2025-10-17 22:15:22 +02:00
José Valim dea8456022 Escape meta within existing quote extensions (#14832)
Closes #14829
Closes #14830
2025-10-14 13:05:44 +02:00
José Valim 36190985d2 Include a hint for defimpl type checking 2025-10-08 18:27:39 +02:00
Eksperimental c7884ca393 Elixir v1.19 introduces a warning related to structs, (#14818)
hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_fun()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_fun()
         %{user | name: "John Doe"}

Since this could be seen by new-comers to the language, offering a better user experience by avoiding abbreviations. Favoring the usage of "some_function" instead of "some_fun"
2025-10-07 17:54:41 +02:00
José Valim 8c14d3a818 Add newline after inspection, closes #14819 2025-10-07 17:15:24 +02:00
José Valim 64f69cfee8 Improve error message when escaping default values with custom rules in structs, closes #14817 2025-10-07 14:26:11 +02:00
José Valim 7844c98fe7 Ensure escaping works within struct fields, closes #14817 2025-10-07 13:07:42 +02:00
Rafał Studnicki e29c40a7e9 Add key-based partitioning to duplicate registries (#14654) 2025-10-06 19:02:01 +02:00
José Valim 9fc3708980 Fix optimizations for closed map checking (#14813) 2025-10-06 17:25:10 +02:00
José Valim 44fd817935 Use lazy bdd for all types (#14806)
We use Lazy BDDS: ternary trees (instead of binary) where the additional node
encodes a lazy union, as in "COVARIANCE AND CONTRAVARIANCE:
A FRESH LOOK AT AN OLD ISSUE", with some additional optimisations
for intersections and differences to avoid materialising unions.
2025-10-04 13:10:31 +02:00
José Valim ce403643cd Include previous clause line on default errors/warnings, closes #14804 2025-10-01 08:45:01 +02:00
José Valim a2baac915a Address regressions on 'not in' operator
Closes #14783.
2025-09-30 16:47:11 +02:00
José Valim cb15a3dd4c Convert line break error into a warning for v1.19 2025-09-29 09:26:15 +02:00
José Valim a4f98b1177 Optimize DNFs to avoid negations when possible 2025-09-28 20:01:26 +02:00
Guillaume Duboc 5b2f9c9201 Rewrite maps, tuples, lists as BDDs and improve performance (#14693) 2025-09-28 19:05:30 +02:00
Jean Klingler bfbd7658b3 Assert scope is not match/guard when using escaped regexes (#14780) 2025-09-27 23:02:05 +09:00
Jean Klingler 4363dffaf5 Fix Macro.escape/1 bug when :quote tuples is in the tail of a list (#14775)
Close https://github.com/elixir-lang/elixir/issues/14771
2025-09-17 07:15:52 +09:00
Jean Klingler 7be008c1b0 Bugfix: Macro.escape/1 properly escapes meta in :quote tuples (#14773)
Close #14771

Also internally renames the `op` field inside `elixir_quote`: `none -> escape`, `prune_metadata` -> `escape_and_prune`, `add_context -> quote`.
2025-09-16 18:37:16 +09:00
José Valim 62949b0728 Revert "Convert verification errors into diagnostics, closes #14768"
This reverts commit 2dc3d2713c.

This solution will still leave a corrupted state if
verification is manually aborted.
2025-09-14 10:44:58 +02:00
José Valim 1f7ddd7acd Convert verification errors into diagnostics, closes #14768 2025-09-13 20:07:44 +02:00
José Valim fd9dbf8490 Update Unicode to version 17.0.0 (#14760)
This is an automated commit created by the Maintenance project
https://github.com/eksperimental/maintenance

Please read the release notes by visiting
<http://www.unicode.org/versions/Unicode17.0.0/>.
2025-09-10 09:10:32 +02:00
Jean Klingler c8f8d02cc0 Fix dialyzer opaqueness warnings on module attrs in OTP28 (#14755)
* Mark module attributes as generated in case they contain opaque terms

* Add and use Macro.escape(ast, generated: true)
2025-09-09 17:51:50 +09:00
Jean Klingler d0634c9188 Fix infinite loop: Enum.take/2 with negative index on empty enum (#14747) 2025-09-05 21:25:51 +09:00
José Valim f56139aa2c Add closing token metadata to a.{}, closes #14682 2025-08-31 22:10:01 +02:00
José Valim 8ac8230e18 Properly handle column for 'in' in 'not in' operator
Closes #14681.
2025-08-31 22:10:00 +02:00
sabiwara 0fca9beaf7 Remove test for warning disabled on 1.19 2025-08-31 20:10:59 +09:00
Jean Klingler b3e3e8c6aa Do not consider variables from pattern in bitstring modifier (#14738) 2025-08-31 19:21:15 +09:00
José Valim d507502ecd Update bidi/line break character checks according to UX#55 2025-08-31 10:57:43 +02:00
José Valim 2bb27ea128 Only break newlines if original char is a newline 2025-08-31 10:57:43 +02:00
Lukasz Samson 6fbc6e08a0 Advance line when processing ? followed by <LF> and \<LF>
Closes #14715.
2025-08-31 10:57:43 +02:00
Jean Klingler e1f34d09af Shallow-validate the return of __escape__ (#14736) 2025-08-31 15:51:46 +09:00
Jean Klingler ff21a9d601 Add __escape__/1 and use it to fix Regex escaping in OTP28.1+ (#14720)
Leverages newly added :re.import/1.
https://github.com/erlang/otp/pull/9976
2025-08-30 18:29:56 +09:00
Jean Klingler 1778bf211c Inspect ill-formed structs as maps (#14718) 2025-08-23 17:16:20 +09:00
Łukasz Samson 764235f1da Fix expand crash on invalid multialias root (#14698) 2025-08-06 10:05:20 +02:00
Łukasz Samson 71e1ddc64e Return error on invalid unicode sequences (#14666) 2025-07-27 19:04:52 +02:00
José Valim f50f35fd1c Add --name-pattern option to mix test and regex support to OptionParser (#14674) 2025-07-26 19:56:05 +02:00
José Valim 5bc81aaa0a Enhance OptionParser.ParseError with available options display (#14673)
Example output:

  Expected one of:
    --count INTEGER (alias: -c)
    --debug, --no-debug (alias: -d)
    --files STRING (alias: -f) (may be given more than once)
    --verbose, --no-verbose (alias: -v)

Prompt
======

When we raise ParseError, include all of the options we could
potentially accept, alongside their types and aliases. For example,
the switches `[foo: :string, bar: :integer]` and `aliases: [b: :bar]`,
the error message should say:

    Expected one of:
      --foo STRING
      --bar INTEGER (alias: -b)

Furthermore, for types that are :keep (which default to string), you should
add:

    --bar INTEGER (alias: -b) (may be given more than once)

And boolean ones accept no arguments, so they should be written as:

    --baz, --no-baz

Sort all of them alphabetically.
2025-07-26 19:56:05 +02:00
Jean Klingler 79005e370e Fix opaqueness violation in Task.Supervisor (#14656) 2025-07-18 06:43:08 +09:00
José Valim a719cb3b21 Update checker to v2 as representation has changed 2025-07-16 16:39:29 +02:00
José Valim 2c3edbe1c7 Check for type equality 2025-07-11 16:15:53 +02:00
Guillaume Duboc 855df4fc77 Domain keys in map (#14478)
- Introduced tests for union, intersection, and difference operations involving domain key types.
- Validated subtype relationships and intersection results for maps with domain keys.
- Enhanced map fetch and delete functionalities to handle domain key types.
- Ensured correct behavior of dynamic types with domain keys in various scenarios.
2025-07-11 15:52:06 +02:00
José Valim 2b8ee38660 Tag / as an operator in fragments, closes #14643 2025-07-11 11:12:32 +02:00
José Valim 8d2775051d Update ... to an operator in Code.Fragment 2025-07-11 11:12:31 +02:00
José Valim ea77a68daa Add tests for allow_locals option 2025-07-10 17:32:08 +02:00