Ben Olive
6f40fae504
Handle final sigma unicode exception
...
Signed-off-by: José Valim <jose.valim@plataformatec.com.br >
2017-10-30 18:45:16 +01:00
Eric Zhang
46dd155fc4
Raise when calling GenServer.stop/3 with current process ( #6987 )
2017-10-30 10:35:08 +01:00
José Valim
c37c46378c
Rename foreign atom
2017-10-29 22:31:55 +01:00
José Valim
2731b1355f
Consistently use GenServer API in Supervisor
2017-10-29 22:31:55 +01:00
Vahid Fazlollahzade
d124b05b6c
Document Enum.EmptyError exception for Enum.reduce/2 ( #6986 )
2017-10-28 15:40:25 +02:00
José Valim
ef43b25f85
Restrict next break fits and eols on operators and function calls
...
* Whitelist which operators support next_break_fits
* No longer consider tuples as part of next_break_fits
* Do not consider eol for = and ::
* Do not consider eol for calls with one next_break_fits arg
2017-10-27 12:34:09 +02:00
José Valim
e26128a630
Discard malformed lines in metadata
...
Closes #6980 .
2017-10-27 00:47:09 +02:00
Blake Tan
39d903ecf3
Better handling of non existing atoms ( #6978 )
2017-10-26 20:25:00 +02:00
José Valim
e728d28537
Tidy up implementation detail section
2017-10-26 15:57:16 +02:00
Andrea Leopardi
e8c7d48cf7
Fix formatting of multiline "foo.{...}" calls ( #6979 )
2017-10-26 13:59:37 +02:00
José Valim
f0a74482da
Respect the user's choice on calls
...
Closes #6977
2017-10-26 13:19:21 +02:00
José Valim
3fba28e0ee
Treat => and : as operators in the formatter
...
This means that the right side will break on its own line
when it doesn't fit and be indented by two spaces.
Closes #6976 .
2017-10-26 12:43:02 +02:00
José Valim
5e4bd77c63
Use flex when inspecting tuples
...
This aligns better with the formatter latest style
2017-10-26 10:46:27 +02:00
José Valim
a815313750
Store the number of defaults in the definition Meta
2017-10-26 00:18:06 +02:00
José Valim
bfbb6539a4
Do not raise while tasks are being processed
...
Closes #6972 .
2017-10-25 20:02:28 +02:00
José Valim
aa79c52779
Pipe all the way in string
2017-10-25 19:58:03 +02:00
José Valim
015644ff4f
Update codebase with latest formatter rules
2017-10-25 19:39:25 +02:00
José Valim
f11a26dc70
Consistently add spaces after not
2017-10-25 19:38:56 +02:00
José Valim
6f02c12e46
Support next break fits inside tuples
...
This only applies if the tuple has not been "spaced out".
2017-10-25 19:36:34 +02:00
José Valim
b24a7a0fda
Clarify supervisor docs
2017-10-25 12:04:40 +02:00
José Valim
703e3000a6
Remove end column information from tokens
...
If we want to store this information, we need to store it
alongside the end line, otherwise it is ambiguous.
2017-10-25 11:56:31 +02:00
José Valim
292a14466d
Support columns: true in string_to_quoted, closes #3554
2017-10-25 11:02:53 +02:00
José Valim
47ca7004b6
Avoid conflicts with erl_anno in meta
...
We avoid using :file publicly as well as :location privately.
We do still use :file privately but that's supposed to mirror
the `-file` annotation in Erlang before function definitions.
2017-10-25 00:33:05 +02:00
José Valim
171a849c8a
Also mention you may want to start an application manually
2017-10-24 16:46:17 +02:00
José Valim
8152436235
Improve fetch_env error message
2017-10-24 16:44:06 +02:00
José Valim
e8ea15b4a4
Run the formatter in the formatter and remove code duplication
2017-10-24 14:16:38 +02:00
José Valim
d0e496d6f5
Recognize hashbangs in the formatter
...
Those are known instructions in UNIX systems.
Closes #6969 .
2017-10-24 14:00:10 +02:00
José Valim
c36ee56cc7
More docs for inspect algebra
2017-10-23 22:43:43 +02:00
José Valim
3eccd91f59
Simplify the condition for implementing count
2017-10-23 21:12:40 +02:00
Gustavo Saiani
85b72fb381
Fix backtick position in Enum doc ( #6965 )
2017-10-23 14:04:33 +02:00
José Valim
b534142f95
Automatically include and format specs when showing docs
...
This removes the previous `s` helper as we now get them
as part of the docs.
2017-10-23 01:02:54 +02:00
Jan Fornoff
152bec151d
Use Mix.shell.info over IO.write in Mix xref ( #6964 )
2017-10-22 22:52:03 +02:00
José Valim
1bd4546e81
Avoid multiple passes if there are no entries
...
The cost of no-op is important since it runs every
time code is compiled.
2017-10-22 12:48:22 +02:00
Glauber Campinho
a253b2a16a
Handle external files for xref callers and warnings ( #6947 )
2017-10-22 12:39:46 +02:00
José Valim
5e668c2d7d
Avoid warnings during bootstrapping
2017-10-22 01:48:56 +02:00
José Valim
df8bca004a
Improve optional callback checks
2017-10-22 01:48:00 +02:00
José Valim
aad66f22bc
Move all remaining behaviour usage warnings to Elixir
2017-10-22 00:59:11 +02:00
Alexis Brodeur
18f723541c
Perform some behaviour lint checks in Elixir ( #6841 )
2017-10-21 23:35:15 +02:00
Cẩm Huỳnh
7146c6666c
Avoid shadowing in Stream.do_reduce ( #6962 )
2017-10-21 23:33:09 +02:00
José Valim
17a59905b2
Format expansion_test.exs
2017-10-21 20:56:13 +02:00
José Valim
f130cb9c84
Improve warnings during expansion
2017-10-21 20:43:35 +02:00
José Valim
23eb3ef089
Add Enumerable.slice/1 and use it in Enum ( #6958 )
...
We have reimplemented Enum.at/3, Enum.fetch/2, Enum.fetch!/2,
Enum.random/1, Enum.slice/2, and Enum.slice/3 to be more
efficient by using the new protocol function.
This partially implements #6955 . We have decided to not replace
`count/1` by an `aggregate/2` callback because it became clear
we cannot implement `min/1` for date ranges since `Enum.min/1`
does a structural comparison. Given ranges are still the only case
that requires custom aggregations, we have decided to inline those
in Enum until we have more evidence that such callback is necessary.
2017-10-21 16:17:04 +02:00
Glauber Campinho
f3acc14fb5
Add file information to the dispatches on the source manifests ( #6954 )
2017-10-21 11:53:06 +02:00
Wojtek Mach
4d4a09ef85
Fix handling deprecated return value for Erlang.compile callback ( #6960 )
2017-10-21 11:52:35 +02:00
José Valim
307ba8a38e
Fix IEx and Mix suites on Windows ( #6959 )
2017-10-21 10:57:56 +02:00
José Valim
0009df4de3
Do not write files outside of tmp
2017-10-20 16:24:55 +02:00
Dimitrios Zorbas
137082bb27
Add :system_env option to dependencies ( #6933 )
2017-10-20 00:04:43 +02:00
Pedro Medeiros
0dc899df43
Format @spec with map literal with multi keys
...
Signed-off-by: José Valim <jose.valim@plataformatec.com.br >
2017-10-19 18:32:04 +02:00
José Valim
499c153c0d
Ensure left side of | in maps has parens when necessary
2017-10-19 18:29:13 +02:00
José Valim
b83b9a0892
Use iodata instead of binaries when building dot graph format
2017-10-19 13:38:23 +02:00