Skip to content

"Failed lookups for" in Logs and Unresponsive Zed #31

@fanzeyi

Description

@fanzeyi

I am not sure if this should be a tsgo issue or Zed extension issue so I will start here.

It looks like when I open our project we get lines like these in logs

// Send:
{"jsonrpc":"2.0","id":"ts589","result":null}

// Receive:
{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":4,"message":"Added new watch: failed lookups for /Users/zeyi.f/repo/webapp/web/tsconfig.jest.json watcher 160.555"}}

// Receive:
{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":4,"message":"\t/Users/zeyi.f/repo/<subpath redacted>/node_modules/**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,json}"}}

This is causing Zed to use 100 of the CPU and being very unresponsive. The log seems to suggest watchers are not created in time?

Similar issue reported in microsoft/typescript-go#2129 and they suggested to raise the issue with Cursor.

Looking at the paths being asked to watch, these are just regular subdirectories in src file in our project. They aren't supposed to have node_modules in them.


I also did a sample on Zed trying to figure out why it is busy. Top frames are

    + !                                     :   913 _RNvNtNtNtCs1XiSPhL853E_4gpui8platform3mac10dispatcher10trampoline  (in zed) + 700  [0x106797444]
    + !                                     :   | 825 _RNvMs2_NtCs3r8rNYxHWHu_10async_task3rawINtB5_7RawTaskINtNvNtCs8Da3dLp7jUy_9scheduler8executor32spawn_local_with_source_location7CheckedNCINvMs6_NtCs1XiSPhL853E_4gpui3appNtB2i_3App5spawnNCINvMs0_NtB2i_7contextINtB36_7ContextNtNtCs5Jp5easStBD_7project9lsp_store8LspStoreE5spawnNCNCNvMsa_B3B_NtB3B_33LanguageServerWatchedPathsBuilder5build00uE0uE0EuNCINvMBU_NtBU_18ForegroundExecutor5spawnB29_E0NtBW_12RunnableMetaE3runB3D_  (in zed) + 560  [0x1088315d0]
    + !                                     :   | + 824 _RNvXs_NvNtCs8Da3dLp7jUy_9scheduler8executor32spawn_local_with_source_locationINtB4_7CheckedNCINvMs6_NtCs1XiSPhL853E_4gpui3appNtB1A_3App5spawnNCINvMs0_NtB1A_7contextINtB2o_7ContextNtNtCs5Jp5easStBD_7project9lsp_store8LspStoreE5spawnNCNCNvMsa_B2T_NtB2T_33LanguageServerWatchedPathsBuilder5build00uE0uE0ENtNtNtCsiMcf32LsBml_4core6future6future6Future4pollB2V_  (in zed) + 444  [0x108be19a0]
    + !                                     :   | + ! 824 _RNCNvXsV_Cs64S4B7n11oj_2fsNtB7_6RealFsNtB7_2Fs5watch0B7_  (in zed) + 364  [0x105fd5b08]
    + !                                     :   | + !   688 _RNvXs_NtCs64S4B7n11oj_2fs11mac_watcherNtB4_10MacWatcherNtB6_7Watcher3add  (in zed) + 1008  [0x105feb6d4]
    + !                                     :   | + !   : 508 _RNvMs1_Cs7GG9lC3pQOz_7fseventNtB5_11EventStream3new  (in zed) + 552  [0x105fee338]
    + !                                     :   | + !   : | 508 FSEventStreamCreate  (in FSEvents) + 76  [0x190d07cb4]
    + !                                     :   | + !   : |   411 _FSEventStreamCreate  (in FSEvents) + 1248  [0x190d0cb34]
    + !                                     :   | + !   : |   + 369 watch_all_parents  (in FSEvents) + 412  [0x190d0afe0]

so it looks like it's busy creating a lot watches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions