Skip to content

Add --dereference-symlinks to vcpkg export#1705

Merged
BillyONeal merged 2 commits intomicrosoft:mainfrom
BillyONeal:add-hydrate-symlinks
Aug 21, 2025
Merged

Add --dereference-symlinks to vcpkg export#1705
BillyONeal merged 2 commits intomicrosoft:mainfrom
BillyONeal:add-hydrate-symlinks

Conversation

@BillyONeal
Copy link
Copy Markdown
Member

to workaround CloudBuild restoring vcpkg's install tree as all symlinks.

…toring vcpkg's install tree as all symlinks.
inline constexpr StringLiteral SwitchHeader = "header";
inline constexpr StringLiteral SwitchHostExclude = "host-exclude";
inline constexpr StringLiteral SwitchHostTriplet = "host-triplet";
inline constexpr StringLiteral SwitchHydrateSymlinks = "hydrate-symlinks";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I do find the name "hydrate-symlinks" a bit odd -- I feel like "follow-symlinks" or "resolve-symlinks" would be common? Or is this copied from another tool?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

'follow' / 'resolve' don't normally affect whether or not there is an actual symlink, those words normally refer only to whether one is speaking about a symlink, or about a symlink target.

This is replacing a symlink entirely (with a copy of its target), the inverse of copy_symlinks in https://eel.is/c++draft/tab:fs.enum.copy.opts .

Would you find 'replace symlinks' acceptable?

Copy link
Copy Markdown
Member

@vicroms vicroms Aug 19, 2025

Choose a reason for hiding this comment

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

I think replace-symlinks is good but don't have issues with hydrate-symlinks either.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In person Robert suggested --dereference-symlinks because that's the language tar uses: https://ftp.gnu.org/old-gnu/Manuals/tar-1.12/html_node/tar_115.html

@BillyONeal BillyONeal changed the title Add --hydrate-symlinks to vcpkg export Add --dereference-symlinks to vcpkg export Aug 21, 2025
@BillyONeal BillyONeal merged commit a7ab460 into microsoft:main Aug 21, 2025
7 checks passed
@BillyONeal BillyONeal deleted the add-hydrate-symlinks branch August 21, 2025 23:53
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.

3 participants