Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving and running 'Dart' formatter #124686

Closed
Garrison88 opened this issue May 26, 2021 · 5 comments
Closed

Saving and running 'Dart' formatter #124686

Garrison88 opened this issue May 26, 2021 · 5 comments
Labels
info-needed Issue requires more information from poster

Comments

@Garrison88
Copy link

Issue Type: Performance Issue

VS Code hangs while saving a file, even after making just a minor adjustment. It is trying to run the 'Dart' formatter, but never completes. I have tried completely uninstalling VS Code and restarting my Mac, but I am still experiencing the problem. It started when I updated Flutter to 2.2

VS Code version: Code 1.56.2 (Universal) (054a929, 2021-05-12T17:44:30.902Z)
OS version: Darwin x64 20.5.0

System Info
Item Value
CPUs Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 32.00GB (11.23GB free)
Process Argv --crash-reporter-id 3fdaa67d-ab40-4dbe-980d-b458b70df8e3
Screen Reader no
VM 0%
Process Info
CPU %	Mem MB	   PID	Process
   18	   164	  1261	code main
    5	    98	  1265	   gpu-process
    0	    33	  1270	   utility
    4	   393	  1271	   window (master_details_view.dart — cmic_mobile_field)
    0	   197	  1277	     extensionHost
    0	    33	  1316	       /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer) /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=1277
    0	   721	  1335	       /Users/garrison/Development/flutter/bin/cache/dart-sdk/bin/dart /Users/garrison/Development/flutter/bin/cache/dart-sdk/bin/snapshots/analysis_server.dart.snapshot --lsp --client-id=VS-Code --client-version=3.22.0
    0	     0	  1336	       bash /Users/garrison/Development/flutter/bin/flutter daemon
    0	   164	  1355	         /Users/garrison/Development/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev --packages=/Users/garrison/Development/flutter/packages/flutter_tools/.packages /Users/garrison/Development/flutter/bin/cache/flutter_tools.snapshot daemon
    0	     0	  1382	           /usr/bin/script -t 0 /dev/null xcrun xcdevice observe --both
    0	    33	  1383	             /Applications/Xcode.app/Contents/Developer/usr/bin/xcdevice observe --both
    0	    66	  1356	       /Users/garrison/Development/flutter/bin/cache/dart-sdk/bin/dart /Users/garrison/Development/flutter/bin/cache/dart-sdk/bin/snapshots/pub.dart.snapshot global run devtools --machine --try-ports 10 --allow-embedding
    0	    98	  1279	     watcherService
    0	    33	  1433	     searchService
    1	   131	  1278	   shared-process
    0	    33	  1280	     ptyHost
    0	     0	  6289	     /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
    0	    66	  6276	   window (Issue Reporter)
Workspace Info
|  Window (master_details_view.dart — cmic_mobile_field)
|    Folder (cmic_mobile_field): 8211 files
|      File types: svn-base(2037) dart(1421) h(754) png(479) strings(126)
|                  m(115) plist(106) json(96) swift(91)
|                  xcconfig(84)
|      Conf files: settings.json(2) launch.json(1)
|      Launch Configs: dart(9);
Extensions (4)
Extension Author (truncated) Version
bracket-pair-colorizer Coe 1.0.61
dart-code Dar 3.22.0
flutter Dar 3.22.0
material-icon-theme PKi 4.7.0
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
pythonvspyt639:30300192
pythontb:30283811
vspre833:30267464
pythonptprofiler:30281270
vshan820:30294714
pythondataviewer:30285071
vscus158:30286553
vscgsv2:30307504
vscorehovct:30302760
bridgeflight:30302069
vscod805cf:30301675

@IllusionMH
Copy link
Contributor

/needsMoreInfo

Is it reproducible with all extensions disabled?
You can try this with F1 and >Developer: Reload Window With Extensions Disabled

Looks like duplicate of Dart-Code/Dart-Code#3270

@puckerxp
Copy link

After upgrade to Flutter 2.2, I have the same problem.

@dbaeumer
Copy link
Member

Since the dart formatter is involved here I recommend to start with the dart extension. Please report the issue here: https://github.com/Dart-Code/Dart-Code

@t-kozak
Copy link

t-kozak commented Jun 9, 2021

For anyone who ends here through web search (1st page of results), I've created another issue in the Dart-Code: dart-lang/sdk#45996, that was subsequently closed as most probably cause of the problem is this one: dart-lang/sdk#45996 which has been fixed recently.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

6 participants
@IllusionMH @dbaeumer @puckerxp @Garrison88 @t-kozak and others