ErlyORM / boss_db

BossDB: a sharded, caching, pooling, evented ORM for Erlang
Other
277 stars 138 forks source link

Rebar cannot handle src/model with rebar-plugin-config set #199

Closed liuzhen closed 10 years ago

liuzhen commented 10 years ago

1 add rebar-plugin-config:

{plugin_dir, ["deps/boss_db/priv/rebar"]}. {plugins, [boss_db_rebar]}. {boss_db_opts, [{model_dir, "src/model"}]}.

2 at the app folder, run "rebar co"

Compiling src/model/register.erl failed: src/model/register.erl:2: syntax error before: '::' src/model/register.erl:6: no module definition ERROR: compile failed while processing /Users/***/rebar_abort

Sorry, I may totally get it wrong from the beginning, what should I expect from above config?

liuzhen commented 10 years ago

After I checked out the

https://github.com/ChicagoBoss/boss_db/blob/master/priv/rebar/boss_db_rebar.erl

and rename all the model files under "src/model/" to *.erlm, the plugin works as expected now.

Running rebar co from the project root handles the model files automatically.