Skip to content

Conversation

@bkhouri
Copy link

@bkhouri bkhouri commented Nov 26, 2025

TO BE COMPLETED.

Add tags, bug and timeLimit traits to the ABI JSON data.

[One line description of your change]

Motivation:

[Explain here the context, and why you're making that change. What is the problem you're trying to solve.]

Modifications:

[Describe the modifications you've done.]

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

@grynspan grynspan added enhancement New feature or request tools integration 🛠️ Integration of swift-testing into tools/IDEs public-api Affects public API traits Issues and PRs related to the trait subsystem or built-in traits labels Nov 26, 2025
@bkhouri bkhouri force-pushed the t/main/augment_event_stream_json branch 3 times, most recently from eb44837 to 46c32f1 Compare November 27, 2025 14:33
<bug> ::= {
["url": <string>,] ; the bug url
["id": <string>,] ; the bug id
"title": <string> ; the human readable bug title
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"title" should be optional.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're write.. I thought I had seen it as required. My mistake.

BTW, nice catch.

<tags> ::= <string> ; a string representation of a tag
<bug> ::= {
["url": <string>,] ; the bug url
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
["url": <string>,] ; the bug url
["url": <string>,] ; the bug URL

(Nitpick)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK.

var bugs: [Bug]?

/// The time limits associated with the test.
var timeLimit: Int?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var timeLimit: Int?
var timeLimit: Double?

Subsecond precision is possible, at least nominally.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

self.bugs = bugs
}
if #available(_clockAPI , *) {
if let seconds = test.timeLimit?.components.seconds {
Copy link
Contributor

@grynspan grynspan Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if let seconds = test.timeLimit?.components.seconds {
self.timeLimit = test.timeLimit
.map(TimeValue.init)
.map(Double.init)

(Brain-compiled.)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm.. that code delta looks wild. Our of curiosity, how does the TimeValue.init know to call the initializer with the value of test.timeLimit?

///
/// - Warning: Tags are not yet part of the JSON schema.
var _tags: [String]?
var tags: [String]?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var tags: [String]?
///
/// @Metadata {
/// @Available(Swift, introduced: 6.3)
/// }
var tags: [String]?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

var _tags: [String]?
var tags: [String]?

// The bugs associated with the test.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// The bugs associated with the test.
// The bugs associated with the test.
///
/// @Metadata {
/// @Available(Swift, introduced: 6.3)
/// }

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

// The bugs associated with the test.
var bugs: [Bug]?

/// The time limits associated with the test.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// The time limits associated with the test.
/// The time limits associated with the test.
///
/// @Metadata {
/// @Available(Swift, introduced: 6.3)
/// }

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

@bkhouri bkhouri force-pushed the t/main/augment_event_stream_json branch 2 times, most recently from abd2d37 to 95d2763 Compare December 10, 2025 19:13
Add tags, bug and timeLimit traits to the test ABI JSON data.
@bkhouri bkhouri force-pushed the t/main/augment_event_stream_json branch from 95d2763 to b3bda79 Compare December 11, 2025 05:13
<test-id> ::= <string> ; an opaque string representing the test case
<tag> ::= "." <string> ; a string representation of a tag
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chore (blocking): Update to reflect actual behaviour

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop the "." from the definition please! Even if it's mandated, this wouldn't be syntactically correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request public-api Affects public API tools integration 🛠️ Integration of swift-testing into tools/IDEs traits Issues and PRs related to the trait subsystem or built-in traits

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants