intellij-erlang
intellij-erlang copied to clipboard
plugin doesn't detect included files in the apps built with rebar3
To reproduce, create a simple app with rebar3 new app testapp, create include directory, put a hrl file with a simple define there and include this file into any of .erl files of the project with the -include("...'). directive. All's fine, it's green. Then do rebar3 compile and suddenly -include("...'). row is in the red 'Unresolved include: file not found' state. include_lib works though.
rebar3 apps have different path to the ebin directory - ./_buid/default/lib/theapp/ebin, and there could be many such directories (vary by the default part). rebar3 release apps have yet another structure, it's ./_buid/lib/theapp/ebin, ./_buid/lib/dep1/ebin, ./_buid/lib/depn/ebin
I know there's already a ticket for support of rebar3, but this problem has smaller scope, it's just about fixing search path for include files when the _build directory exists with the compiled data.
Update: easily fixed by marking the _build directory as excluded.
Rebar _build directory should be marked as excluded automatically if a project is Rebar3 project. Marking this as Usability improvement
@kvakvs But If I marked the _build directory as excluded, there are some unresolved problems:

_build contains libraries checked out by Rebar, so it should be smarter than just simple exclude.