-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
"failed to determine package fingerprint for build script" caused by a symlink pointing to an unreadable directory #9881
Comments
Thanks for the report! Cargo needs to follow symlinks, as what they point to may impact the build. However, for the purpose here, I think it would be fine to ignore errors reading the contents of a symlink destination. One suggestion I have for your |
I see there's a a test, build_script_scan_eaccess, that specifically checks that the |
This comment has been minimized.
This comment has been minimized.
Oh whoops, a mistake on my side, going to unassign myself. @rustbot release-assignment |
Hm, so I can't offhand think of a really clean way to deal with that. My only idea is to pass a flag into However, considering this more, maybe it is good to provide an error message early on, rather than later when publishing? That is, maybe this should just be closed? Another thought is that this is essentially the same as #9528. I'm wondering if the suggestions there might be more in line? Sorry, this may not have been as E-easy as I thought! But if you want to dig in and consider what might be a good behavior, it would be appreciated. |
I'm not too familiar in the fingerprinting aspect of cargo, but I can't think of a scenario where we want to calculate the fingerprint of inaccessible files and later on not use the file for publishing? If there's no such scenario, I think it's better to improve the error message. If there is indeed some edge cases, we might want to consider providing a clear way to ignore it.
I'd argue this is a different case. We want to limit the walker in #9528 rather than letting it running indefinitely, but here we can't even walk in the first place. |
Yea, improving the error message sounds good, though I'm uncertain of exactly how or what a better message would be. |
@tavianator - facing the same issue on version 1.80.0, is there a fix found for the same issue? |
Problem
If a project with a build script has a symbolic link pointing to somewhere unreadable, cargo build fails.
Steps
Possible Solution(s)
I suggest not following symbolic links when calculating the fingerprint.
I actually ran into this with a symlink to /, which caused
meaning it was trying to recursively scan my whole file system.
Notes
Output of
cargo version
:The text was updated successfully, but these errors were encountered: