José Valim
9afb27a4e2
Reraise with stacktrace in task with shutdown
2018-07-09 08:39:20 +02:00
José Valim
991db52707
Unify proc_lib handling in tasks
2018-07-08 21:30:44 +02:00
José Valim
83e6358b14
Fixes to binary generators with collectable into in comprehensions
...
This fixes two bugs/limitations:
1. When using dynamic size in the binary pattern
2. When using literals in the binary pattern
Closes #7829 .
2018-07-05 13:09:18 +02:00
José Valim
ed28d35eb5
Effectively deprecate Code.get_docs/2
2018-07-05 11:15:37 +02:00
José Valim
32450a0fd9
Remove Code.get_docs/2 and streamline the new chunk generation
2018-07-05 10:31:23 +02:00
László Bácsi
dc9cbb6e5d
Use @deprecated instead of IO.warn in Kernel.Typespec ( #7831 )
2018-07-05 08:44:27 +02:00
English3000
3f39110aa6
Beginner-friendly revisions to Elixir's documentation ( #7821 )
2018-07-05 08:33:53 +02:00
László Bácsi
caa90b563a
Migrate to Code.fetch_docs/1 ( #7828 )
2018-07-05 00:45:04 +02:00
László Bácsi
f84eff9648
Carry on the original naming of an argument to provide more clarity ( #7827 )
2018-07-04 00:04:05 +02:00
José Valim
383066aef5
Check for no_generators? once
2018-07-03 23:35:20 +02:00
José Valim
cd0cb7cca4
Do not leak inner key representation in signature
2018-07-03 23:30:41 +02:00
László Bácsi
2ecb5d00bd
Adopt EEP 48 and add Code.fetch_docs/1 ( #7826 )
...
At this point the legacy chunk and the original `Code.get_docs/2`
implementation is still in place, but the tests have been adjusted to
exercise `Code.fetch_docs/1` instead.
2018-07-03 18:43:41 +02:00
José Valim
b0cc54468e
Unify handling of keywords with and without parens
2018-07-03 17:57:13 +02:00
José Valim
4416854a9d
Improve error messages for boolean operators with =, closes #7730
2018-07-03 14:37:41 +02:00
José Valim
56b22b4bf2
Add a note about the line length guarantees
2018-07-03 14:20:29 +02:00
José Valim
005f432671
Warn for redefined docs across clauses
...
Closes #7817
2018-07-03 13:06:31 +02:00
José Valim
e7bd7c98e0
Do not include overridables in definitions, closes #7823
2018-07-03 12:39:58 +02:00
José Valim
2ece95c1db
Handle other unescaped tokens in tokenizer
2018-07-03 12:14:16 +02:00
Adrian Cruz
9707843134
Return error on bad hex escaping ( #7809 )
...
As discussed in #7270 , it would help if we return error tuples
instead of exceptions. This PR does it for string unescaping.
2018-07-03 12:03:43 +02:00
José Valim
c1d6bd3e60
Add a section about pattern matching on struct names
2018-07-02 15:09:51 +02:00
Keith
ec0ec5620e
Update Module doc - split behaviour link ( #7814 )
...
This commit updates the documentation to improve the href. Currently the link is:
https://hexdocs.pm/elixir/1.6.6/Module.html#module-behaviour-notice-the-british-spelling
With this update the link will be:
https://hexdocs.pm/elixir/1.6.6/Module.html#module-behaviour
2018-06-28 22:41:32 +02:00
Julius Beckmann
92a0c787b3
Updated docs für GenServer.terminate ( #7812 )
...
Tried to make the docs more clear that manual cleanup is not needed for opened sockets and files.
[CI skip]
2018-06-28 11:40:33 +02:00
Andrea Leopardi
7d621f60a9
Fix documentation for Date.months_in_year/1
...
[ci skip]
Thanks @David-Gil for
https://github.com/elixir-lang/elixir/pull/7417#discussion_r198735047 .
2018-06-28 09:57:00 +02:00
Dave Lucia
eab075fba0
Disambiguate def/2 docs regarding anonymous functions ( #7810 )
2018-06-28 08:47:34 +02:00
Michał Muskała
4f25ccd2d0
Refactor ArithmeticError.blame/2
2018-06-27 12:41:42 +02:00
Alex Castaño
374480e2e1
Annotates arithmetic error for better debug experience
2018-06-27 12:32:04 +02:00
Fernando Tapia Rico
e3b2b09cce
Make test suite for assert_no_guard more robust ( #7801 )
...
If I got it right, one of the reasons for that change was to get the message:
> invalid expression in guard, **!** is not allowed in guards. To learn more about guards, visit: https://hexdocs.pm/elixir/guards.html
instead of:
> invalid expression in guard, **case** is not allowed in guards. To learn more about guards, visit: https://hexdocs.pm/elixir/guards.html
This change should make the test suite more robust for future changes or refactors :)
In addition, I've split a couple of strings that were exceeding the maximum line length (98). By the way, should the formatter warn when it cannot keep the code under the desired line length? maybe with a `--strict` flag?
2018-06-27 12:22:39 +02:00
Devon Estes
e07ccb1df5
Add blame callback for KeyError ( #7803 )
...
This starts with an initial implementation of the `blame/2` callback
for `KeyError` to add some helpful `did_you_mean` feedback for
potentially typo'd keys. Right now it's only implemented for maps and
keyword lists, and only for atom keys.
2018-06-27 11:27:06 +02:00
Sihui Huang
2a610bd005
Add assert no guard on !, && and || ( #7797 )
2018-06-26 09:39:43 +02:00
Andrea Leopardi
69944c4f35
Fix specs for Task.Supervisor.start_child/2,3,4,5
2018-06-25 17:24:20 +02:00
José Valim
5fbc8676c2
Improve error messages for bad map key patterns
2018-06-25 16:56:57 +02:00
Dávid Kovács
a4b0e4f901
Typo in gen_server.ex comments ( #7793 )
2018-06-25 12:09:00 +02:00
Fernando Tapia Rico
eb218cb2c1
Polish documentation of Kernel module ( #7788 )
2018-06-24 23:50:24 +02:00
Michał Muskała
d225f4a373
Restore and/or optimisation ( #7764 )
...
The optimize_boolean option is very sensitive to the order of
clauses and the optimisation was not happening for and/2 and or/2.
Add regression tests to ensure that won't happen again.
Removes tests that dialyzer does not emit warnings for optimised
and and or - those warnings could actually be helpful.
2018-06-23 09:21:15 +02:00
Ivan Mironov
77ba9fd3b0
Fix description of max_children option ( #7787 )
2018-06-22 23:30:03 +02:00
José Valim
072eee8ea6
Clarify the use of the value continue
2018-06-22 08:07:06 +02:00
lukevmorris
2f268088af
Warn if nested comparisons are found ( #7773 )
2018-06-21 18:59:52 +02:00
Derek Kraan
95acb1f751
Include caller information on struct expansion errors
...
Closes #7752
2018-06-21 18:48:55 +02:00
José Valim
9411636d12
Move did_you_mean for undefined function error to Exception.blame
2018-06-21 18:47:42 +02:00
José Valim
5ab60299b5
Do not break assertion arguments apart if they are all quoted literals
2018-06-21 16:41:05 +02:00
José Valim
896e0664a0
Improve error message on nil dispatch
2018-06-21 15:38:04 +02:00
José Valim
d2799bade3
Blame badarg on apply/3 for better error messages
2018-06-21 14:24:28 +02:00
José Valim
22245a44fe
Only show mismatch hints for fn+do/end
2018-06-21 14:08:30 +02:00
José Valim
faa0e84fa6
Revert "Support for map.field in guards"
...
Let's explore alternatives before settling on this one.
2018-06-21 10:40:19 +02:00
José Valim
969b9e1d2a
Clarify the behaviour of dynamic remote calls in guards
2018-06-21 09:41:40 +02:00
José Valim
08eabd803e
Document long running processes pitfall in mix cmd, closes #7495
2018-06-21 00:17:26 +02:00
José Valim
6827a98cce
Update CHANGELOG and deprecations
2018-06-21 00:02:09 +02:00
José Valim
c024b0eeb2
Add handle_continue/2 and deprecate super in GenServer callbacks
2018-06-20 23:53:55 +02:00
José Valim
5f31e5b146
Allow map.field in guards for Erlang/OTP 21+
2018-06-20 23:18:44 +02:00
José Valim
d27062c8ec
Add Code.purge_compiler_modules/0
...
Closes #7047
2018-06-20 20:51:05 +02:00