-
Notifications
You must be signed in to change notification settings - Fork 131
Augment JSON ABI #1429
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
base: main
Are you sure you want to change the base?
Augment JSON ABI #1429
Conversation
eb44837 to
46c32f1
Compare
Documentation/ABI/JSON.md
Outdated
| <bug> ::= { | ||
| ["url": <string>,] ; the bug url | ||
| ["id": <string>,] ; the bug id | ||
| "title": <string> ; the human readable bug title |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"title" should be optional.
There was a problem hiding this comment.
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.
Documentation/ABI/JSON.md
Outdated
| <tags> ::= <string> ; a string representation of a tag | ||
| <bug> ::= { | ||
| ["url": <string>,] ; the bug url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ["url": <string>,] ; the bug url | |
| ["url": <string>,] ; the bug URL |
(Nitpick)
There was a problem hiding this comment.
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| var timeLimit: Int? | |
| var timeLimit: Double? |
Subsecond precision is possible, at least nominally.
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if let seconds = test.timeLimit?.components.seconds { | |
| self.timeLimit = test.timeLimit | |
| .map(TimeValue.init) | |
| .map(Double.init) |
(Brain-compiled.)
There was a problem hiding this comment.
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]? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| var tags: [String]? | |
| /// | |
| /// @Metadata { | |
| /// @Available(Swift, introduced: 6.3) | |
| /// } | |
| var tags: [String]? |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // The bugs associated with the test. | |
| // The bugs associated with the test. | |
| /// | |
| /// @Metadata { | |
| /// @Available(Swift, introduced: 6.3) | |
| /// } |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// The time limits associated with the test. | |
| /// The time limits associated with the test. | |
| /// | |
| /// @Metadata { | |
| /// @Available(Swift, introduced: 6.3) | |
| /// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
abd2d37 to
95d2763
Compare
Add tags, bug and timeLimit traits to the test ABI JSON data.
95d2763 to
b3bda79
Compare
| <test-id> ::= <string> ; an opaque string representing the test case | ||
| <tag> ::= "." <string> ; a string representation of a tag |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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: