-
Notifications
You must be signed in to change notification settings - Fork 232
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
PrettyPrinter reports wrong line LineNumbersTests #883
PrettyPrinter reports wrong line LineNumbersTests #883
Conversation
0852ed5
to
9b47a88
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.
Thanks for the PR @bkolb! The fix looks good to me, I just have one small comment.
9b47a88
to
028ad94
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.
Looks good. Thanks!
@bkolb Could you run swift-format on your changes? The Windows failures will be fixed by swiftlang/github-workflows#70. |
Head branch was pushed to by a user without write access
028ad94
to
1af4c17
Compare
Done |
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.
Thanks for digging into this! Turns out the problem was nowhere near where I was guessing it might be.
No problem :-) Thx for your reviews. I don't understand the build failure on windows. Can you give me a hint? |
The Windows test failure is an infrastructure issue and will be fixed by swiftlang/github-workflows#70. |
@bkolb can we try changing https://github.com/swiftlang/swift-format/blob/main/.github/workflows/pull_request.yml#L10C5-L10C83 to |
The reason for the wrong line number were multiline comments. In to accomodate for this, we now check the string while writing for new lines and increment the line count accordingly. Issue: swiftlang#882
1af4c17
to
2cd032c
Compare
That |
Sorry for the delay. |
#894 contains instruction how to reproduce the measurement. |
This is to reproduce issue #882.
I am not sure if the fix is done in the right place. With my change every string is checked for new lines, which might be not necessary and comes at a slight cost. Maybe there is another, better place to fix this.