遵循本教程:
https://github.com/evanmiller/ChicagoBoss/wiki/An-Evening-With-Chicago-Boss
除了我不能使用“user”作为模型名称外,一切都像魅力一样。最小用例:
-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}
都会发生这种情况。
有人知道发生了什么事吗?是否在某处保留了用户关键字?如果它是......我无法在文档中找到它。