Use symlink_dir to create junctions on Windows instead of trying to use symbolic links in copy_link_internal - #152433
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
Junction points only work on directories, not files. A hard link or a file copy would be necessary if symlinks aren't available. |
31820df to
6e0c9f5
Compare
|
Well this seems to only be called to create junctions to directories (on Windows), otherwise I'd be seeing more privilege errors. |
|
So it sounds like |
|
@rustbot author I don't have much context on the details here (especially Windows) but generally speaking it seems plausible that this is a bug in the callsite? |
|
Reminder, once the PR becomes ready for a review, use |
6e0c9f5 to
4ce1afa
Compare
This comment has been minimized.
This comment has been minimized.
symlink_file on Windowssymlink_dir to create junctions on Windows instead of trying to use symbolic links in copy_link_internal
This comment has been minimized.
This comment has been minimized.
4ce1afa to
bbd34d2
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@rustbot ready I have moved the logic to the callsite. |
|
I should be able to look at this later today r? ChrisDenton |
|
lgtm @bors r+ rollup |
Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal` try-job: x86_64-gnu-distcheck
|
💔 I suspect this PR failed tests as part of a rollup After fixing the problem, consider running a try job for the failed job before re-approving. Link to failure: #161494 (comment) |
|
This pull request was unapproved. This PR was contained in a rollup (#161501), which was unapproved. |
|
💔 Test for 35a958f failed: CI. Failed job:
|
This comment has been minimized.
This comment has been minimized.
bbd34d2 to
cda45e5
Compare
|
I changed this to use |
This comment has been minimized.
This comment has been minimized.
… use symbolic links in `copy_link_internal`
cda45e5 to
9c78500
Compare
|
@bors try jobs=x86_64-gnu-distcheck |
This comment has been minimized.
This comment has been minimized.
Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal` try-job: x86_64-gnu-distcheck
|
@bors r+ |
Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal` Symbolic links require extra privileges on Windows, so this falls back to creating junctions in `symlink_file` when operating on a directory.
Rollup of 24 pull requests Successful merges: - #161586 (miri subtree update) - #161187 (add `Complex<T>` layout tests for straightforward targets) - #161524 (Put back `tests/rustdoc-gui/search-result-display.goml`) - #161592 (core: refactor tests/pattern.rs tests) - #161602 (Fix flakyness issue for `tests/rustdoc-gui/headers-color.goml`) - #152433 (Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal`) - #155254 (Recover on attribute in use tree) - #158695 (Replace `CrateDump` with the Debug impl from `CStore`) - #159456 (Fix the reporting of layout normalization failures in transmute checks) - #159940 (Eliminate some buggy `unreachable!()`s in `expand_[option_]env()`) - #160452 (-Ctarget-feature is not unsafe (any more)) - #161007 (tests/ui/union/union-nodrop.rs: fix typo "expressios") - #161166 (add crashtests [5/N], remove unused aux files ) - #161294 (add crashtests [6/N]) - #161552 (also trigger overflow FCW when going from overflow -> error) - #161569 (Bump cfg_aliases to 0.2.2) - #161573 (re-bless `pretty-std` on windows) - #161580 (Add codegen test for redundant bit mask after a range check) - #161588 (update eyre) - #161589 (std: reduce visibility of some internal OsStr related types) - #161598 ([Bootstrap] Pass exact CI `llvm-config` executable path) - #161601 (Path: use optimized is_empty() method) - #161604 (coretests: Add a few tests for backward multibyte predicate) - #161615 (interpret: make validate_c_variadic_compatible_ty public)
Rollup of 22 pull requests Successful merges: - #161586 (miri subtree update) - #161187 (add `Complex<T>` layout tests for straightforward targets) - #161524 (Put back `tests/rustdoc-gui/search-result-display.goml`) - #161592 (core: refactor tests/pattern.rs tests) - #161602 (Fix flakyness issue for `tests/rustdoc-gui/headers-color.goml`) - #152433 (Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal`) - #155254 (Recover on attribute in use tree) - #158695 (Replace `CrateDump` with the Debug impl from `CStore`) - #159456 (Fix the reporting of layout normalization failures in transmute checks) - #159940 (Eliminate some buggy `unreachable!()`s in `expand_[option_]env()`) - #160452 (-Ctarget-feature is not unsafe (any more)) - #161007 (tests/ui/union/union-nodrop.rs: fix typo "expressios") - #161552 (also trigger overflow FCW when going from overflow -> error) - #161569 (Bump cfg_aliases to 0.2.2) - #161573 (re-bless `pretty-std` on windows) - #161580 (Add codegen test for redundant bit mask after a range check) - #161588 (update eyre) - #161589 (std: reduce visibility of some internal OsStr related types) - #161598 ([Bootstrap] Pass exact CI `llvm-config` executable path) - #161601 (Path: use optimized is_empty() method) - #161604 (coretests: Add a few tests for backward multibyte predicate) - #161615 (interpret: make validate_c_variadic_compatible_ty public)
Rollup merge of #152433 - Zoxc:bootstrap-symlink, r=ChrisDenton Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal` Symbolic links require extra privileges on Windows, so this falls back to creating junctions in `symlink_file` when operating on a directory.
Rollup of 22 pull requests Successful merges: - rust-lang/rust#161586 (miri subtree update) - rust-lang/rust#161187 (add `Complex<T>` layout tests for straightforward targets) - rust-lang/rust#161524 (Put back `tests/rustdoc-gui/search-result-display.goml`) - rust-lang/rust#161592 (core: refactor tests/pattern.rs tests) - rust-lang/rust#161602 (Fix flakyness issue for `tests/rustdoc-gui/headers-color.goml`) - rust-lang/rust#152433 (Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal`) - rust-lang/rust#155254 (Recover on attribute in use tree) - rust-lang/rust#158695 (Replace `CrateDump` with the Debug impl from `CStore`) - rust-lang/rust#159456 (Fix the reporting of layout normalization failures in transmute checks) - rust-lang/rust#159940 (Eliminate some buggy `unreachable!()`s in `expand_[option_]env()`) - rust-lang/rust#160452 (-Ctarget-feature is not unsafe (any more)) - rust-lang/rust#161007 (tests/ui/union/union-nodrop.rs: fix typo "expressios") - rust-lang/rust#161552 (also trigger overflow FCW when going from overflow -> error) - rust-lang/rust#161569 (Bump cfg_aliases to 0.2.2) - rust-lang/rust#161573 (re-bless `pretty-std` on windows) - rust-lang/rust#161580 (Add codegen test for redundant bit mask after a range check) - rust-lang/rust#161588 (update eyre) - rust-lang/rust#161589 (std: reduce visibility of some internal OsStr related types) - rust-lang/rust#161598 ([Bootstrap] Pass exact CI `llvm-config` executable path) - rust-lang/rust#161601 (Path: use optimized is_empty() method) - rust-lang/rust#161604 (coretests: Add a few tests for backward multibyte predicate) - rust-lang/rust#161615 (interpret: make validate_c_variadic_compatible_ty public)
View all comments
Symbolic links require extra privileges on Windows, so this falls back to creating junctions in
symlink_filewhen operating on a directory.