summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/ISSUE_TEMPLATE.md31
-rw-r--r--src/rebar_base_compiler.erl8
-rw-r--r--src/rebar_prv_dialyzer.erl2
3 files changed, 40 insertions, 1 deletions
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..6d5a0c2
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,31 @@
+### Pre-Check ###
+
+- If you are filing for a bug, please do a quick search in current issues first
+- For bugs, mention if you are willing or interested in helping fix the issue
+- For questions or support, it helps to include context around your project or problem
+- Think of a descriptive title (more descriptive than 'feature X is broken' unless it is fully broken)
+
+### Environment ###
+
+- Add the result of `rebar3 report` to your message:
+
+```
+$ rebar3 report "my failing command"
+...
+```
+
+- Verify whether the version of rebar3 you're running is the latest release (see https://github.com/erlang/rebar3/releases)
+- If possible, include information about your project and its structure. Open source projects or examples are always easier to debug.
+ If you can provide an example code base to reproduce the issue on, we will generally be able to provide more help, and faster.
+
+### Current behaviour ###
+
+Describe the current behaviour. In case of a failure, crash, or exception, please include the result of running the command with debug information:
+
+```
+DEBUG=1 rebar3 <my failing command>
+```
+
+### Expected behaviour ###
+
+Describe what you expected to happen.
diff --git a/src/rebar_base_compiler.erl b/src/rebar_base_compiler.erl
index 6b8c7ca..5d54057 100644
--- a/src/rebar_base_compiler.erl
+++ b/src/rebar_base_compiler.erl
@@ -155,7 +155,13 @@ format_warnings(Source, Warnings) ->
format_warnings(Source, Warnings, []).
format_warnings(Source, Warnings, Opts) ->
- Prefix = case lists:member(warnings_as_errors, Opts) of
+ %% `Opts' can be passed in both as a list or a dictionary depending
+ %% on whether the first call to rebar_erlc_compiler was done with
+ %% the type `rebar_dict()' or `rebar_state:t()'.
+ LookupFn = if is_list(Opts) -> fun lists:member/2
+ ; true -> fun dict:is_key/2
+ end,
+ Prefix = case LookupFn(warnings_as_errors, Opts) of
true -> "";
false -> "Warning: "
end,
diff --git a/src/rebar_prv_dialyzer.erl b/src/rebar_prv_dialyzer.erl
index 82d2d07..fc13de1 100644
--- a/src/rebar_prv_dialyzer.erl
+++ b/src/rebar_prv_dialyzer.erl
@@ -260,6 +260,8 @@ read_plt(_State, Plt) ->
Result;
{error, no_such_file} ->
error;
+ {error, not_valid} ->
+ error;
{error, read_error} ->
Error = io_lib:format("Could not read the PLT file ~p", [Plt]),
throw({dialyzer_error, Error})