Skip to content

FormatOnSave takes a long time #3958

@mdegans

Description

@mdegans

Preflight Checklist

Issue Summary

Issue

Format on save can take minutes to save in vscode. This issue keeps getting closed without being fixed. Unable to repro != issue does not exist.

This seems to not be an issue when first restarting VsCode but after a while save stalls, so possible resource leak maybe? May also be macOS specific. I have not had this happen on other platforms.

Fixes

Uninstall prettier vscode extension.

See Also

Reproduction Repository

https://github.com/mdegans/misanthropic

Steps to Reproduce

  1. Install VsCode extension (on macOS, in my case)
  2. Use VsCode for a few hours
  3. Try to save. Doesn't seem to matter what format. In my case prettier usually gets in the way of rustfmt.

Expected Behavior

The file gets formatted more or less immediately

Actual Behavior

Save hangs, blocking many things

Operating System

macOS

IDE

VSCode

IDE Version

does not matter

Prettier Extension Version

for a year at least

Prettier Version

3.8.1

Prettier Extension Logs

Uninstalled problematic extension. Logs gone.

Prettier Configuration

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage-pendingAwaiting initial triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions