Use symlink_dir to create junctions on Windows instead of trying to use symbolic links in copy_link_internal - #152433
Use symlink_dir to create junctions on Windows instead of trying to use symbolic links in copy_link_internal#152433Zoxc wants to merge 1 commit into
symlink_dir to create junctions on Windows instead of trying to use symbolic links in copy_link_internal#152433Conversation
|
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.
… use symbolic links in `copy_link_internal`
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` Symbolic links require extra privileges on Windows, so this falls back to creating junctions in `symlink_file` when operating on a directory.
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.
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.
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.
…uwer Rollup of 18 pull requests Successful merges: - #151061 (Build rustc and codegen backends with -Zembed-metadata=no) - #157949 (Allow self in const generics) - #158588 (trait_selection: fix assumptions-on-binders diagnostics) - #159954 (core: implement float conversion methods) - #160136 (Add `Default` implementation for `std::sync::Once`) - #160835 (resolver diagnostics: don't swallow labels and point out similar items as a note, not a label) - #161048 (Improve the ABI between the panic runtime and libstd) - #161292 (Add safety comments in alloc::Wtf8) - #161444 (Add some `rustc_type_ir` comments) - #161465 (Remove leftover immediate creation) - #152433 (Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal`) - #159098 (Add Arc/Rc::strong_count_from_raw) - #159282 (Update documentation for `-Zdump-dep-graph`) - #161401 (Remove fields from TypeKind: Bool, Char, Float and Int) - #161431 (bootstrap: (offload) be stricter about selected compiler and paths) - #161451 (Avoid arming the Windows TLS destructor guard in fibers) - #161463 (Add myself to mailmap) - #161476 (Use bitset for locals_with_use_data) Failed merges: - #161443 (add internal DSL for testing binders)
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.
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.
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.
|
@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
|
💔 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:
|
|
The job Click to see the possible cause of the failure (guessed by this bot) |
View all comments
Symbolic links require extra privileges on Windows, so this falls back to creating junctions in
symlink_filewhen operating on a directory.