-
Notifications
You must be signed in to change notification settings - Fork 42
Windows apps packaging their Swift runtime can make the toolchain unusable #339
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
Comments
I was cautiously optimistic for a short-term fix where SwiftFormat could include a <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration>
<windows>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="SwiftFormat" type="win32" processorArchitecture="amd64"/>
<probing privatePath="SwiftRuntime"/>
</assemblyBinding>
</windows>
</configuration> |
I think that we want to migrate to a Win32 SxS approach for the runtime. This would allow us to share a global installation of the runtime across applications without worrying about the ABI stability issue. We would need to embed the build number until an ABI stable build is available. Each application would then need to request the explicit revision of the runtime, and would load that specific version even though there may be multiple installed runtimes which are all in |
@compnerd , would this require switching the installer to per-machine installs? ("a global installation of the runtime"), and could we bake in |
I think that it would be best to switch to per-machine installs, but, it might be possible to retain the per-user install for the runtime. The request is going to be application specific. There is no reason to assume that the compiler knows the runtime version precisely. ABI stability would mean that you can switch between versions and the handling for this is in the loader, which means that the linker is what needs to change. If you can change |
(for the record) We considered using the win32 |
We recently modified the installer for Nick Lockwood's SwiftFormat project to include the Swift runtime dlls, since the one installed on the machine might not be ABI-compatible. The installer will add its target folder to the system
%Path%
, which will then win when resolvingswiftCore.dll
and other Swift runtime dlls, breaking the toolchain programs likeswift.exe
.Repro steps:
swift.exe --version
. It should work as expected.swift.exe --version
. It will now crash because it's picking up the Swift runtime binaries from the SwiftFormat installation.The text was updated successfully, but these errors were encountered: