-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
re-compilation is crashed for project that have dep with option src_dirs set to [{"src", [{recursive, true}]}] #2581
Comments
Seems there is workaround with using |
In some rare cases (see erlang#2581 for a sample interplay between plugins and recursive dep definitions with apps) there can be some interplay where a dependency declares recursive directories but the lookup for app files does not acknowledges these and causes problems. This patch simply ignores such cases by stripping options; this should have no backward compatibility impact since the value was just ignored before anyway, but will prevent crashes in hard-to-reproduce cases.
See if #2582 fixes it. |
#2582 fixes it (but with comment applied). Tested both with "{src_dirs, [{"src", [{recursive, false}]}]}", "{src_dirs, [{"src", [{recursive, true}]}]}". Seems works as expected. By the way, do you know is there any functional difference in compilation between specifing src_dirs option inside erl_opts and specifing src_dirs option directly in rebar.config? |
Not really, aside from making things far more confusing on the implementation side. They should be considered the same in terms of effects, but it was part of a cleanup where initially it was supported in erl_opts and at some point we extracted it because that's far more of a general path config than a compiler options, since non-compiler tools should consider it useful as well. |
I have an umbrella project, with several apps/libs depends on each other. When I working with one of such lib, I'd like to compile/run it just inside its own folder, for debug purposes. I also use
rebar3_path_deps
plugin to be able to reference the dependencies via relative path like that:So, I've noticed that when lib has the dependency with option
{src_dirs, [{"src", [{recursive, true}]}]}
, it can't be compiled the second time.Environment
Current behaviour
Re-compilation is crashed for project that have dep with option src_dirs set to [{"src", [{recursive, true}]}].
Expected behaviour
Re-compilation should not crash.
The text was updated successfully, but these errors were encountered: