Skip to content

Commit 66d8cdc

Browse files
author
José Valim
committed
Update CHANGELOG and error messages
1 parent 3a0b498 commit 66d8cdc

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
# v0.12.1-dev
22

33
* Enhancements
4+
* [ExUnit] Support `:include` and `:exclude` configuration options to filter which tests should run based on their tags. Those options are also supported via `mix test` as `--include` and `--exclude`
5+
* [ExUnit] Allow doctests to match against `#MyModule<>`
46

57
* Bug fixes
8+
* [CLI] Abort when a pattern given to elixirc does not match any file
9+
* [Float] Fix `Float.parse/1` to handle numbers of the form "-0.x"
10+
* [IEx] Improve error message for `IEx.Helpers.r` when module does not exist
11+
* [Mix] Ensure `deps.get` updates origin if lock origin and dep origin do not match
612
* [Typespec] Fix conversion of unary ops from typespec format to ast
713

814
* Deprecations
915
* [Kernel] Do not leak clause heads. Previously, a variable defined in a case/receive head clauses would leak to the outer scope. This behaviour is deprecated and will be removed in the next release.
1016

1117
* Backwards incompatible changes
18+
* [GenFSM] GenServer now stops on unknown event/sync_event requests
19+
* [GenServer] GenServer now stops on unknown call/cast requests
1220
* [Kernel] Change how `->` is represented in AST. Now each clause is represented by its own AST node which makes composition easier. See commit 51aef55 for more information.
1321

1422
# v0.12.0 (2013-12-15)

lib/iex/lib/iex/helpers.ex

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ defmodule IEx.Helpers do
6969
raise ArgumentError, message: "expected a binary or a list of binaries as argument"
7070
end
7171

72-
{ found, not_found } = Enum.map(files, &Path.expand(&1, path)) |> Enum.partition(&File.exists?/1)
72+
{ found, not_found } =
73+
files
74+
|> Enum.map(&Path.expand(&1, path))
75+
|> Enum.partition(&File.exists?/1)
7376

7477
unless Enum.empty?(not_found) do
75-
IO.puts IEx.color(:eval_error, %s[Cannot find #{Enum.join(not_found, ", ")}])
76-
unless Enum.empty?(found) do
77-
IO.puts IEx.color(:eval_info, "(remaining file(s) will be compiled)")
78-
end
78+
raise ArgumentError, message: "could not find files #{Enum.join(not_found, ", ")}"
7979
end
8080

8181
{ erls, exs } = Enum.partition(found, &String.ends_with?(&1, ".erl"))
@@ -315,7 +315,10 @@ defmodule IEx.Helpers do
315315
source = source(module)
316316
cond do
317317
source == nil ->
318-
:nosource
318+
raise ArgumentError, message: "could not find source for module: #{inspect module}"
319+
320+
not File.exists?(source) ->
321+
raise ArgumentError, message: "could not find source (#{source}) for module: #{inspect module}"
319322

320323
String.ends_with?(source, ".erl") ->
321324
[compile_erlang(source) |> elem(0)]

0 commit comments

Comments
 (0)