ast-grep-vscode icon indicating copy to clipboard operation
ast-grep-vscode copied to clipboard

Extension causing hang on save with "Getting code actions from 'ast-grep VSCode:....."

Open evelant opened this issue 1 year ago • 4 comments

Per the title, after installing the extension and setting up a config for my project saving files hangs on code actions. sg-grep works fine on the command line and the linting works fine in the editor. Only saving is the problem. There is no useful output in the output panel, only

[Info  - 1:33:30 PM] file opened!
Parsing doc.
Publishing init diagnostics.

evelant avatar May 13 '24 17:05 evelant

Would you mind having a reproduction repo so I can have a look? thanks!

HerringtonDarkholme avatar May 13 '24 18:05 HerringtonDarkholme

I set "source.fixAll": "never in edit.codeActionsOnSave in settings and that seems to have fixed it. I don't have a minimal reproduction at the moment.

evelant avatar May 13 '24 19:05 evelant

Oops I guess I spoke too soon. That appeared to fix it but did not. It's still happening. I'll see if I can figure out a minimal reproduction.

evelant avatar May 13 '24 22:05 evelant

🤦 and I had forgotten that I had a different setting for that in workspace config. With "source.fixAll": "never" the problem does not occur. It was happening with "source.fixAll.eslint": "explicit", so that's a clue.

evelant avatar May 15 '24 20:05 evelant