Skip to content
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

[SR-15125] Swift documentation for Windows: Developer Mode, Git, path to "less", order of installations, and environment variables #57451

Closed
swift-ci opened this issue Aug 27, 2021 · 6 comments
Assignees
Labels
task Windows Platform: Windows

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-15125
Radar None
Original Reporter Stefan Springer (JIRA User)
Type Task
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s
Labels Task, Windows
Assignee @compnerd
Priority Medium

md5: 0040bba5cd2672c6e99c477db9d2a561

Issue Description:

1) That the user needs the SE_CREATE_SYMBOLIC_LINK privilege in Windows to use symbolic links, so that SPM works on Windows, and that normally that privilege is set if the Developer Mode is activated, should be documented on the Getting Started page. (See there about how to set the privilege seperately.)

2) It should be documented on the Getting Started page that Git in version 2 has to be available. It only says tat Git is a recommended part of the Visual Studio installation, but this is not the whole story. SPM needs Git (version 2), but is is a good idea to install it via Visual Studio, so there also is the less command, see next point.

3) If using Swift on Windows, the less program (used by some Git commands) should be available via the PATH environment variable, else the tags for a repository might not be found, see this entry in the Swift forum. When Git is installed via Visual Studio, the less program is available in %ProgramFiles%\Git\usr\bin, so that path should then be added to the PATH environment variable. Please add this to the documentation on the Getting Started page.

4) Yes, it says that the first step is to install Swift. But when you start reading in the Windows section, you could think that the steps described there could be prerequisites for Swift, so executing them first could be OK. But then the commands to copy the ucrt.modulemap file etc. do not function. So please also add a note at the beginning of the Windows section on the Getting Started page that Swift needs to be installed first (without moving the installation, but see the next point).

5) It should be documented on the Getting Started page what environment variable are set by the Swift installation so that a user could move that installation or use it as a "portable" version. (BTW: I think SDKROOT is not ideal for a Swift specific environment variable.)

@typesanitizer
Copy link

cc @compnerd

@compnerd
Copy link
Collaborator

I agree with point 1 - indicating that Developer Mode should be enabled is an improvement that can be made. I disagree with the rest.

Git is only required if working with SPM - and as such it is indicated as you should install it when installing Visual Studio.

The fact that you saw a message related to less when debugging is a red herring. The tools do not need to be in the path. In fact, less is purely a user facing tool, automation cannot use it.

No, it never said installing Swift is the first step - it in fact starts off with Visual Studio. There are other reasons that the ordering is as it is - swift must be installed after Visual Studio.

I absolutely refuse to document the environment variables. They remain an internal detail of the setup and are free to change at any time. I do not wish to see them documented and become part of a contract that the toolchain is expected to provide.

@swift-ci
Copy link
Collaborator Author

Comment by Stefan Springer (JIRA)

Git is only required if working with SPM - and as such it is indicated as you should install it when installing Visual Studio.

I would say SPM is like Swift is used in many cases, and supporting Swift on Windows should incorporate SPM, and it is not indicated that you then need Git.

@compnerd
Copy link
Collaborator

+ @tomerd

@compnerd
Copy link
Collaborator

compnerd commented Oct 6, 2021

Swift.org - Download Swift

This now clearly indicates that git is a dependency for SPM and Python is for lldb. The platform specific dependencies are called out underneath it.

I'm going to try to get the getting started documentation improved and add a link to Microsoft's documentation for developer mode.

@compnerd
Copy link
Collaborator

I believe that the Getting Started and Download instructions should be similar now. They explicitly indicate what the dependencies are for, and should hopefully be easier to follow. Thanks for the suggestions!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Windows Platform: Windows
Projects
None yet
Development

No branches or pull requests

3 participants