Commit Graph
48 Commits
Author SHA1 Message Date
James Fish f751deea85 Fix elixir_errors.erl specs to include binary path 2013-10-22 18:23:35 +01:00
José Valim 4b317a75d8 Save typespecs attributes with proper line numbers, closes #1613 2013-09-29 13:15:33 +02:00
José Valim 212acf437a Provide better exceptions for invalid unquote args, closes #1680 2013-09-11 12:19:41 -03:00
José Valim 14272c98b4 Improve invalid match and guard errors, closes #1673 2013-09-11 11:21:10 -03:00
José Valim 0510512375 Deprecate to_binary in favor of to_string
We also rename Binary.Chars to String.Chars.

As Binary.Chars was the protocol used for interpolation,
it is semantically correct to have a protocol that works
on strings, instead of raw binaries.
2013-08-22 12:19:30 +02:00
José Valim 8b02a2a7a0 Convert external functions into quoted expressions 2013-08-20 23:52:00 +02:00
José Valim ff9aba4350 Handle unsafe vars inside or/and 2013-08-14 13:24:12 +02:00
José Valim db47bd56b4 Add Path.relative_to_cwd and rely on it when generating stacktraces 2013-08-14 12:36:54 +02:00
José Valim 34b6e17a1b Fix shadowing warning in case with function, closes #1524 2013-08-02 13:04:03 +02:00
José Valim 3ebd7bbdb7 Allow defmacrocallback to be specified in Behaviour 2013-07-25 13:05:26 +02:00
José Valim 888155ee08 Do not re-use stacktraces on IEx, closes #1486
This commit also cleans up error normalization throughout Elixir.
2013-07-24 16:43:54 +02:00
José Valim fecace0a77 Update dyalizer task and fix some of the reports 2013-07-20 17:21:21 +02:00
José Valim 67e9cb5b05 Improve use of operator has no effect messages, closes #1431 2013-07-16 11:23:55 +02:00
José Valim 35d019559d Remove the need for Inspect.Utils.return and Inspect.Algebra.text 2013-07-05 23:19:39 +02:00
José Valim b335b1663d Rename Binary.Inspect -> Inspect and Wadler -> Inspect.Algebra 2013-07-05 22:15:16 +02:00
José Valim 4ae58d3bf4 Do not try to parse arguments for undefined functions 2013-07-04 11:16:14 +02:00
José Valim 25f82dcb46 Go directly through :elixir_errors.warn 2013-06-30 10:42:57 +02:00
José Valim 1d8e39a2df Only change compilation status if warnings_as_errors 2013-06-15 09:46:10 +02:00
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