-
Notifications
You must be signed in to change notification settings - Fork 439
Add assertion for missing fixed source #1549
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
Add assertion for missing fixed source #1549
Conversation
As with my comment on the other PR, I think that it’s a great change and allows everybody to explicitly write down their expectation. I certainly remember a bug or two that would have been caught if we had written down the fixed source straight away. |
40e3036
to
ed090a5
Compare
ed090a5
to
d502408
Compare
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.
A bit less than 150 missing fix its. 😬
Added some online comments that could be worth considering
fixedSource: """ | ||
@_expose(Cxx, ""baz) func foo() {} |
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.
This looks odd. Should the fixed source not be like @_expose(Cxx, "baz") func foo() {}
fixedSource: """ | ||
@_unavailableFromAsync(messagenope: "abc") | ||
func foo() {} | ||
""" |
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.
Should the attribute not be @_unavailableFromAsync(message: "abc")
fixedSource: """ | ||
@_unavailableFromAsync(message: ""= "abc") | ||
func foo() {} | ||
""" |
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.
Should the attribute not be @_unavailableFromAsync(message: "abc")
@_unavailableFromAsync(message: ""abc) | ||
func foo() {} |
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.
Same as above, I would expect that abc
got wrapped in the ""
actor MyActor2 { | ||
init() { | ||
} | ||
func hello() { }} |
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.
Should we here add the }
on a new line?
] | ||
], | ||
fixedSource: """ | ||
func foo(first second: third) struct <#identifier#>: 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.
I think we miss a ;
between the function and struct
] | ||
], | ||
fixedSource: """ | ||
func foo(first second: [third] fourth: 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.
Maybe a good first issue to add a comma
after [third]
] | ||
], | ||
fixedSource: #""" | ||
@_originallyDefinedIn(modulemodulename: "foo", OSX 13.13) |
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.
I would expect modulename
was replaced by module
here
// Parse errors | ||
for i in r { | ||
} | ||
for i in r { sum = sum + i;} |
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.
Maybe newline after {
and before }
d502408
to
7b6b65b
Compare
@swift-ci please 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.
Wow, that’s a big PR. And thanks for catching all those incorrect formattings. I think most of the space-related issues should be fixed in the next couple of days by my changes to BasicFormat. All the other ones look like real problems to me. Shows that requiring you to specify fixedSource
does provide value 🤩 .
What do you think about the following? We wait for my BasicFormat changes to get in and see which tests are still odd after that. For all of those, you file issues on GitHub (and feel free to mark them as “good first issue” if you think they’ll be easy to fix) and reference those issues as TODOs in the test cases.
Yes it gives a lot 🙌
Let's wait yes, there will 100% be cases that are fixed now. |
819c718
to
1ade024
Compare
97ee944
to
b23d0f5
Compare
@ahoppen it's now rebased on latest main and all swift parser tests passes locally. |
2d0c998
to
48d25f6
Compare
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.
Thank you for pushing through all of these test cases. I have added comments to all the tests that would deserve a GitHub issue. Some of the comments can probably be bundled into a single issue. If you could file those, that’d be great.
I also don’t think that we need to add TODO
s to the codebase, the issues are sufficient.
Feel free to merge this whenever you get it passing without racing other PRs.
And I don’t think we need to cherry-pick this to release/5.9
.
48d25f6
to
b42d76b
Compare
b42d76b
to
3d87674
Compare
3d87674
to
85be5e8
Compare
85be5e8
to
aa84fcd
Compare
aa84fcd
to
6261d79
Compare
@swift-ci please test |
@swift-ci please test windows |
As in #1467 I also tough here it would start to make sense to test the applied the fix its as it will ensure the quality in many different cases and scenarios.
So when there is 1 or more fix its we expect a fixed source.
What do you think. Is it worth it?
Just before I continue with the rest of the 195 failing test cases 🫣