Skip to content

SwiftPM6: Fix to skip locking package build directory #38

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

Conversation

fxwx23
Copy link
Contributor

@fxwx23 fxwx23 commented Nov 18, 2024

Starting with SwiftPM 6, a mechanism was introduced to lock the package build directory to prevent simultaneous builds/tests. Unfortunately, this behavior affects the swift package dump-package command used by this tool to retrieve dependency information. Specifically, when this tool is executed via a plugin in Swift 6, the workspace gets locked. This can lead to issues such as processes hanging and timing out when running on CI.

Steps to reproduce

$ swift --version
swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)
Target: arm64-apple-macosx14.0

$ swift package xcode-selective-test

Running process never terminates with Swift 6.

Changes in this PR

To preserve the previous behavior, a new --ignore-lock option has been introduced. This patch ensures that the option is automatically added when running on Swift 6 or later.

References

@fxwx23 fxwx23 requested a review from mikeger November 26, 2024 02:41
@mikeger mikeger merged commit 21104ca into mikeger:main Nov 26, 2024
@mikeger
Copy link
Owner

mikeger commented Nov 26, 2024

@fxwx23 included in the release https://github.com/mikeger/XcodeSelectiveTesting/releases/tag/0.10.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants