Commit Graph
71 Commits
Author SHA1 Message Date
José Valim 495c05d83f Make elixir_errors API more strict and consider :file in meta 2014-07-08 18:54:40 +02:00
José Valim 4c89a16fb1 Return explicit :ok from more functions 2014-07-05 13:43:52 +02:00
José Valim 9a5df6193a Fix the guard for this clause evaluates to false warning
Since the guard can be hidden inside if/unless, it is better
to have a more generic error, stating we will always get the
same result from an check/guard.
2014-07-03 00:58:02 +02:00
José Valim 55e885f5c5 Ensure we don't leak erlang terms on failure, closes #2303 2014-05-21 12:44:12 +02:00
José Valim be34a75124 Disabling :hygiene in quote is deprecated 2014-05-19 18:25:56 +02:00
José Valim ca6788113e Deprecations should go to standard_error 2014-05-16 22:39:56 +02:00
José Valim c22e8e85dc Convert exceptions to structs 2014-05-16 00:01:49 +02:00
James Fish be0564b536 Fix some dialyzer warnings 2014-04-30 00:44:40 +01:00
José Valim 0814d0b442 Properly format binary tokens on errors, closes #2144 2014-04-29 15:05:24 +02:00
James Fish 5cadeeea67 Fix some dialyzer warnings 2014-04-28 21:33:03 +01:00
José Valim 56f15d9f4e Do not add spaces after { and before }
This makes the source code consistent with the result
returned by inspect/2.
2014-04-21 19:06:35 +02:00
José Valim c37a244d66 Add Code.eval_file/2 2014-03-27 12:31:00 +01:00
José Valim 3d6dd50866 Remove native checks and improve typespecs 2014-03-08 12:46:16 -08:00
José Valim c07b0d0912 Remove deprecate code 2014-02-02 20:22:28 +01:00
José Valim e855a85c85 Merge branch 'issue-2022-warnings' of github.com:ShaneWilton/elixir into ShaneWilton-issue-2022-warnings
Conflicts:
	lib/elixir/test/elixir/kernel/warning_test.exs
	lib/iex/test/iex/helpers_test.exs
2014-02-01 09:35:49 +01:00
Shane 36d1dcd9cc Prefix all warnings with [warning]
We expose :elixir_errors.warn/2 and :elixir_errors.warn/3
The first is to be used when we have detailed caller information,
such as from a stacktrace. The second is useful when our only
context is a line number and filename.

Note also that the test for module redfinition is performed in
helpers_test.exs rather than in warning_test.exs Perhaps this is
something that should be moved.
2014-01-29 11:35:43 -05:00
José Valim 5f682023a6 Deprecate usage of @behavior in favor of @behaviour 2014-01-28 11:21:55 +01:00
José Valim 0aff2a3139 Compile with relative paths and include apps in stacktraces
Closes #1964, closes #1861
2014-01-07 11:30:44 +01:00
José Valim 254065d3c4 Clean up synax_error, asstions and merge mechanisms 2013-12-29 14:22:45 +01:00
José Valim d39401e2d3 Start expanding aliases on their own 2013-12-18 10:40:42 +01:00
José Valim e0354005ea Simplify get_opt(internal) handling 2013-11-25 09:06:01 +01:00
José Valim abec6af3ac Move function/macro definitions to Kernel 2013-11-23 10:17:57 +01:00
Samuel Tonini 427e5ed712 use a separat compilation status per parallel compilation 2013-11-03 16:52:56 +01:00
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