-
Notifications
You must be signed in to change notification settings - Fork 46
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
Error building after deleting a file: can't copy '<deleted-file> doesn't exist or not a regular file #633
Comments
I'm having trouble understanding exactly what the problem is here. Are you deleting the file from inside the build base or deleting the file in the package sources? Is the file still referenced in the |
On my phone currently so can't check in detail, but as far as I remember:
Let me know if you can reproduce with that info or I need to provide you with a more concrete example |
Alright, I see it now. Here's the source of the error: https://github.com/pypa/setuptools/blob/f91fa3d9fc7262e0467e4b2f84fe463f8f8d23cf/setuptools/_distutils/file_util.py#L108-L110 It's pretty much the first thing that setuptools' copy function checks, and I don't see a way around it there. I think we might be able to modify the process that populates the "staged" package and explicitly remove dangling symlinks that match a Either way, there will still be a dead symlink left in the install base. Same would happen with CMake. |
I noticed recently that in ament_python packages, when building with
--symlink-install
, if I delete a file that was symlinked in thebuild
folder, then on the subsequent build I get the error:can't copy 'build/<deleted-file> doesn't exist or not a regular file
. Maybe it has to do with #592?to reproduce:
colcon build --symlink-install --packages-select package
data_files
ofsetup.py
colcon build --symlink-install --packages-select package
can't copy 'build/<deleted-file> doesn't exist or not a regular file
The workaround is simply to delete the build folder and try again but it would be nice if that wasn't necessary. Maybe you could delete automatically orphaned symlinks?
The text was updated successfully, but these errors were encountered: