Skip to content

Commit

Permalink
use r3:do(compile); fix CSrc
Browse files Browse the repository at this point in the history
  • Loading branch information
vans163 committed Jan 6, 2024
1 parent 7aaa267 commit 8a6cadd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/rebar3_auto.app.src
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{application,rebar3_auto,
[{description,"Rebar3 plugin for auto compiling on changes"},
{vsn,"0.4.0"},
{vsn,"0.5.1"},
{registered,[]},
{applications,[kernel,stdlib,fs]},
{env,[]},
Expand Down
8 changes: 4 additions & 4 deletions src/rebar3_auto.erl
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ auto(Extensions) ->
% or we can flush after compile?
timer:sleep(200),
flush(),
rebar_agent:do(compile)
r3:do(compile)
end;
_ -> pass
end
Expand Down Expand Up @@ -140,13 +140,13 @@ listen_on_project_apps(State) ->
CSrcDir = filename:join(rebar_app_info:dir(AppInfo), "c_src"),
case filelib:is_dir(SrcDir) of
true ->
fs:start_link(fs_watcher, SrcDir),
fs:subscribe(fs_watcher);
fs:start_link(fs_watcher_src, SrcDir),
fs:subscribe(fs_watcher_src);
false -> ignore
end,
case filelib:is_dir(CSrcDir) of
true ->
fs:start_link(fs_watcher_csrc, SrcDir),
fs:start_link(fs_watcher_csrc, CSrcDir),
fs:subscribe(fs_watcher_csrc);
false -> ignore
end
Expand Down

0 comments on commit 8a6cadd

Please sign in to comment.