Skip to content

Conversation

ChrisDenton
Copy link
Member

On Windows, creating symlinks is not allowed unless developer mode is enabled or a specific permission is granted. Therefore this optimistically attempts to use symlinks first, before falling back to juncture points in the event that fails.

Resolves #3677

Copy link
Contributor

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems nice! Maybe add a comment to explain why we think symlinks are the better option here?

@ChrisDenton
Copy link
Member Author

Something like that?

@djc djc added this pull request to the merge queue Feb 28, 2024
@djc
Copy link
Contributor

djc commented Feb 28, 2024

This seems okay, going to merge this. Thanks!

Merged via the queue into rust-lang:master with commit 5766750 Feb 28, 2024
@ChrisDenton ChrisDenton deleted the symlink branch February 28, 2024 15:09
@rami3l
Copy link
Member

rami3l commented Feb 29, 2024

@ChrisDenton I don't use Windows personally but I have a question: will this create a possibly inconsistent state where one part of the installation is organized with symlinks and another part with juncture points?

@ChrisDenton
Copy link
Member Author

That could happen but I can't think of a case where the type of link would matter to us. Except, as previously mentioned, when moving the rustup directory. In that case you'll end up with some links being broken while others aren't but I'm not sure that's any worse than all links being broken.

@rami3l rami3l mentioned this pull request Mar 5, 2024
1 task
eandre added a commit to eandre/encore that referenced this pull request Sep 16, 2024
Windows requires Developer Mode to be enabled to use
symlinks without admin permissions. This isn't always enabled,
so fall back to using junction points if symlink creation fails.

This is for example what rustup does already.
See rust-lang/rustup#3687 for example.
eandre added a commit to eandre/encore that referenced this pull request Sep 16, 2024
Windows requires Developer Mode to be enabled to use
symlinks without admin permissions. This isn't always enabled,
so fall back to using junction points if symlink creation fails.

This is for example what rustup does already.
See rust-lang/rustup#3687 for example.
eandre added a commit to encoredev/encore that referenced this pull request Sep 16, 2024
Windows requires Developer Mode to be enabled to use
symlinks without admin permissions. This isn't always enabled,
so fall back to using junction points if symlink creation fails.

This is for example what rustup does already.
See rust-lang/rustup#3687 for example.
goodcode2000 added a commit to goodcode2000/encore that referenced this pull request Oct 2, 2025
Windows requires Developer Mode to be enabled to use
symlinks without admin permissions. This isn't always enabled,
so fall back to using junction points if symlink creation fails.

This is for example what rustup does already.
See rust-lang/rustup#3687 for example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prefer using symlinks on Windows
3 participants