Commit Graph
1616 Commits
Author SHA1 Message Date
José Valim c107a2fe26 Release v1.6.4 2018-03-16 12:10:21 +01:00
José Valim 17853e63d8 Ensure bitstring comprehensions work on OTP 20.3 (#7453)
Closes #7452

Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
2018-03-14 21:45:47 +01:00
José Valim 45c7f828ef Release v1.6.3 2018-03-09 08:57:25 +01:00
José Valim c2a9c93f02 Release v1.6.2 2018-02-28 10:35:19 +01:00
José Valim 966f8f74ae Bring add_doc/6 back, closes #7335 2018-02-10 11:07:30 +01:00
José Valim 0c81857622 Consistently raise for missing do option in definitions
Closes #7333.
2018-02-09 17:07:12 +01:00
José Valim 2b588dfb3e Release v1.6.1 2018-01-29 17:47:48 -02:00
José Valim 79ae08f962 Raise on invalid map syntax, closes #7268 2018-01-28 11:24:15 -02:00
José Valim 66cf08ea89 Support bitstrings in Collectable
Closes #7234
2018-01-21 13:25:25 +01:00
José Valim e89139bcf0 Only rearrange not in if explicitly opted-in 2018-01-19 10:54:19 +01:00
José Valim 63b8d0ba34 Release v1.6.0 2018-01-17 19:20:24 +01:00
José Valim 67e575eca7 Release v1.6.0-rc.1 2018-01-11 10:21:31 +01:00
José Valim 3dbefd7704 Fix precedence of & in regards to =, closes #7188 2018-01-09 14:14:04 +01:00
Andrea Leopardi 900043c7f2 Fix a typo in a heredoc-related warning
[ci skip]
2018-01-09 13:13:13 +01:00
José Valim d76c35818e Warn if heredoc is outdented, closes #7174 2018-01-07 17:47:52 +01:00
José Valim d02755530a Revert "Attempt to soft_purge modules, closes #7047"
Soft purging modules was badfun/badarg errors when
invoking left over anonymous functions.
2018-01-05 17:23:07 +01:00
José Valim adbbba118d Do not leak variables during optimizations, closes #7161 2018-01-01 12:04:52 +01:00
Donald Little 021a84aafe Return right side expression value on struct matching (#7160) 2017-12-30 18:37:17 +01:00
José Valim 27102e276d Release v1.6.0-rc.0 2017-12-24 23:22:23 +01:00
José Valim 3010cd3dc1 Provide better error messages for contextual operators
Such as | and ::

Closes #6835
2017-12-23 10:27:28 +01:00
José Valim f6a017dbc3 Add missing ; 2017-12-19 14:40:52 +01:00
José Valim 695915b586 Read the deprecated chunk directly as a list 2017-12-19 12:18:12 +01:00
Glauber Campinho 1d58413053 Introduce @deprecated (#7113) 2017-12-19 11:44:35 +01:00
Glauber Campinho b99306bb44 Remove multiple clauses warning for default values on bodiless clause (#7092) 2017-12-11 21:38:49 +01:00
José Valim 4d3cbcdaaa Introduce @since as non-warning definition annotation
Partially implements #7099.
2017-12-11 18:22:08 +01:00
José Valim 74f617399f Use a single table instead of digraph for tracking locals
This reduces the number of spawned ETS tables from 3 to 1
per local tracker and also removes the need for a separate
process.

Closes #7091.
2017-12-06 19:49:54 +01:00
Glauber Campinho 25dc8d8d4f Move boolean checks optimizations to Kernel (#7071) 2017-11-30 00:29:54 -02:00
Glauber Campinho e12a76eca9 Translate clauses for boolean check (#7069)
Warnings for unsafe variable on boolean checks stopped working after #7015 because
variables of the right clause are unbound on the left clause.

Fixes #7044
2017-11-28 11:56:13 -02:00
José Valim 6915de35a6 Attempt to soft_purge modules, closes #7047 2017-11-21 13:57:52 -02:00
jgmchan 882c2bdb24 Show better error if an anonymous function has default arguments 2017-11-16 13:53:28 -02:00
Glauber Campinho 96fcc7e2cc Remove dialyzer warnings from else in with clauses (#7031)
Add generated: true to guard clauses from else in with clauses

Resolves #6426
2017-11-15 20:53:57 +01:00
Glauber Campinho 9aeafeefbd Warn duplicate definitions in macros (#7037)
Closes #6637
2017-11-15 20:52:28 +01:00
Eric Meadows-Jönsson 1303d09f61 Fix precedence of bitwise XOR (^^^) in formatter (#7036)
Closes #7034.
2017-11-15 19:53:20 +01:00
José Valim d0e9fd38f8 Document and use new uniq: true flag when appropriate 2017-11-13 23:23:55 +01:00
Glauber Campinho 505c10e474 Support uniq: true in for comprehensions (#7020) 2017-11-13 23:00:53 +01:00
José Valim 1fd0f1d81c Add notes and TODOs to variable handling 2017-11-09 18:08:08 +01:00
Michał Muskała c6772ee2c8 Move andalso and orelse expansion to the erl pass (#7015)
Since they modify the AST the correct place for the transformation is not the
macro expansion like today, but rather the erlang pass.

A note for people running git blame:

This transformation was done in the first place to correct the error that is
raised by `erlang:andalso/2` and `erlang:orelse/2` in case the first argument
is not a boolean. The rewrite changes it from `:badarg` into
`{:badbool, op, value}`. The inlining of both functions into a case would be
done anyway in the erlang compiler.
2017-11-09 14:24:48 +01:00
José Valim 5ea7321562 Consider comments inside function calls
Closes #6994
2017-11-07 10:50:11 +01:00
José Valim ad190b0889 Raise on reserved tokens, closes #6532 2017-11-06 17:15:44 +01:00
José Valim 3e72f808ed Properly guard bare_warn to catch errors early 2017-11-03 19:53:30 +01:00
José Valim b4c8e86c5f Pass line and file to IO.warn whenever possible 2017-11-03 18:49:07 +01:00
José Valim 4f935aa942 Add Kernel.ParallelCompiler.async/1
This gives developers more control over the parallel compiler
and allows a single file to compile multiple modules in parallel
by spawning tasks.
2017-11-02 17:30:32 +01:00
Michał Muskała c95a877d38 Separate tracking structs from compile-time dependencies
This is a first step to limiting recompilations in case a struct is used in a
module, the "parent module" of the struct changes, but struct definition itself
does not change.

Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
2017-10-31 14:24:48 +01:00
José Valim 794928efe1 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 ba19fc8e50 Discard malformed lines in metadata
Closes #6980.
2017-10-27 00:47:09 +02:00
Blake Tan 554d595009 Better handling of non existing atoms (#6978) 2017-10-26 20:25:00 +02:00
José Valim 3d84aec0f9 Respect the user's choice on calls
Closes #6977
2017-10-26 13:19:21 +02:00
José Valim 7f8136915f 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 823957b677 Store the number of defaults in the definition Meta 2017-10-26 00:18:06 +02:00
José Valim d3a85bfd21 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