-
Notifications
You must be signed in to change notification settings - Fork 22
Propagate errors from the Windows run script #49
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
Conversation
Powershell does not automatically exit if a subcommand fails, ie. it behaves similar to a Bash script without `set -e`. This means that `swift test` could fail and `run.ps1` would still return exit code 0, indicating success. Add an `Invoke-Program` utility to `run.ps1` that propagates error codes.
9bfd653
to
6110e2a
Compare
@@ -84,7 +87,7 @@ jobs: | |||
strategy: | |||
fail-fast: false | |||
matrix: | |||
swift_version: ['5.9', '5.10', '6.0', 'nightly', 'nightly-6.0'] | |||
swift_version: ['5.9', '6.0', 'nightly', 'nightly-6.0'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add 5.10 back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, we need to disable Windows 5.10 again because it fails to build Swift packages with
Invalid manifest (compiled with: ["C:\\Users\\ContainerAdministrator\\AppData\\Local\\Programs\\Swift\\Toolchains\\5.10.1+Asserts\\usr\\bin\\swiftc.exe", "-vfsoverlay", "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\TemporaryDirectory.AXNJbD\\vfs.yaml", "-L", "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Programs\\Swift\\Toolchains\\5.10.1+Asserts\\usr\\lib\\swift\\pm\\ManifestAPI", "-lPackageDescription", "-sdk", "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Programs\\Swift\\Platforms\\5.10.1\\Windows.platform\\Developer\\SDKs\\Windows.sdk", "-libc", "MD", "-I", "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Programs\\Swift\\Platforms\\5.10.1\\Windows.platform\\Developer\\Library\\XCTest-development\\usr\\lib\\swift\\windows", "-I", "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Programs\\Swift\\Platforms\\5.10.1\\Windows.platform\\Developer\\Library\\XCTest-development\\usr\\lib\\swift\\windows\\x86_64", "-L", "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Programs\\Swift\\Platforms\\5.10.1\\Windows.platform\\Developer\\Library\\XCTest-development\\usr\\lib\\swift\\windows\\x86_64", "-use-ld=lld", "-swift-version", "5", "-I", "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Programs\\Swift\\Toolchains\\5.10.1+Asserts\\usr\\lib\\swift\\pm\\ManifestAPI", "-package-description-version", "5.6.0", "C:\\source\\Package.swift", "-Xfrontend", "-disable-implicit-concurrency-module-import", "-Xfrontend", "-disable-implicit-string-processing-module-import", "-o", "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\TemporaryDirectory.Ngb23o\\source-manifest.exe"]) Missing or empty JSON output from manifest compilation for source
5.10 never worked, it was just mistakingly always reported as success, despite failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In our matrix we just said Windows is 6.0+. Since we never had CI for Windows on our packages that makes our lives easier and we don't have to chase old toolchain bugs.
Reminds me I need to finish off swiftlang/swift-package-manager#8049 so packages have a better chance of building. :). |
Powershell does not automatically exit if a subcommand fails, ie. it behaves similar to a Bash script without
set -e
. This means thatswift test
could fail andrun.ps1
would still return exit code 0, indicating success.Add an
Invoke-Program
utility torun.ps1
that propagates error codes.Unfortunately, we need to disable Windows 5.10 again because it fails to build Swift packages with
Test run (6.0 expectedly failed here to verify): https://github.com/swiftlang/swift-format/actions/runs/11529268101/job/32097477699?pr=867