Skip to content

Test fixes and intermittent Linux failures #24

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

Merged
merged 6 commits into from
May 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .licenseignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Package.swift
[email protected]
LICENSE
.swift-version
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6.1.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could elaborate more on what this file does? I don't think 6.1.0 is an appropriate version because we need 6.2 for Span and the majority of the package depends on that trait (i.e. would require 6.2).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file marks what the standard swift toolchain version for this project should be for development, and testing. So, if I were developing with this package, what toolchain should I use to swift build and swift test and expect it to work.

If a developer has swiftly installed then swiftly will use it automatically. If CI supports it then that will be the toolchain that it uses as well. This has no effect on downstream packages.

https://www.swift.org/swiftly/documentation/swiftly/use-toolchains#Sharing-recommended-toolchain-versions

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If 6.2 of Swift is required to develop/test subprocess, then the swift version file could have a particular main-snapshot-xxxx-yy-zz that's known to be good at a point in time, possibly tested by CI.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh thanks. In that case let's leave it at 6.1.0 until we officially releases 6.2.

2 changes: 1 addition & 1 deletion Sources/Subprocess/Platforms/Subprocess+Linux.swift
Original file line number Diff line number Diff line change
@@ -107,7 +107,7 @@ extension Configuration {
}
// Spawn error
if spawnError != 0 {
if spawnError == ENOENT {
if spawnError == ENOENT || spawnError == EACCES {
// Move on to another possible path
continue
}
2 changes: 1 addition & 1 deletion Tests/SubprocessTests/SubprocessTests+Darwin.swift
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ struct SubprocessDarwinTests {
// Check the proces ID (pid), pross group ID (pgid), and
// controling terminal's process group ID (tpgid)
let psResult = try await Subprocess.run(
.name("/bin/bash"),
.path("/bin/bash"),
arguments: ["-c", "ps -o pid,pgid,tpgid -p $$"],
platformOptions: platformOptions,
output: .string
2 changes: 1 addition & 1 deletion Tests/SubprocessTests/SubprocessTests+Linux.swift
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ struct SubprocessLinuxTests {
setgid(4321)
}
let idResult = try await Subprocess.run(
.name("/usr/bin/id"),
.path("/usr/bin/id"),
arguments: ["-g"],
platformOptions: platformOptions,
output: .string