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:24 UTC

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

rebar_utils: explain pdict use


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

Branch: refs/heads/import
Commit: 8559c5f1c5f2093bf8c36c0f32fb1f477c4e6905
Parents: 6e7ec60
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Wed Jun 3 19:58:32 2015 +0200
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Wed Jun 3 20:04:30 2015 +0200

----------------------------------------------------------------------
 src/rebar_utils.erl | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/8559c5f1/src/rebar_utils.erl
----------------------------------------------------------------------
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
index c9f3f5d..f1aeef0 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -403,9 +403,14 @@ patch_env(Config, [E | Rest]) ->
 %% ====================================================================
 
 otp_release() ->
-    %% We cache the return of otp_release1, since otherwise, we're repeatedly
-    %% reading the same file off the hard drive and generating warnings if they
-    %% aren't there.
+    %% NOTE: All and any pdict use has been erased from rebar a long
+    %% time ago in a big refactoring, and while extra processes (think
+    %% base_compiler) may have to re-cache the vsn string, this is
+    %% tolerable as an exception. After all, it's a write-once value.
+    %%
+    %% We cache the return of otp_release1, since otherwise, we're
+    %% repeatedly reading the same file off the hard drive and
+    %% generating warnings if they aren't there.
     case erlang:get(otp_release_cache) of
         undefined ->
             Vsn = otp_release1(erlang:system_info(otp_release)),