You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dprint hangs when two process plugins run (.mts vs. .java) #969
Note: I don't know yet if this is a bug with dprint or with my plugins, but I have ran out of ideas on how to troubleshoot this.
Version: 0.49.0
Hey folks, I'm not super sure about the root cause, but when I run two custom process plugins, one written in MTS and another in Java, dprint hangs and doesn't exit. I ran it with verbose logs and I can't see anything unusual.
I ran strace for the dprint parent process and this is what it returns:
Okay so after some debugging we've figured out that the bug was in our palantir-java-format plugin. It spawned a repeated timer to check the parent process ID and that timer wasn't properly cancelled -- this meant the process was held running forever. The fix was easy enough -- cancel that timer when the "shutdown" message is received.
The open question, however, is why the plugin worked fine when run without our prettier plugin..
Activity
marioplumbeer commentedon Mar 6, 2025
Update: I passed the same .java process plugin twice to dprint, and it didn't hang.
bradzacher commentedon Mar 6, 2025
--verboselogs:bradzacher commentedon Mar 6, 2025
Okay so after some debugging we've figured out that the bug was in our
palantir-java-formatplugin. It spawned a repeated timer to check the parent process ID and that timer wasn't properly cancelled -- this meant the process was held running forever. The fix was easy enough -- cancel that timer when the "shutdown" message is received.The open question, however, is why the plugin worked fine when run without our prettier plugin..
dsherret commentedon Mar 7, 2025
Does it happen when running with
--incremental=false?