vknabel / vscode-swiftformat

SwiftFormat for VS Code
https://marketplace.visualstudio.com/items?itemName=vknabel.vscode-swiftformat
MIT License
43 stars 8 forks source link

SwiftFormat hanging for long time #34

Open adam-fowler opened 9 months ago

adam-fowler commented 9 months ago

Sometimes when saving a file I get the following dialog appearing for at least a minute. While this dialog is displayed most operations in VSCode do not work.

Screenshot 2023-12-14 at 17 18 50

The only options I have set are

    "swiftformat.path": "/Users/adamfowler/.mint/bin/swiftformat",
    "swiftformat.onlyEnableWithConfig": true,
vknabel commented 9 months ago

Hi, thanks for your report! When this happened, were you working in a project with a SwiftFormat dependency? Eventually the build process of it might have delayed formatting the file? I’ll definitely have a look on this annoying bug.

adam-fowler commented 9 months ago

No SwiftFormat dependency. I've seen this while working on https://github.com/hummingbird-project/hummingbird and https://github.com/soto-project/soto.

It is intermittent so hard to narrow down.

jsonfry commented 7 months ago

I've been noticing this too, I have swift format installed with brew. It seemed to start happening after v1.6.4 (so from v1.6.5)

2288-256 commented 3 months ago

I have encountered the same problem and am currently using v1.6.4 to work around this bug. Is there any progress on this bug?