Skip to content
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

Continuing to get Xcode crash on CMD+S save with SwiftFormat #1897

Open
WestFlow127 opened this issue Oct 1, 2024 · 3 comments
Open

Continuing to get Xcode crash on CMD+S save with SwiftFormat #1897

WestFlow127 opened this issue Oct 1, 2024 · 3 comments

Comments

@WestFlow127
Copy link

I have recently upgraded to macOS Sonoma/Xcode 16, and continue to get an Xcode crash when I save my swift file.
It does not happen every time, but about ~10% of file-saves do this.
My current SwiftFormat build is 0.54.5.

Would it help if I attached my Xcode crash report here?
I thoroughly like using SwiftFormat, but the Xcode crashes can cause me to lose changes.
Thanks

@nicklockwood
Copy link
Owner

I'm a bit confused. SwiftFormat does not have a mechanism for formatting on save in Xcode - is that something you have implemented yourself?

And if not, what leads you to believe that SwiftFormat is the cause of the crashes?

@WestFlow127
Copy link
Author

WestFlow127 commented Oct 1, 2024

@nicklockwood yes, I've added a keyboard shortcut demonstrated in this tutorial here.
The indication of something SwiftFormat related with regards to the crash is the crash happens immediately after the shortcut CMD+S is executed and otherwise does not occur.

@WestFlow127
Copy link
Author

WestFlow127 commented Oct 1, 2024

In theory, it may be because Xcode is trying to save the file during the formatting process (writing to the swift file) which bugs out Xcode to abort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants