Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Windows] Support toolchain/sdk/runtime discovery through the registry #379

Copy link
Copy link
Open
@tristanlabelle

Description

@tristanlabelle
Issue body actions

Today, it is difficult to have multiple Swift toolchains installed on a machine and use the appropriate one as needed due to a few reasons:

  • The user install a toolchain or one component thereof (such as an SDK) under a arbitrary paths
  • The toolchain is placed under the %Path% environment variable
  • The %SDKROOT% environment variable points to a single SDK.

We would like to migrate to a model where we can enumerate multiple SDKs and toolchains installed on the machine by using registry entries, similar to what the Windows SDK does for its multiple versions. This would allow us to eliminate the %SDKROOT% environment variable and provide tooling that can select which version of the compiler, or SDK to use.

Specifically:

  • The Swift toolchain msi’s should register themselves in the registry under a standard structure, and unregister themselves upon uninstallation.
  • The registry structure should allow enumerating
    • The Swift versions installed, and for each version:
      • The path to the toolchain, including compiler, if available
      • The path to the runtime, if applicable
      • The SDKs installed, their paths and redistributable paths

This could look like how the Windows SDK registers its different versions:

Image

A rough draft of a registry structure:

Swift/
  0.0.0-c78f10e/
    ...
  6.0.1/
    Toolchain
	    "C:\Users\micro\AppData\Local\Programs\Swift\Toolchains\6.0.1+Asserts"
	    "C:\Users\micro\AppData\Local\Programs\Swift\Toolchains\6.0.1+NoAsserts"
    Runtimes/
      x86_64 "C:\Users\micro\AppData\Local\Programs\Swift\Runtimes\0.0.0\usr\bin"
    SDKs/
      Windows-x86_64 "C:\Users\micro\AppData\Local\Programs\Swift\Platforms\0.0.0\Windows.platform\Developer\SDKs\Windows.sdk"
        RuntimeMSM "C:\Users\micro\AppData\Local\Programs\Swift\Redistributables\0.0.0\rtl.amd64.msm"
      Windows-arm64 "C:\Users\micro\AppData\Local\Programs\Swift\Platforms\0.0.0\Windows.platform\Developer\SDKs\Windows.sdk"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.