所以按照本教程:
https://github.com/evanmiller/ChicagoBoss/wiki/An-Evening-With-Chicago-Boss
一切都像一个魅力,除了我不能使用“用户”作为模型名。最小用例:
-module(customer, [Id, Name, PasswordHash]).
-compile(export_all).
这将正常工作。
-module(user, [Id, Name, PasswordHash]).
-compile(export_all).
这将堆栈跟踪,并且在 上./rebar compile
,它会抛出:
ERROR: pre_compile failed while processing /Users/abe/github/awesome-name: {'EXIT',{{badmatch,{error,["code reload failed: user"]}},
[{boss_load,load_all_modules,3,
[{file,"src/boss/boss_load.erl"},{line,30}]},
{boss_load,load_all_modules_and_emit_app_file,2,
[{file,"src/boss/boss_load.erl"},{line,44}]},
{boss_rebar,compile,4,
[{file,"/Users/abe/github/ChicagoBoss/priv/rebar/boss_rebar.erl"},
{line,85}]},
{boss_plugin,pre_compile,2,
[{file,"priv/rebar/boss_plugin.erl"},{line,105}]},
{rebar_core,run_modules,4,[]},
{rebar_core,execute,5,[]},
{rebar_core,process_dir1,6,[]},
{rebar_core,process_commands,2,[]}]}}
{db_adapter, mock}
和都会发生这种情况{db_adapter, mongo}
。
有人知道发生了什么吗?用户关键字是否保留在某处?如果是的话,我在文档中找不到它...