Przeglądaj źródła

ft: 修正 如果使用了 debug_info_key的时候 能正确编译 需要手动改动 eSync代码填写正确的 key

master
SisMaker 3 lat temu
rodzic
commit
06aa8edc11
2 zmienionych plików z 10 dodań i 3 usunięć
  1. +6
    -1
      src/eSync.erl
  2. +4
    -2
      src/sync/esUtils.erl

+ 6
- 1
src/eSync.erl Wyświetl plik

@ -14,7 +14,8 @@
getOnCSync/0,
setOnCSync/0,
setOnCSync/1,
swSyncNode/1
swSyncNode/1,
getDIK/0
]).
start() ->
@ -66,6 +67,10 @@ setOnCSync() ->
setOnCSync(Fun) ->
esSyncSrv:setOnCSync(Fun).
getDIK() ->
%% if use debug_info_key please return the key in this fun: {debug_info_key, xxx}
ok.

+ 4
- 2
src/sync/esUtils.erl Wyświetl plik

@ -76,7 +76,8 @@ getModOptions(Module) ->
Options5 = maybeAddCompileInfo(Options4),
%% add filetype to options (DTL, LFE, erl, etc)
Options6 = addFileType(Module, Options5),
{ok, Options6}
Options7 = lists:keyreplace(debug_info_key, 1, Options6, eSync:getDIK()),
{ok, Options7}
catch ExType:Error ->
logWarnings("~p:0: ~p looking for options: ~p. ~n", [Module, ExType, Error]),
undefined
@ -99,7 +100,8 @@ tryGetModOptions(Module) ->
Options5 = maybeAddCompileInfo(Options4),
%% add filetype to options (DTL, LFE, erl, etc)
Options6 = addFileType(Module, Options5),
{ok, Options6}
Options7 = lists:keyreplace(debug_info_key, 1, Options6, eSync:getDIK()),
{ok, Options7}
catch _ExType:_Error ->
undefiend
end.

Ładowanie…
Anuluj
Zapisz