lhl2617 / VSLilyPond-PDF-preview

Provides PDF Preview for LilyPond-generated PDFs. Supports point-and-click from PDF to source code.
https://marketplace.visualstudio.com/items?itemName=lhl2617.lilypond-pdf-preview
MIT License
7 stars 8 forks source link

Formatter hangs when saving files (with format-on-save) #117

Closed pimlottc closed 1 year ago

pimlottc commented 1 year ago

When I try to save a lilypond document, and the lilypond formatter runs automatically (due to format-on-save), the "Saving" dialog just spins until I hit cancel. I have tried waiting upwards of 3 minutes and it still is just sitting there.

As a test case, I am using this simple file:

{
  c' e' g' e'
          }

As far as I can tell from the exthost logs, the formatter seems to be executing successfully within moments:

%  tail -f 3-VSLilyPond\ Formatter.log
[COMMAND]: /Users/chris/.pyenv/versions/3.10.0/bin/python -c "import ly"
[LOG]: Reformatting "/Users/chris/projects/lilypond/example.ly" with "/Users/chris/.pyenv/versions/3.10.0/bin/python", timeout: "10000ms"
[COMMAND]: /Users/chris/.pyenv/versions/3.10.0/bin/python -m ly reformat /Users/chris/projects/lilypond/example.ly
[LOG]: Formatting succeeded.

However, the UI does not seem to notice this and the contents of the editor are never updated with the reformatted version.

I can also run the same command and see that it runs without problem:

% time /Users/chris/.pyenv/versions/3.10.0/bin/python -m ly reformat /Users/chris/projects/lilypond/example.ly
\

{
  c' e' g' e'
}
/Users/chris/.pyenv/versions/3.10.0/bin/python -m ly reformat   0.07s user 0.01s system 95% cpu 0.094 total

Any ideas on what's going on here?

pimlottc commented 1 year ago

Moved to lhl2617/VSLilyPond-formatter which seems more appropriate