Skip to content

Use symlink_dir to create junctions on Windows instead of trying to use symbolic links in copy_link_internal - #152433

Open
Zoxc wants to merge 1 commit into
rust-lang:mainfrom
Zoxc:bootstrap-symlink
Open

Use symlink_dir to create junctions on Windows instead of trying to use symbolic links in copy_link_internal#152433
Zoxc wants to merge 1 commit into
rust-lang:mainfrom
Zoxc:bootstrap-symlink

Conversation

@Zoxc

@Zoxc Zoxc commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

Symbolic links require extra privileges on Windows, so this falls back to creating junctions in symlink_file when operating on a directory.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 10, 2026
@rustbot

rustbot commented Feb 10, 2026

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, Zalathar, clubby789, jieyouxu

@rust-log-analyzer

This comment has been minimized.

@ChrisDenton

Copy link
Copy Markdown
Member

Junction points only work on directories, not files. A hard link or a file copy would be necessary if symlinks aren't available.

@Zoxc
Zoxc force-pushed the bootstrap-symlink branch from 31820df to 6e0c9f5 Compare February 10, 2026 12:02
@Zoxc

Zoxc commented Feb 11, 2026

Copy link
Copy Markdown
Contributor Author

Well this seems to only be called to create junctions to directories (on Windows), otherwise I'd be seeing more privilege errors.

@ChrisDenton

Copy link
Copy Markdown
Member

So it sounds like symlink_dir should be being called and it's a bug that symlink_file is.

@Mark-Simulacrum

Copy link
Copy Markdown
Member

@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?

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 14, 2026
@rustbot

rustbot commented Feb 14, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@Zoxc
Zoxc force-pushed the bootstrap-symlink branch from 6e0c9f5 to 4ce1afa Compare February 22, 2026 16:01
@rustbot

This comment has been minimized.

@Zoxc Zoxc changed the title Create junctions instead of trying to use symbolic links in symlink_file on Windows Use symlink_dir to create junctions on Windows instead of trying to use symbolic links in copy_link_internal Feb 22, 2026
@rust-bors

This comment has been minimized.

… use symbolic links in `copy_link_internal`
@Zoxc
Zoxc force-pushed the bootstrap-symlink branch from 4ce1afa to bbd34d2 Compare August 21, 2026 14:29
@rustbot

rustbot commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

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.

@Zoxc

Zoxc commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@rustbot ready

I have moved the logic to the callsite.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 21, 2026
@ChrisDenton

Copy link
Copy Markdown
Member

I should be able to look at this later today

r? ChrisDenton

@ChrisDenton

Copy link
Copy Markdown
Member

lgtm

@bors r+ rollup

@rust-bors

rust-bors Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

📌 Commit bbd34d2 has been approved by ChrisDenton

It is now in the queue for this repository.

@rust-bors rust-bors Bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 21, 2026
@rust-bors rust-bors Bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants