swiftlang/swift-org-website

windows archive

3052 opened this issue · 7 comments

3052 commented

Motivation

I dont trust exe since it can run any command on my system

Proposed solution

offer an archive instead such as Zip or Zst - current link:

https://www.swift.org/install/windows/

other languages have archive with the built tools:

https://go.dev/dl/go1.22.6.windows-amd64.zip

Alternatives considered

No response

Additional information

No response

cc @compnerd

@xedin Could you transfer this please?

@AnthonyLatsis i assume that you want to move this to installer-scripts?

@3052 we actually do need that functionality - we register things into the environment and perform other computational work. The swift toolchain is not entirely extract and go (at least not if you want the "install and go" experience).

3052 commented

I currently use the Go programming language, and as shown above "installation" doesn't need any interaction with the host PC. I know other languages like Python and PHP, Rust, Zig, D, C, JavaScript are the same. I think the bar should be high for justifying permanent environment modification by an installer.

can you give more information?

To swift-org-website actually, but I am happy to leave it up to your judgement. In case the specified installer extension is hardcoded, note that the hypertext also says "exe".

@AnthonyLatsis sure, I can move it to swift-org-website; I was thinking that installer-scripts made sense since this would require some new scripts for building the installer.

@3052 Swift makes a few different decisions than those other languages.

For example, the language is setup to do a system wide installation of the runtime allowing a shared installation of the runtime, similar to how Microsoft handles the C/C++ language runtimes. PHP, JavaScript do not have a language runtime per se, all the modules are re-distributed. Go and Rust do not have a sharable language runtime, it is always statically linked. C obviously needs the language runtime, and on Windows, that is distributed by Microsoft as the language redistributables. I do not know how D deals with this.

The Swift compiler is transitioning to Swift from C/C++ and the developer tools are generally written in Swift. As a result, they depend on the language runtime, which is dynamically linked and requires that to be in Path.

Because we want to ease the use of Swift and not require something like Visual Studio or mandate the use of something like VSDevCmd.bat, we inject a few environment variables to support locating the software developer kit. Microsoft requires manual scanning of a large number of paths which change between each release to provide compatibility.

You can find the installer sources at https://github.com/swiftlang/swift-installer-scripts if you want to look through them yourself.