Skip to content

Enable symlink support explicitly #3406

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 2 commits into from
Apr 16, 2021
Merged

Conversation

stevapple
Copy link
Contributor

@stevapple stevapple commented Apr 15, 2021

Explicitly set core.symlinks to true to enable symlink support.

Motivation:

On Windows, symbolic link support in git is defaulted to false. Since SwiftPM itself also heavily depends on symlinking, there’s no reason that we should not enable it.

Modifications:

Explicitly set core.symlinks=true on git clone.

Result:

Repositories cloned by SwiftPM will have core.symlinks set to true, which means symbolic links can be resolved correctly.

Note:

If a system doesn’t support symlink, then SwiftPM itself will also break; if it does, then we should enable it regardless of global configs. We need to ensure that Swift package repos are checked out correctly.

@stevapple stevapple changed the title Enable symlink support for Windows Enable symlink support explicitly Apr 15, 2021
@tomerd
Copy link
Contributor

tomerd commented Apr 15, 2021

@compnerd any opinion / insight?

@tomerd
Copy link
Contributor

tomerd commented Apr 15, 2021

@swift-ci please smoke test

@tomerd
Copy link
Contributor

tomerd commented Apr 15, 2021

@swift-ci please test package compatibility

@tomerd tomerd self-assigned this Apr 15, 2021
@tomerd
Copy link
Contributor

tomerd commented Apr 15, 2021

@swift-ci please smoke test

@tomerd
Copy link
Contributor

tomerd commented Apr 15, 2021

@swift-ci please test package compatibility

@stevapple
Copy link
Contributor Author

Solves SR-14259

@stevapple
Copy link
Contributor Author

I don’t think I’ve changed anything in the smoke test🤔 This PR won’t change the behavior on un-configured macOS and Linux machines.

May you trigger another macOS smoke test? @tomerd

@tomerd
Copy link
Contributor

tomerd commented Apr 16, 2021

@swift-ci please smoke test macOS

@tomerd tomerd added the ready Author believes the PR is ready to be merged & any feedback has been addressed label Apr 16, 2021
@tomerd tomerd merged commit 5f80bd7 into swiftlang:main Apr 16, 2021
@stevapple
Copy link
Contributor Author

I wonder if this can land in Swift 5.4🤔 Considering that this will help build many more packages on Windows, eg. all Swift developer tools depending on swift-llbuild.

@tomerd
Copy link
Contributor

tomerd commented Apr 19, 2021

@stevapple its too late for 5.4.0, but you can open a PR against the 5.4 branch and if we roll 5.4.1 dot release we can include it in that

stevapple added a commit to stevapple/swift-package-manager that referenced this pull request Apr 20, 2021
motivation: enable git symlink support for Windows

changes: pass core.symlinks=true to git clone operations
tkremenek pushed a commit that referenced this pull request May 12, 2021
* Enable symlink support explicitly (#3406)

motivation: enable git symlink support for Windows

changes: pass core.symlinks=true to git clone operations

* Limit the change to Windows only
@stevapple stevapple deleted the win-symlink branch December 7, 2021 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants