rustyio / sync

On-the-fly recompiling and reloading in Erlang. Code without friction.
MIT License
749 stars 163 forks source link

Scan selected `src_dirs` does not work in rebar3 environment #78

Open vasu-dasari opened 6 years ago

vasu-dasari commented 6 years ago

I have a project importing a lot of projects. So, I wanted sync to scan a subset of directories. So, I made my sys.conf like this:

{sync, [
    {src_dirs, {replace, [
        {"/Users/vdasari/Developer/foo/_build/default/lib/foo/src", [{outdir,"./_build/default/lib/foo/ebin"}]}
    ]}}
]}

I am using lager for logging purposes which uses lager_transform and hence compile time options for my files is quite different. rebar3 is able to figure out all the options properly. But, for sync it expects me to specify all the options for compiling my foo/src.

It would be good if sync can figure out compile-time options as well so that my sys.conf could look like this.

{sync, [
    {src_dirs, {replace, [
        {"foo/src", []}
    ]}}
]}
vasu-dasari commented 6 years ago

I have a PR https://github.com/rustyio/sync/pull/79 to address this issue. It works for me. Please let me know what you think?