Skip to content
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

[SR-9526] No public way to detect if XCTContext can run activity #357

Open
stephencelis opened this issue Dec 15, 2018 · 1 comment
Open

[SR-9526] No public way to detect if XCTContext can run activity #357

stephencelis opened this issue Dec 15, 2018 · 1 comment

Comments

@stephencelis
Copy link

@stephencelis stephencelis commented Dec 15, 2018

Previous ID SR-9526
Radar None
Original Reporter @stephencelis
Type Bug
Environment

Most recent `swift test` on macOS

Additional Detail from JIRA
Votes 1
Component/s XCTest
Labels Bug
Assignee None
Priority Medium

md5: f46c9e3552dd5f499882497bafd285c3

Issue Description:

Right now XCTest doesn't provide a way to detect if activities can run:

https://github.com/apple/swift/blob/518f26af062a70087d78459bd5f0e440258ff7fd/stdlib/public/Darwin/XCTest/XCTest.swift#L26

This means it's impossible to build a library that uses activities in one configuration and not in another via the public API.

See:

Activities are not available in SwiftPM projects (even on macOS) when using `swift test`

@stephencelis
Copy link
Author

@stephencelis stephencelis commented Dec 15, 2018

Here's my ugly workaround for the problem, which relies on some private Xcode environment details: pointfreeco/swift-snapshot-testing#143

Open to suggestions for better solutions!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant