José Valim
0ce62a2add
Rely on IO.warn whenever possible
2019-01-18 14:59:20 +01:00
José Valim
d85ed42765
Update removal and deprecation annotations
...
In particular, all deprecated code would be removed on v2.0,
so we don't need to annotate dperecated code with a TODO to
remove it on v2.0.
2018-12-21 13:27:06 +01:00
Glauber Campinho
741dfda9f4
Let the undefined function error be performed in Elixir-land ( #8231 )
...
Refers to #5800
2018-10-01 12:22:38 +02:00
José Valim
36718cb41b
Correctly tag struct invocations, closes #8097
2018-08-16 23:56:47 +02:00
Michał Muskała
d76f150274
Use scoped deterministic counters in AST expansion
...
Signed-off-by: José Valim <jose.valim@plataformatec.com.br >
2018-08-04 12:56:01 +02:00
José Valim
f2415dd06c
Revert "Use deterministic counters in AST expansion"
...
Unfortunately it is common to have macros that invokes macros
from other modules, leading to mixed quoted expressions causing
the counters to be mixed.
We would need to scope the counters to the caller.
This reverts commit f04f46c49d .
2018-08-04 12:29:03 +02:00
Michał Muskała
ffb931a5ac
Fix all compiler warnings ( #7992 )
2018-07-27 16:42:24 +02:00
Michał Muskała
f04f46c49d
Use deterministic counters in AST expansion
...
When the module is being compiled, we use deterministic counters instead
of random ones. This should help with most cases of undeterministic
source code or .beam files.
Closes #7955
2018-07-25 00:10:02 +02:00
Michał Muskała
4229536799
Inline construction of remote erlang calls in compiler
2018-07-25 00:10:02 +02:00
José Valim
75541cf472
Condititionally compile and lazily compute __STACKTRACE__ ( #7648 )
...
Erlang/OTP 20 warns if the stacktrace is read outside of a
catch/rescue. This commit mirrors this behaviour by consistently
warning on `System.stacktrace/0` being used outside of a
catch/rescue.
Erlang/OTP 21 warns whenever System.stacktrace/:erlang.get_stacktrace
are used. Therefore we need to promote the usage of `__STACKTRACE__`
and make sure to conditionally compile it according to the OTP version.
This requires changes to the Exception normalization mechanism
so we compute `__STACKTRACE__` only when strictly required.
In future Elixir releases, `System.stacktrace/0` will warn when
used even inside catch/rescue.
2018-05-07 15:33:36 +02:00
José Valim
11a0b39ad4
Move stdlib deprecations to @deprecated attribute ( #7637 )
2018-05-03 20:31:34 +02:00
José Valim
f416a685fb
Deprecate outdated Registry.start_link/2
2018-02-12 10:48:00 +01:00
José Valim
b8bf33beff
Bring add_doc/6 back, closes #7335
2018-02-10 11:07:19 +01:00
Andrea Leopardi
48e914dd3a
Hard-deprecate some things for 1.7 ( #7139 )
2017-12-24 21:32:56 +01:00
José Valim
ed98604dc3
Deprecate Range.range? in favor of pattern matching
2017-10-17 19:54:03 +02:00
José Valim
a81a17b3b0
Deprecate Keyword.replace/3 and Map.replace/3
...
`replace!` was introduced to mirror `update!` but without the
anonymous function. Given there is no `update`, we should not
introduce a `replace` until we are sure of the semantics we
want for update.
2017-10-04 13:43:07 +02:00
José Valim
0b0ab9f8ef
Add Code.Identifier to hold shared identifier logic throughout Elixir
2017-08-22 13:22:26 +02:00
José Valim
43a4720b1a
Start v1.6.0-dev
2017-06-25 13:49:50 +02:00
José Valim
978b8450df
Deprecate Enum.filter_map/Stream.filter_map
2017-05-28 17:06:58 +02:00
Eksperimental
ad167e2e95
Sort deprecation clauses alphabetically in :elixir_dispatch ( #6135 )
2017-05-23 10:01:07 +02:00
José Valim
07d40af48f
Add Exception.blame/3 and Exception.blame_mfa/3 ( #6127 )
2017-05-22 23:58:14 +02:00
Eksperimental
c8d6fb0054
Deprecation of "strip" functions in String module ( #6128 )
2017-05-22 10:48:01 +02:00
Michał Muskała
170019c869
Make sure System.stracktrace is first thing done in the handler ( #6119 )
...
If any of the functions catches an error, we'd get a wrong trace
2017-05-18 12:27:17 +02:00
Jeff Kreeftmeijer
efa05882d0
Restore (deprecated) Integer.to_char_list/2 ( #5928 )
2017-03-25 14:05:54 +01:00
Aleksei Magusev
84b67b5b95
Rename elixir_exp module to elixir_expand
2017-02-19 21:57:50 +01:00
Aleksei Magusev
a729847db6
Rename m/2 helper macro to key/2 in the main header file
2017-02-19 21:56:05 +01:00
José Valim
8e2ebf739b
Split erl and ex passes in elixir_def
2017-02-19 13:01:13 +01:00
José Valim
ff3fc7ef43
Unify local handling in elixir_def
2017-02-18 23:36:30 +01:00
José Valim
152cf2616b
Move case inlining out of Elixir pass
2017-02-16 18:24:25 +01:00
Andrea Leopardi
b6e1beb9b3
Hard deprecate GenEvent and provide alternatives in its docs ( #5705 )
2017-01-26 23:56:41 +01:00
Andrea Leopardi
dc995c2a95
Fix a deprecation in elixir_dispatch
2016-12-03 17:51:19 +01:00
Andrea Leopardi
0f462ab211
Move a bunch of hard deprecations to elixir_dispatch ( #5524 )
2016-12-03 17:23:58 +01:00
Andrea Leopardi
b25033bb4b
Hard-deprecate the "char_list" spelling ( #5517 )
2016-12-01 21:51:47 +01:00
Andrea Leopardi
69683d1674
Deprecate String.rjust/2,3 and String.ljust/2,3 ( #5516 )
2016-12-01 12:59:43 +01:00
Andrea Leopardi
78eb77148f
Hard-deprecate the Set module ( #5513 )
...
It will be removed in Elixir 2.0.
2016-12-01 10:28:09 +01:00
Andrea Leopardi
5633571372
Hard-deprecate String.*strip/1,2 functions ( #5508 )
2016-12-01 10:16:49 +01:00
José Valim
34052cfca0
Emit compilation warnings for HashDict, HashSet and Dict
2016-07-23 12:31:12 +02:00
José Valim
584f49f88c
Do not attempt to load modules that have not been required, closes #4900
...
Signed-off-by: José Valim <jose.valim@plataformatec.com.br >
2016-06-29 01:21:53 +01:00
José Valim
5f34ad6dc7
Remove elixir_counter in favor of unique_integer
...
Signed-off-by: José Valim <jose.valim@plataformatec.com.br >
2016-06-15 15:25:28 +02:00
José Valim
c87a7dbf26
Add @enforce_keys to defstruct, defexception and friends
2016-05-26 13:26:58 +02:00
Eric Entin
b15d641e42
Add mix xref --callers M.f/a ( #4683 )
2016-05-25 21:53:42 +02:00
Eric Entin
0395bac1c1
Warn for remote calls that cannot be resolved at compile time ( #4639 )
2016-05-22 11:20:45 +02:00
eksperimental
4ceb41e71b
Formmating: Add white space around vertical bar ( #4507 )
2016-04-25 00:55:49 +02:00
Wojtek Mach
743e8c7ed1
Track {module, function, arity} imports and warn on unused ones
...
Example:
Say, there's following file:
# example.exs
import String, only: [upcase: 1, downcase: 1]
import Enum
IO.puts upcase("Hello")
Before this patch:
# $ elixir example.exs
# HELLO
# warning.exs:2: warning: unused import Enum
After this patch:
# $ elixir example.exs
# HELLO
# example.exs:1: warning: unused import String.downcase/1
# example.exs:2: warning: unused import Enum
2016-02-28 19:53:02 +01:00
José Valim
4bce6d063a
Keep metadata when rewriting assertions
2015-08-24 00:19:00 +02:00
José Valim
80fd98f01a
Streamline aliases and imports in lexical tracker
...
Aliases should not mark nodes as compile or runtime
since it receives the alias to be expanded. The
expanded alias is always called later though as a
remote dispatch.
Imports should always mark nodes as compile time,
since they are compile time dependencies.
Finally, ensure compile nodes have higher priority
over runtime ones.
2015-07-22 09:59:31 +02:00
José Valim
d25d7046e5
Split compile and runtime in lexical tracker
2015-07-21 23:28:07 +02:00
José Valim
7642f97691
Ensure we quote proper file on exceptions
2015-04-02 18:37:56 +02:00
eksperimental
61675c3ea8
Add space after comma: Format consistently
2015-03-17 22:55:27 +07:00
José Valim
d31c12100a
Refactor and add new rewrite rules
2014-10-06 14:55:38 +02:00