-
Notifications
You must be signed in to change notification settings - Fork 22
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
Exclusively applicable fix-its aren't testable #14
Comments
Edited: The proposed "fixes" format below is now a simple string. Whelp, my initial proposal is actually still too simplistic. To fully model the diagnostics domain would require another level of nesting:
Notes:
|
Hey @gohanlon, just wanted to thank you for looking into this issue and to let you know we have seen it! We've just been quite busy with some other things, but we hope to get back to it soon. Most likely in the near year. |
No worries! I’ve implemented the proposal and will have a PR ready soon to advance our discussion when the time is right. While wrapping up the PR, I found and fixed a bug exposed by the new format, where fix-its were misapplied. The issue was with (Swift’s) |
@gohanlon Appreciate it! If it's not too much trouble, though, I think we'd take that |
Indeed, the |
Description
I have a diagnostic with several fix-its, where only one can be applied. Here's the usage, and note that, while
diagnostics
is correct and (very!) useful, bothfixes
andexpansion
are nonsensical:To show the actual fix-it behavior applied in Xcode, here's a theoretical array syntax format:
And, a theoretical dictionary syntax format:
What do you think?
P.S.: swift-macro-testing is great—I'm heavily using/abusing it. Thank you!
Checklist
main
branch of this package.Expected behavior
Each fix-it should be applied to the original source independently, each producing a corresponding fixed-source string.
Actual behavior
It's assumed that all fix-its can always be applied on top of each other, accumulating into a single string.
Steps to reproduce
No response
swift-macro-testing version information
0.2.2
Destination operating system
macOS 14.1.2
Xcode version information
Xcode Version 15.0.1 (15A507)
Swift Compiler version information
The text was updated successfully, but these errors were encountered: