Skip to content

Foundation: attempt a first pass symlink resolution #4681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 7, 2023

Conversation

compnerd
Copy link
Member

On Windows, rather than recursively expanding a path component by component, perform a first pass resolution at the given path. This potentially influences the path resolution as the component traversal would possibly fail to resolve cross-drive references.

On Windows, rather than recursively expanding a path component by
component, perform a first pass resolution at the given path.  This
potentially influences the path resolution as the component traversal
would possibly fail to resolve cross-drive references.
@compnerd
Copy link
Member Author

CC: @parkera

@compnerd
Copy link
Member Author

@swift-ci please test

Copy link
Contributor

@parkera parkera left a comment

Choose a reason for hiding this comment

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

Do we need some kind of windows-specific unit test?

@compnerd
Copy link
Member Author

compnerd commented Jan 3, 2023

@parkera I think it could be nice to do that, but I didn't want to put in the effort if this code path is unlikely to survive the rewrite of Foundation. This was something that I ran across when getting the SourceKit-LSP tests resolved, so it is definitely something we hit. The one thing that I worry about a test case for this is that it will potentially require running with elevated privileges (i.e. as "root") to create the symbolic links to traverse. However, if we have existing test cases which do that and are passing, we should be able to accommodate that.

@compnerd
Copy link
Member Author

compnerd commented Jan 3, 2023

@swift-ci please test macOS platform

@parkera
Copy link
Contributor

parkera commented Jan 3, 2023

Ok, that makes sense. LGTM then and thank you.

@compnerd
Copy link
Member Author

compnerd commented Jan 6, 2023

@swift-ci please test macOS platform

@compnerd compnerd merged commit f42e9af into swiftlang:main Jan 7, 2023
@compnerd compnerd deleted the url-resolution branch January 7, 2023 16:39
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.

2 participants