Closed drobakowski closed 7 years ago
Great work! And even greater detailed explanation of an issue. I will add some of thought too regarding all options we have. 1) Moving files out of src is unwanted, but on other hand models are shared between apps in multi-app CB setups and having them outside specific app making sense. 2) renaming extension is a good option, it also may allow to extend models' files even more with non-Erlang features. I could propose extensions like bmf (boss model file) or bmd (boss model definition), both not used much. 3) both options together, at least as configuration options
I merged most of your changes at beta1 branch and going to deploy it to my projects too.
Looking deeper at this and taking in consideration use of parameterized modules all over CB, looks like a better and cleaner option is to compile whole project thru our own compiler. Easiest way seems to be to change of {src_dirs, ["src"]} to something else and make it ignore normal src dir.
We are using this branch for quite some time so far without problems. As I have seen the ongoing work in #256 I wanted to start this PR as a basis for discussion, maybe it can help to make a smoother transition to
rebar3
.In order to successfully compile an application based on
boss_db
andrebar3
, existing models which are located under thesrc
folder need to be moved to another non Erlang source folder - see the discussion on the rebar3 support page. This circumstance could be quite a problem for some projects like ChicagoBoss. Furthermore a new model compilation plugin is needed to letrebar3
compile the excluded model files from thesrc
folder - see rebar3_boss_db. You can find a running demo application includingdialyzer
warnings here - see Dialyzer warning. A failing one, because of the modelsrc
folder problematic, can be found here.What's included:
rebar2
projects - see rebar.config.scriptrebar3
plugin for compilingboss_db
models is needed - see rebar3_boss_db plugintest_db_*
lager
,poolboy
,redo
warnings_as_errors
- see f7490beOpen TODOS (help wanted):
src
folder - see rebar3 discussionrebar3
to3.2.0