Discussion:
[erlang-patches] Dialyzer Bug in 17.3: can not get core Erlang code
unknown
2014-10-01 22:48:57 UTC
Permalink
There is a problem in 17.3 when using the compile options to generate
core Erlang source code. A patch for the problem is below. The problem
with generate errors like "Could not get core Erlang code for:" for each
file that was compiled with warnings_as_errors.

diff --git a/lib/dialyzer/src/dialyzer_utils.erl
b/lib/dialyzer/src/dialyzer_utils.erl
index 4e2ec67..76fe645 100644
--- a/lib/dialyzer/src/dialyzer_utils.erl
+++ b/lib/dialyzer/src/dialyzer_utils.erl
@@ -451,6 +451,9 @@ cleanup_compile_options([asm|Opts]) ->
Opts;
cleanup_compile_options([from_core|Opts]) ->
Opts;
+%% compile:forms/2 doesn't understand warnings_as_errors
+cleanup_compile_options([warnings_as_errors|Opts]) ->
+ Opts;
%% The parse transform will already have been applied, may cause
problems if it
%% is re-applied.
cleanup_compile_options([{parse_transform, _}|Opts]) ->
unknown
2014-10-05 18:07:22 UTC
Permalink
Post by unknown
There is a problem in 17.3 when using the compile options to
generate core Erlang source code. A patch for the problem is below.
The problem with generate errors like "Could not get core Erlang
code for:" for each file that was compiled with warnings_as_errors.
diff --git a/lib/dialyzer/src/dialyzer_utils.erl
b/lib/dialyzer/src/dialyzer_utils.erl
index 4e2ec67..76fe645 100644
--- a/lib/dialyzer/src/dialyzer_utils.erl
+++ b/lib/dialyzer/src/dialyzer_utils.erl
@@ -451,6 +451,9 @@ cleanup_compile_options([asm|Opts]) ->
Opts;
cleanup_compile_options([from_core|Opts]) ->
Opts;
+%% compile:forms/2 doesn't understand warnings_as_errors
+cleanup_compile_options([warnings_as_errors|Opts]) ->
+ Opts;
Hmm, maybe this should (also) be fixed in lib/compiler.
unknown
2014-10-05 19:24:04 UTC
Permalink
Post by unknown
Post by unknown
There is a problem in 17.3 when using the compile options to
generate core Erlang source code. A patch for the problem is below.
The problem with generate errors like "Could not get core Erlang
code for:" for each file that was compiled with warnings_as_errors.
diff --git a/lib/dialyzer/src/dialyzer_utils.erl
b/lib/dialyzer/src/dialyzer_utils.erl
index 4e2ec67..76fe645 100644
--- a/lib/dialyzer/src/dialyzer_utils.erl
+++ b/lib/dialyzer/src/dialyzer_utils.erl
@@ -451,6 +451,9 @@ cleanup_compile_options([asm|Opts]) ->
Opts;
cleanup_compile_options([from_core|Opts]) ->
Opts;
+%% compile:forms/2 doesn't understand warnings_as_errors
+cleanup_compile_options([warnings_as_errors|Opts]) ->
+ Opts;
Hmm, maybe this should (also) be fixed in lib/compiler.
I wasn't sure if that was important or a long-standing problem which is part of the reason for the email, rather than doing a github pull request. The fix in dialyzer_utils makes sense due to the other compile options that are being ignored, so this was the minimal change required to get 17.3 dialyzer working.
unknown
2014-10-09 07:26:38 UTC
Permalink
Thank you for your contribution.

We are currently investigating this issue.
I do not know at this moment if we are going to release a patch for this
or not.
Post by unknown
There is a problem in 17.3 when using the compile options to generate
core Erlang source code. A patch for the problem is below. The
problem with generate errors like "Could not get core Erlang code
for:" for each file that was compiled with warnings_as_errors.
diff --git a/lib/dialyzer/src/dialyzer_utils.erl
b/lib/dialyzer/src/dialyzer_utils.erl
index 4e2ec67..76fe645 100644
--- a/lib/dialyzer/src/dialyzer_utils.erl
+++ b/lib/dialyzer/src/dialyzer_utils.erl
@@ -451,6 +451,9 @@ cleanup_compile_options([asm|Opts]) ->
Opts;
cleanup_compile_options([from_core|Opts]) ->
Opts;
+%% compile:forms/2 doesn't understand warnings_as_errors
+cleanup_compile_options([warnings_as_errors|Opts]) ->
+ Opts;
%% The parse transform will already have been applied, may cause
problems if it
%% is re-applied.
cleanup_compile_options([{parse_transform, _}|Opts]) ->
_______________________________________________
erlang-patches mailing list
erlang-patches
http://erlang.org/mailman/listinfo/erlang-patches
--
/Henrik Nord Erlang/OTP
unknown
2014-10-13 10:13:55 UTC
Permalink
Hi,

[Michael Truog:]
Post by unknown
There is a problem in 17.3 when using the compile options to generate
core Erlang source code. A patch for the problem is below. The problem
with generate errors like "Could not get core Erlang code for:" for each
file that was compiled with warnings_as_errors.
After some investigations we've found that warnings are generated due
to missing behaviour modules.

Your patch has been included in commit 197a846 on the maint branch.

Thanks,

Hans Bolinder, Erlang/OTP team, Ericsson

Loading...