-
Notifications
You must be signed in to change notification settings - Fork 515
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
default include directory of app didn't work #2727
Comments
I cannot replicate this in general. Is this on a shared filesystem in a virtual machine? Those things end up often having bugs that exist nowhere else. Can you also specify which rebar3 versions you are using and responding to the standard template questions? They are there for a reason, they're usually helpful to help troubleshoot issues. |
EnvironmentRebar3 report Operating System: x86_64-pc-linux-gnu Source code structureNOTE: in a shared filesystem in a virtual machine aa Current behaviourlmqaq@ubuntu:/mnt/hgfs/project/game/aa$ rebar3 compile Expected behaviourcompile with no error. Other thingI try it on my home directory and it works well too. |
sry about that, i rewrite the issue responding to the standard template as a comment below. Please check it if you got time. |
Yeah if it works on the home directory and it works but not on the virtual machine filesystems, I assume the problem is with the virtual machine filesystem's semantics. We have a https://github.com/erlang/rebar3/blob/main/apps/rebar/src/rebar_file_utils.erl file that handles portable fast file operations by shelling out, and it's possible that in some cases the "copy directory to directory" semantics of a command like |
BACK_GROUND:
the rebar3 version is the lastest version.
when compile start, copy the file for each app to __build/xxx directory, when in unix enviroment, each directory will get 2 of them.
eg: __build/default/lib/<application_name>/include/include, it willl not happen in win32 enviroment.
BUG:
i download the source code from here and check the code, when compile, in file rebar_prv_compile.erl,
funtion copy_app_dirs/3 copy the directory from app_dir to out_dir, andthen jump to the mod rebar_file_utils, i print the source and
dest, and i found that the cmd in unix is like this => cp -Rp /mnt/hgfs/project/game/aa/apps/aa/include /mnt/hgfs/project/game/aa/_build/default/lib/aa/include, it will cp the directory /mnt/hgfs/project/game/aa/apps/aa/include to
/mnt/hgfs/project/game/aa/_build/default/lib/aa/include, which make the directory become /mnt/hgfs/project/game/aa/_build/default/lib/aa/include/include, there's two of include directory, which make compile process can
not find my *.hrl files and compile error occured.
FIX_SUGGESTION:
maybe the cp function can check if thereis directory, the cmd change to cp -Rp DirA* DirB or somthing else ???
The text was updated successfully, but these errors were encountered: