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 2 times, most recently from 0da2b4c to eb44837 Compare November 26, 2025 21:52
Add tags, bug and timeLimit traits to the test ABI JSON data.
<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.

<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)

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.

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.)

///
/// - 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]?

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)
/// }

// 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)
/// }

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