You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2015/09/23 14:29:30 UTC

[36/50] rebar commit: updated refs/heads/import to 5dea85d

erlc: do not crash if dep file cannot be found


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/ded3be6e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/ded3be6e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/ded3be6e

Branch: refs/heads/import
Commit: ded3be6e519b3192bc19671f2b44efe2dc004573
Parents: a371387
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Wed Jun 3 21:42:11 2015 +0200
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Mon Jun 8 01:05:12 2015 +0200

----------------------------------------------------------------------
 src/rebar_erlc_compiler.erl | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/ded3be6e/src/rebar_erlc_compiler.erl
----------------------------------------------------------------------
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl
index 937fe5f..5c33239 100644
--- a/src/rebar_erlc_compiler.erl
+++ b/src/rebar_erlc_compiler.erl
@@ -410,6 +410,8 @@ update_erlcinfo(G, Dirs, Source) ->
                     %% The file doesn't exist anymore,
                     %% erase it from the graph.
                     %% All the edges will be erased automatically.
+                    ?WARN("File missing. Remove from dep graph:~n~s~n",
+                          [Source]),
                     digraph:del_vertex(G, Source),
                     modified;
                 LastModified when LastUpdated < LastModified ->
@@ -439,6 +441,9 @@ update_max_modified_deps(G, Source) ->
     digraph:add_vertex(G, Source, MaxModified),
     MaxModified.
 
+modify_erlcinfo(_G, Source, 0, _Dirs) ->
+    ?WARN("modify_erlcinfo: failed to open file:~n~s~n", [Source]),
+    unmodified;
 modify_erlcinfo(G, Source, LastModified, Dirs) ->
     {ok, Fd} = file:open(Source, [read]),
     Incls = parse_attrs(Fd, []),