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 <tuncer.a...@gmail.com> Authored: Wed Jun 3 19:58:32 2015 +0200 Committer: Tuncer Ayaz <tuncer.a...@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)),