Skip to content

Remove @_spi annotations from ParallelizationTrait and .serialized #580

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 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
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
11 changes: 1 addition & 10 deletions Sources/Testing/Testing.docc/Parallelization.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ accomplished by the testing library using task groups, and tests generally all
run in the same process. The number of tests that run concurrently is controlled
by the Swift runtime.

<!--
HIDDEN: .serialized is experimental SPI pending feature review.

## Disabling parallelization

Parallelization can be disabled on a per-function or per-suite basis using the
Expand Down Expand Up @@ -56,12 +53,6 @@ This trait is recursively applied: if it is applied to a suite, any
parameterized tests or test suites contained in that suite are also serialized
(as are any tests contained in those suites, and so on.)

This trait does not affect the execution of a test relative to its peers or to
This trait doesn't affect the execution of a test relative to its peers or to
unrelated tests. This trait has no effect if test parallelization is globally
disabled (by, for example, passing `--no-parallel` to the `swift test` command.)

## Topics

- ``Trait/serialized``
- ``ParallelizationTrait``
-->
9 changes: 4 additions & 5 deletions Sources/Testing/Testing.docc/Traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,17 @@ behavior of test functions.

- <doc:EnablingAndDisabling>
- <doc:LimitingExecutionTime>
- <doc:Parallelization>
- ``Trait/enabled(if:_:sourceLocation:)``
- ``Trait/enabled(_:sourceLocation:_:)``
- ``Trait/disabled(_:sourceLocation:)``
- ``Trait/disabled(if:_:sourceLocation:)``
- ``Trait/disabled(_:sourceLocation:_:)``
- ``Trait/timeLimit(_:)``

<!--
HIDDEN: .serialized is experimental SPI pending feature review.
### Running tests serially or in parallel
- ``ParallelizationTrait``
-->

- <doc:Parallelization>
- ``Trait/serialized``

### Annotating tests

Expand All @@ -61,6 +59,7 @@ HIDDEN: .serialized is experimental SPI pending feature review.
- ``Bug``
- ``Comment``
- ``ConditionTrait``
- ``ParallelizationTrait``
- ``Tag``
- ``Tag/List``
- ``TimeLimitTrait``
4 changes: 4 additions & 0 deletions Sources/Testing/Testing.docc/Traits/Trait.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ See https://swift.org/CONTRIBUTORS.txt for Swift project authors

- ``Trait/timeLimit(_:)``

### Running tests serially or in parallel

- ``Trait/serialized``

### Categorizing tests

- ``Trait/tags(_:)``
Expand Down
2 changes: 0 additions & 2 deletions Sources/Testing/Traits/ParallelizationTrait.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
/// `swift test` command.)
///
/// To add this trait to a test, use ``Trait/serialized``.
@_spi(Experimental)
public struct ParallelizationTrait: TestTrait, SuiteTrait {
public var isRecursive: Bool {
true
Expand All @@ -47,7 +46,6 @@ extension ParallelizationTrait: SPIAwareTrait {

// MARK: -

@_spi(Experimental)
extension Trait where Self == ParallelizationTrait {
/// A trait that serializes the test to which it is applied.
///
Expand Down