Commit ac4f8da
authored
Validate format of event stream version CLI argument when passed (#1231)
This adds validation of the user-specified `--event-stream-version` (or
`--experimental-event-stream-version`) command-line arguments when they
are passed, to ensure they have a valid format.
### Motivation:
Currently, these flags only accept integers like `0`, `1`, etc. But I am
moving towards making the entry point and event stream versions align
with the Swift version, rather than having an independent versioning
scheme which users must look up or keep track of. Once this effort is
finished, in order to use the event stream format included in (for
example) Swift 6.3, a user would pass `--event-stream-version 6.3`.
In swiftlang/swift-package-manager#8944, I
recently landed a SwiftPM change which will permit any arbitrary string
for these arguments, and this means we need to begin validating the
format of supported versions within the testing library. In a subsequent
PR, I plan to introduce support for non-integer versions, at which point
having some existing validation logic will be even more valuable.
### Checklist:
- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.1 parent 824f6a4 commit ac4f8da
File tree
2 files changed
+22
-7
lines changed- Sources/Testing/ABI/EntryPoints
- Tests/TestingTests
2 files changed
+22
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
265 | 266 | | |
266 | | - | |
| 267 | + | |
267 | 268 | | |
268 | 269 | | |
269 | 270 | | |
| |||
376 | 377 | | |
377 | 378 | | |
378 | 379 | | |
379 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
380 | 388 | | |
381 | 389 | | |
382 | 390 | | |
383 | 391 | | |
384 | | - | |
385 | | - | |
386 | | - | |
| 392 | + | |
387 | 393 | | |
388 | 394 | | |
| 395 | + | |
| 396 | + | |
389 | 397 | | |
390 | 398 | | |
391 | 399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
311 | 318 | | |
312 | 319 | | |
313 | 320 | | |
| |||
0 commit comments