You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/Proposals/NNNN-json-abi.md
+18-13Lines changed: 18 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -201,7 +201,7 @@ Package Manager:
201
201
| Argument | Value Type | Description |
202
202
|---|:-:|---|
203
203
|`--configuration-path`| File system path | Specifies a path to a file, named pipe, etc. containing test configuration/options. |
204
-
|`--event-stream-output`| File system path | Specifies a path to a file, named pipe, etc. to which output should be written. |
204
+
|`--event-stream-output-path`| File system path | Specifies a path to a file, named pipe, etc. to which output should be written. |
205
205
|`--event-stream-version`| Integer | Specifies the version of the stable JSON schema to use for output. |
206
206
207
207
The process for adding arguments to Swift Package Manager is separate from the
@@ -210,24 +210,29 @@ speculative and are subject to change as part of the Swift Package Manager
210
210
review process.
211
211
212
212
If `--configuration-path` is specified, Swift Testing will open it for reading
213
-
and attempt to decode its contents as JSON. If `--event-stream-output` is
213
+
and attempt to decode its contents as JSON. If `--event-stream-output-path` is
214
214
specified, Swift Testing will open it for writing and will write a sequence of
215
215
[JSON Lines](https://jsonlines.org) to it representing the data and events
216
216
produced by the test run. `--event-stream-version` determines the stable schema
217
217
used for output; pass `0` to match the schema proposed in this document.
218
218
219
219
> [!NOTE]
220
-
> If `--event-stream-output` is specified but `--event-stream-version` is not,
221
-
> the format _currently_ used is based on direct JSON encodings of the internal
222
-
> Swift structures used by Swift Testing. This format is necessary to support
223
-
> Xcode 16 Beta 1. In the future, the default value of this argument will be
224
-
> assumed to be `0` instead (i.e. the JSON schema will match what we are
225
-
> proposing here.)
220
+
> If `--event-stream-output-path` is specified but `--event-stream-version` is
221
+
> not, the format _currently_ used is based on direct JSON encodings of the
222
+
> internal Swift structures used by Swift Testing. This format is necessary to
223
+
> support Xcode 16 Beta 1. In the future, the default value of this argument
224
+
> will be assumed to equal the newest available JSON schema version (`0` as of
225
+
> this document's acceptance, i.e. the JSON schema will match what we are
226
+
> proposing here until a new schema supersedes it.)
227
+
>
228
+
> Tools authors that rely on the JSON schema are strongly advised to specify a
229
+
> version rather than relying on this behavior to avoid breaking changes in the
230
+
> future.
226
231
227
232
On platforms that support them, callers can use a named pipe with
228
-
`--event-stream-output` to get live results back from the test run rather than
229
-
needing to wait until the file is closed by the test process. Named pipes can be
230
-
created on Darwin or Linux with the POSIX [`mkfifo()`](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/mkfifo.2.html)
233
+
`--event-stream-output-path` to get live results back from the test run rather
234
+
than needing to wait until the file is closed by the test process. Named pipes
235
+
can be created on Darwin or Linux with the POSIX [`mkfifo()`](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/mkfifo.2.html)
231
236
function or on Windows with the [`CreateNamedPipe()`](https://learn.microsoft.com/en-us/windows/win32/api/namedpipeapi/nf-namedpipeapi-createnamedpipew)
232
237
function.
233
238
@@ -278,8 +283,8 @@ public enum ABIv0 {
278
283
/// using `dlsym()` or a platform equivalent.
279
284
///
280
285
/// The value of this property can be thought of as equivalent to
281
-
/// `swift test --event-stream-output` except that, instead of streaming JSON
282
-
/// records to a named pipe or file, it streams them to an in-process
286
+
/// `swift test --event-stream-output-path` except that, instead of streaming
287
+
///JSON records to a named pipe or file, it streams them to an in-process
0 commit comments