Commit Graph
30 Commits
Author SHA1 Message Date
José Valim 21db352039 Always print warnings to stderr 2013-06-15 09:32:53 +02:00
Geoffrey Clements 93d5128db3 Implement José's suggestions.
1. Detect all places in elixir_errors:handle_file_warning/3 where we
output something with io
2. Change those places to go through an internal function that will
call elixir_compiler:get_opt and figure out if we should print to
stdout or stderr and act accordingly
3. In the same function above, whenever we print a warning as an error,
we should store somewhere that a warning as an error happened. I
recommend storing that in the elixir_code_server gen server
4. Provide a Code.compilation_status that would return it
2013-06-09 07:49:38 -04:00
Geoffrey Clements 6d98020923 Unwind a lot of the wrong direction, output warnings based on warnings-as-errors setting 2013-06-09 07:49:38 -04:00
José Valim 2c98c0999d An Elixir module now translates to Elixir.Module instead of Elixir-Module 2013-05-23 14:36:56 +02:00
José Valim 8907edca3e Improve error message for invalid patterns in guards and matches
Closes #1092
2013-05-19 21:39:44 +02:00
José Valim ddb87a96ca Private functions used by private macros no longer emit an unused warning, closes #885 2013-05-05 21:59:40 -06:00
José Valim f791bd117c Properly encode unicode binary chars, closes #961 2013-04-30 14:34:46 -07:00
José Valim f7cad1cffc Improve error messages 2013-03-27 09:54:00 -06:00
José Valim 19d402b7d5 Disable native compilation when on_load attributes is present
This is a work around an Erlang bug, see #845 for more information.
Closes #845.
2013-02-17 12:22:08 -07:00
José Valim cd51c80362 Tidy up and clean up quote API, closes #814 2013-02-03 12:14:18 -07:00
José Valim f4aed8e873 Reduce vars footprint in case/receive clauses 2013-02-02 13:20:59 -07:00
José Valim 008ee62f8b Take into account Erlang may pass line numbers as none 2013-02-02 09:00:43 -07:00
José Valim 89cbe93bba The AST now allows metadata to be attached to each node
This means the second item in the AST is no longer an integer
(representing the line), but a keywords list. Code that relies
on the line information from AST or that manually generate AST
nodes need to be properly updated.
2013-01-21 15:42:03 -07:00
José Valim ec68b7dd8a Compile specs and callbacks to @spec and @callback so they are easier to access 2012-11-05 10:26:02 +01:00
José Valim 8b981efecd Improve shadowed variable warning 2012-11-03 09:15:46 +01:00
José Valim 01f9518899 Keep user's given name when rebinding variables
The following code:

    counter = 1
    counter = 2

Is now rewritten internally to:

    counter   = 1
    counter@1 = 2

Which gives us a couple things:

1. Better debugging
2. We can now show warnings for rebound variables not used

Elixir also keeps `_@` prefix to store internal variables
(for example, `_@1`, `_@MODULE`, etc).

Closes #607.
2012-11-01 12:37:08 +01:00
Yurii Rashkovskii 4906fac3cf Remove dialyzer warnings from elixir_errors 2012-10-31 06:05:57 -07:00
José Valim d75fb11dc4 Disable internal as soon as core is fully compiled
This allows us to compile callbacks for the following
modules, which would trigger missing behaviour warnings
otherwise.
2012-10-28 22:33:13 +01:00
Yurii Rashkovskii baa28932f9 Keywords are no longer sorted 2012-10-17 00:06:41 -07:00
ILYA Khlopotov 3c1b93f514 Fixing bug introduced in 'Protocols are powered by behaviours...'(11f934b) 2012-10-12 10:53:49 -07:00
José Valim 11f934b74a Protocols are powered by behaviours behind the scenes 2012-10-08 20:13:45 +02:00
José Valim 30e86ccf07 Optimize if/cond clauses when possible, rely more on erl warnings 2012-07-26 11:21:06 +02:00
José Valim 117d09509c Rename __MAIN__ to Elixir, closes #390 2012-07-22 12:49:36 +02:00
José Valim 9a6d15af53 Warn when unsupported macro is invoked inside guards 2012-07-20 17:53:34 +02:00
José Valim 49501ef59e Improve error messages with terminators 2012-07-20 13:04:33 +02:00
José Valim 90650b334e Improve error messages for unterminated strings, sigils and heredocs 2012-07-20 11:38:49 +02:00
José Valim ea1b07e81e Do not automatically forward tasks, move some logic to Mix.SCM 2012-07-19 18:18:12 +02:00
José Valim 6c5b3134af Add function_exported?, improve warnings for behaviors 2012-07-16 15:29:29 +02:00
José Valim 1b4603160c Add elixir's parse transform to be used with erlang code 2012-07-12 11:29:46 +02:00
José Valim d5031b6347 Move all code to erlang style apps 2012-07-05 20:20:16 +02:00