Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upDo not resolve symlinks when finding crates. #29433
Conversation
rust-highfive
assigned
pnkfelix
Oct 28, 2015
This comment has been minimized.
This comment has been minimized.
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pnkfelix (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
|
P.S. If there's a way to cherry-pick this into stable, that would be really nice. |
This comment has been minimized.
This comment has been minimized.
|
If we're not going to use the result of |
This comment has been minimized.
This comment has been minimized.
|
I went with a minimal change, but I can certainly switch to "file exists" if that's what's preferred. Canonicalize saves lookups later, but can result in a completely different filename. In our case, the cloud builder creates symlinks of the form libcore-xyzzy.rlib -> /network/cas/$FILEHASH. Canonicalizing causes a "cannot find crate 'core'" error. The alternative is to not rely on the filename past this point, making sure to pass down rlib-ness (and possibly more) as a parameter. |
This comment has been minimized.
This comment has been minimized.
|
For reference, the behavior of resolving symlinks was added in #12474. I'm not sure if the original reason for adding that behavior is still relevant. @alexcrichton might have something to say about it? |
This comment has been minimized.
This comment has been minimized.
|
Apparently it does still matter. Okay, so I'll close this and rework it to not rely on the filename after canonicalization. |
taralx commentedOct 28, 2015
The resolved path may not end in '.rlib', causing us to try to read the
archive as an object file.