Commit Graph
9304 Commits
Author SHA1 Message Date
José Valim 7e2b22402c Do not ignore unimplemented function headers from used modules 2021-04-07 18:52:47 +02:00
José Valim 3df04b23f9 Temporarily defdelegate and defexception inside protocols 2021-04-05 10:17:16 +02:00
Wojtek Mach 8c4bed23e6 Use docs canonical version in all built-in apps (#10872)
Before:

https://hexdocs.pm/elixir/1.12.0-rc.0/changelog.html contains links like:

  - [`Mix.install/2`](https://hexdocs.pm/mix/Mix.html#install/2)

which currently 404.

After:

https://hexdocs.pm/elixir/1.12.0-rc.0/changelog.html would contain:

  - [`Mix.install/2`](https://hexdocs.pm/mix/1.12/Mix.html#install/2)

See demo: http://wojtekmach.pl/docs/elixir/1.12/elixir/changelog.html
2021-04-04 09:56:18 +02:00
Enrico Rivarola 56e01f151b Sync unicode data to Unicode 13.0.0 (#10866) 2021-04-03 17:49:48 +02:00
Eksperimental 171caface8 Update Unicode upgrade instructions (#10862) 2021-04-03 17:49:48 +02:00
Eksperimental b2a04575c3 Update Unicode to version 13.0.0 (#10861) 2021-04-03 17:48:38 +02:00
José Valim 64fca3cdb1 Clarifications to Calendar.ISO 2021-04-03 15:02:42 +02:00
José Valim 415d4647c4 Remove invalid escaping of sigils, closes #10864 2021-04-02 23:14:38 +02:00
Eksperimental 91344a24a8 Format source code with new rules 2021-04-01 09:48:05 +02:00
Eksperimental 5fbdee2714 Quote range operator atom
This commit has only the actual changes
Add tests for quoted range operator
2021-04-01 09:48:05 +02:00
Eksperimental 832fbce136 Fix grammar in Range docs (#10851)
- Use "with a step of X"
- Replace usage of "start" and "stop" with "first" and "last"
2021-03-30 18:51:06 +02:00
Wojtek Mach 94096055ad Update compatibility-and-deprecations.md (#10846) 2021-03-30 15:02:27 +02:00
José Valim 02e9b898c4 More range copyedit 2021-03-30 14:44:50 +02:00
Eksperimental 1c01996c29 Copyedit Range specs and docs (#10845) 2021-03-30 14:44:50 +02:00
Eksperimental 103db3a2ef Simplify specs in Range by introducing t:limit/0 (#10844) 2021-03-30 14:26:40 +02:00
José Valim 6f95bf274f Use types were appropriate in Range 2021-03-30 14:14:10 +02:00
Kelvin Stinghen 7210ab2fbd Keeping underscore between digits on Macro.camelize/1 (#10843)
Closes #10839
2021-03-30 13:42:45 +02:00
Eksperimental 174b77150e Use one-based var names in Types (#10824)
In the same fashion as generated arguments 30373382ec
2021-03-30 13:42:41 +02:00
José Valim 1dd09cb0bc Document ranges structs are read-only 2021-03-30 12:02:32 +02:00
José Valim 203cb4bb6f Add Registry.values/3 2021-03-30 11:43:50 +02:00
Łukasz Jan Niemier 8ff5c76b9c Set correct value returned by get_fun/2 callback (#10842)
By looking at source of `Access.all/0` it seems that returned value by
this function is `container()` instead of tuple `{val, container()}`.
2021-03-30 11:08:44 +02:00
José Valim 51de0e09a7 Add line numbers of first expression to lists 2021-03-30 11:08:44 +02:00
José Valim 9b38e4ed07 Remove Range.empty?/1 2021-03-30 09:22:33 +02:00
Eksperimental 2d40ad09d1 Simplify Range's step error message (#10835) 2021-03-29 23:34:55 +02:00
Eksperimental 00d1bc6765 Update range definition (#10834)
Ranges are no longer exclusively a consecutive sequence of integers.
2021-03-29 23:34:51 +02:00
Eksperimental 544466a4d1 Fix t:Range.t/2 (#10833)
We need to be explicit and define the step field, otherwise IEx and ExDoc will spec it as "term()"

    (1)> t Range.t/2
    @type t(first, last) :: %Range{first: first, last: last, step: term()
2021-03-29 22:35:48 +02:00
José Valim 385d2cd54a Prepare v1.12 for release 2021-03-29 17:44:50 +02:00
José Valim de8e4f1bee Optimize Stream.zip and Stream.zip_with with only lists 2021-03-29 11:00:25 +02:00
José Valim cd18fc7afd Remove Enum.zip_reduce_while, as it is equivalent to Stream.zip+Enum.reduce_while 2021-03-29 10:45:26 +02:00
José Valim 2f49952d2f Clean up docs 2021-03-29 10:28:25 +02:00
José Valim b9474da3bf Bring zip optimizations for lists, add docs and specs 2021-03-29 09:56:47 +02:00
Adam Lancaster 7b4a57c35d Add zip_reduce and zip_reduce_while (#10828) 2021-03-29 09:33:36 +02:00
AndreOrlov 077b711d14 Fix KeyError custom message (#10829) 2021-03-28 18:59:22 +02:00
Eksperimental dad1b86a6a Streamline get_and_update specs for Access for Kernel (#10822)
In the same fashion of PRs #10228 and #10223

Replaces:
- `get_values` with `current_value`
- `update_value` with `new_value`
- `data` with `new_data` when suitable

Adds nil as an argument term in the function spec.
2021-03-27 14:18:50 +01:00
José Valim 251413a7b6 Adopt EEP 54
With EEP 54 (part of Erlang/OTP 24+), we can now get extra
information from Erlang errors. Before this patch:

    Interactive Elixir (1.12.0-dev)
    iex(1)> ets = :ets.new(:example, [])
    #Reference<0.3845811859.2669281281.223553>
    iex(2)> :ets.delete(ets)
    true
    iex(3)> :ets.insert(ets, :should_be_a_tuple)
    ** (ArgumentError) argument error
        (stdlib 3.15) :ets.insert(#Reference<0.3845811859.2669281281.223553>, :should_be_a_tuple)

After this patch:

    Interactive Elixir (1.12.0-dev)
    iex(1)> ets = :ets.new(:example, [])
    #Reference<0.105641012.1058144260.76455>
    iex(2)> :ets.delete(ets)
    true
    iex(3)> :ets.insert(ets, :should_be_a_tuple)
    ** (ArgumentError) errors were found at the given arguments:

      * 1st argument: the table identifier does not refer to an existing ETS table
      * 2nd argument: not a tuple

        (stdlib 3.15) :ets.insert(#Reference<0.105641012.1058144260.76455>, :should_be_a_tuple)

We choose to always track error info, instead of moving this
to blame, because it should be relatively cheap and it is
essential, especially when debugging live systems.
2021-03-27 11:52:21 +01:00
José Valim 3eb3a2e514 Better structure exception test 2021-03-27 11:31:23 +01:00
Fernando Tapia Rico fe6fed6fee Fix docs regarding empty ranges on negative steps (#10821) 2021-03-26 19:04:26 +01:00
José Valim bba29027f1 More docs around ranges 2021-03-26 15:55:15 +01:00
Wojtek Mach 09bf54014b Add step to Date.Range (#10816) 2021-03-26 15:03:24 +01:00
Wojtek Mach 9b44d9599f Fix Enumerable.Range.member?/2 with empty range (#10819) 2021-03-26 13:20:04 +01:00
José Valim 56ecdb172d Improve warnings 2021-03-26 13:19:04 +01:00
José Valim 7c8eb41a75 More docs and code comments for ensure_compiled! 2021-03-26 10:29:09 +01:00
Jason Axelson 3dab26248e Add "namespaces" guidance to library guidelines (#10818) 2021-03-26 10:16:56 +01:00
Eric Meadows-Jönsson dedee1d85a Fix OTP 24 test warnings (#10817) 2021-03-25 17:41:04 +01:00
Wojtek Mach 4f533cf284 Fix ^^^ warning (#10814)
Bitwise.xor/2 -> Bitwise.bxor/2
2021-03-25 12:30:58 +01:00
José Valim 895dc4f8e1 Properly underscore :rfc3986 2021-03-25 09:25:41 +01:00
Ted Metal c41ff4c20e Improve GenServer docs (#10812) 2021-03-25 09:22:22 +01:00
José Valim bc187f37dc Support stepped ranges (#10810) 2021-03-25 07:32:06 +01:00
Wojtek Mach 3533144e8e Update warnings for OTP master (#10807) 2021-03-23 17:40:04 +01:00
José Valim d9a23d0d38 Deprecate ^^^ 2021-03-23 10:23:58 +01:00