-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Change diagnostic error thrown for when string interpolations aren't closed by a parenthesis #58882
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
Change diagnostic error thrown for when string interpolations aren't closed by a parenthesis #58882
Conversation
@hamishknight could you ask swift-ci to test this? once the test does succeed, ill add notes and fix-its, but i want to make sure this works first |
@swift-ci please test |
|
@swift-ci please test |
@hamishknight okay this one should 100% work |
@swift-ci please test |
Great! Now time to add the notes and fix its once I get home |
@swift-ci please test |
@hamishknight |
Looks like a legit error:
Usually it's good to search the CI logs for occurrences of |
Ohh, I see, I’ll fix just a sec |
@hamishknight fixed, and I’ll take note of that, thanks! |
@swift-ci please test |
@hamishknight this time could you test and ask it for a toolchain? I'm really sorry for all the trouble, but I can't compile locally unfortunately |
@swift-ci please test |
@swift-ci please build toolchain |
@hamishknight Okay this should finally be it.. also, when it builds the toolchain, does it put the toolchain online for download? |
@swift-ci please test |
If we've settled on the error also pointing to the opening paren, then let us merge the note into the error. I'm thinking |
Sure! |
…closed, change message of string_interpolation_unclosed and update tests to reflect changes
@swift-ci please build toolchain macOS |
@AnthonyLatsis fixed the issues |
@swift-ci please build toolchain macOS |
This literally can't be related to us, can it? |
@swift-ci please build toolchain macOS |
@AnthonyLatsis this is so confusing.. I don’t think the SIL Error has anything to do with us though, could you just ask it to test only? |
@swift-ci please smoke test macOS |
@AnthonyLatsis could you ask it to build the toolchain again now? |
I will run validation tests first just in case. CI infographics indicate that the failure is non-deterministic, but the failure itself looks like it should be deterministic, which is a bit weird. @swift-ci please test macOS |
@eeckstein Could you take a look at this unrelated test failure? https://ci.swift.org/job/swift-PR-toolchain-macos/164/console |
@nate-chandler is this a fallout from the SSA destroy hoisting change (#58791)? |
Already fixed via #59048 . |
@swift-ci please build toolchain macOS |
Ah, now it makes sense — I was looking at the |
@AnthonyLatsis works locally! Ready for merge now? |
We need a representative to review these changes first. |
My only concern is that there is no discerning between an unterminated string inside the interpolation and a missing |
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 all for the collaborative work on this one! Looks good to me! I have left a minor comment about the diagnostic itself inline. I'd also say that since "unterminated string literal" is not really a regression it could be improved separately.
@swift-ci please smoke test |
@AnthonyLatsis tests passed; time for merge? |
This pull request changes the diagnostic error thrown when a string interpolation isn't closed by a parenthesis properly (ie:
let x = "g \("
)Previously, it would blurt out
unterminated string literal
, with these changes it'll instead throwexpected ')' at end of string interpolation