Commit Graph
14916 Commits
Author SHA1 Message Date
Eksperimental 00a0f07824 Allow Application.compile_env* to accept attributes (#11383) 2021-11-11 22:05:28 +01:00
José Valim c28073b4fc Fix warning from call to dynamically generated module 2021-11-11 22:04:47 +01:00
José Valim 8387dd70bc Fix bootstrap 2021-11-10 19:37:34 +01:00
José Valim 0e59c68428 Do not crash on duplicate bindings, closes #11378 2021-11-10 19:27:59 +01:00
José Valim 913d401a7a Perform implicit Application require as the compiler is aware of its constructs 2021-11-09 18:13:48 +01:00
José Valim fbfb1b4a12 Do not extract comments without a newline 2021-11-08 18:05:59 +01:00
José Valim cf5762ad24 Use keyword syntax by default in tuple formatting 2021-11-08 17:25:36 +01:00
Wojtek Mach fab158c0de Add Mix.installed?/0 (#11374) 2021-11-08 13:14:13 +01:00
José Valim 8c1b563a3c Keep yes?/1 as a callback, closes #11372 2021-11-07 12:22:52 +01:00
José Valim ece0530870 Fix regression on URI.parse/1, closes #11363 2021-11-07 10:48:26 +01:00
Guillaume Duboc 48b838a840 Fix formatting of map-like types in warnings (#11351)
This came up in issue #11204:

When emitting a warning for a type unification error,
the compiler overly simplifies the formatting of types
when these are maps or unions of maps.

To address this, we recursively check for maps inside
of a union type when comparing it to another map-like type.
2021-11-07 09:31:00 +01:00
José Valim 5aa1c9a839 Do not reinstall dependencies on same Mix.install/2 2021-11-05 00:05:15 +01:00
José Valim 3a8a7efecc Ensure structs can be in release configs, closes #11364 2021-11-04 08:41:15 +01:00
Tyler A. Young 3d038680da Clarify risk of duplicate keys in Map.map/2 (#11360) 2021-11-03 23:46:14 +01:00
Tyler A. Young 1766731dd4 Improvements to Enum.slide/3 (#11361)
- Support negative insertion indices
- Give a clear RuntimeError, rather than a baffling CondClauseError, when you ask for an insertion point that matches the last element of your range
2021-11-03 23:41:25 +01:00
José Valim b65b8e2cd3 Fix broken link in Task docs 2021-11-01 22:30:25 +01:00
José Valim 5062a154fa Release v1.13.0-rc.0 2021-11-01 20:58:47 +01:00
José Valim d7fea95157 Branch out v1.13 2021-11-01 20:53:52 +01:00
Adam Lancaster 9512bcce90 Add @impl to provider example (#11357) 2021-11-01 14:00:59 +01:00
Eksperimental 33ebd87e54 Fix Config.config_env/0 with empty Process dictionary (#11356) 2021-11-01 07:47:43 +01:00
Dorgan 34f32ef8a0 Keep keyword format of tuple last element (#11354) 2021-10-31 22:26:59 +01:00
Tyler A. Young c1d2bc7cc4 Add Enum.slide/3 (#11349) 2021-10-31 12:24:35 +01:00
felipe stival c5269a5230 Typespecs: show expanded module name on inexistent struct field error (#11353)
Closes #11352.
2021-10-30 09:39:44 +02:00
José Valim a620e9e20b Fix example 2021-10-30 08:47:49 +02:00
Chris Miller c5cdffa7bf Start :update_counter loop on Logger.Config init (#11350) 2021-10-29 11:15:33 +02:00
Maarten van Vliet b166e8e184 Pass sigil/modifiers through to formatter (#11348)
This allows the formatter plugins to format content
based on whether it's a file or a sigil being formatted.
The modifiers could be used for additional options.
2021-10-26 14:06:06 +02:00
José Valim e5e5170426 Use algebra concat instead of binary concat 2021-10-25 23:22:00 +02:00
Michał Łępicki 58e7c6a917 Settle elixir_errors:parse_error/6 InputString as charlist (#11345) 2021-10-25 23:09:32 +02:00
Michał Łępicki dec273346a Ensure Code.string_to_quoted input only needs the List.Chars protocol (#11344) 2021-10-25 22:07:55 +02:00
José Valim f2ad9823d8 Only consider StartColumn on first line 2021-10-25 16:33:16 +02:00
felipe stival edcb9096d5 Show code snippet on syntax and token missing errors (#11332)
Closes #11280.
2021-10-25 16:18:29 +02:00
José Valim e414cc0e83 Add URI.new/1 and URI.new!/1 (#11341)
Closes #10865.
2021-10-25 13:10:14 +02:00
Udo Kramer 95357ff453 Fix a few typos (#11342) 2021-10-25 12:32:42 +02:00
Michał Łępicki 6127de27bb Fix mistake in ParallelCompiler.require/2 spec (#11340) 2021-10-25 10:45:48 +02:00
José Valim 5a4c03c02e Handle more incomplete expressions in cursor_context_to_quoted 2021-10-24 17:22:01 +02:00
José Valim 9154c8b240 Include column in warnings emitted by compiler (#11339)
We also extend Mix.Tasks.Compiler.Diagnostic
to include {line, column} as possible position.
We also explicitly document the behaviour of
line=0, which is equivalent to unknown line.
Elixir was already setting the line to zero in
multiple occasions prior to this patch, so this
patch makes it official and we stop returning `nil`
for said cases.
2021-10-24 16:28:36 +02:00
José Valim f3155007dd Include column in more errors whenever possible 2021-10-24 15:58:19 +02:00
Wojtek Mach 5dd5c4600e Fix MIX_INSTALL_DIR docs (#11338)
Fix accidentally removed part of the sentence.
2021-10-24 01:15:30 +02:00
Wojtek Mach b65ef3844b mix: Add MIX_INSTALL_FORCE environment variable support (#11337) 2021-10-23 22:45:36 +02:00
José Valim c799fcdcf7 Return :eof for read(dev, :eof) and there is no data 2021-10-23 11:23:03 +02:00
José Valim 7693b05016 Revert "Default to including columns by default"
This reverts commit 213cba2baa.

Including columns by default make Ecto test suite
consistently 10% slower and that's likely to replicate
across the board.
2021-10-23 10:28:02 +02:00
José Valim 7181f2dc99 Fix perf regression on file reading, closes #11335 2021-10-23 10:27:32 +02:00
José Valim 29e40b1448 Improve Enum.concat/1 signature docs 2021-10-22 23:55:11 +02:00
José Valim 213cba2baa Default to including columns by default
This changes the default for Code.string_to_quoted/2
and friends, so it may break tests matching explicitly
on the output, but the functionality wise the AST should
still be the same. The reason why it is important to make
this change is to provide better error messages throughout
Elixir.
2021-10-22 21:21:19 +02:00
Eksperimental fe372a8e5a Add specs and improve guards to Calendar.ISO.parse_*/2 functions (#11329) 2021-10-22 21:19:15 +02:00
Marc-André Lafortune 06594f5265 Fix --fail-above with --exclude (#11306)
And improve test coverage.
2021-10-22 14:05:57 +02:00
José Valim dc753d6a05 Show hint if comparing different but equivalent strings
Closes #11256.
2021-10-21 12:06:35 +02:00
José Valim 12ab3d38a6 Handle comments in EEx between do and the first clause
Closes #11307.
2021-10-21 11:28:12 +02:00
Dylan Chong 0bb774b0df Clarify name registration (#11327) 2021-10-21 11:06:45 +02:00
José Valim 2e319494f1 Checkpoint mix compile state from semantic recompilations
This address the following case:

  1. The user changes config/mix.exs/__mix_recompile__?
  2. We detect the change, remove .beam files, and start recompilation
  3. Recompilation fails for some reason
  4. The user reverts the change
  5. The compiler no longer recompiles (as it sees no change)
     but the .beam files are now missing

To address this, we checkpoint all stale modules coming from config
and mix.exs changes, as well as all modules where __mix_recompile__?
returned true.
2021-10-21 11:01:46 +02:00