Skip to content

hung when I use denops.dispatch("", "") #415

@kamecha

Description

@kamecha

Describe the bug

hung when I fire :call denops#request("hoge", "hung_dispatch") that denops plugin's dispatch

Provide a minimal vimrc with less than 50 lines to reproduce

denops plugin which has denops.dispatch("", "")

to reproduce this behavior you have to make simple denops plugin.
make directory like bellow.

.
└── denops
    └── test
        └── main.ts

main.ts

import type { Entrypoint } from "jsr:@denops/[email protected]";

export const main: Entrypoint = (denops) => {
  denops.dispatcher = {
    dispatch_none: async () => {
      await denops.dispatch("", "");
    },
  };
};

.vimrc

set rtp+=~/path/to/vim-denops/denops.vim
set rtp+=~/path/to/above/directory

How to reproduce the problem from Vim startup

  1. type :call denops#request("test", "dispatch_none", [])
  2. hung

Expected behavior

denops return something like error, and I can operate vim after firing dispatch.

Actual behavior

after firing the dispatch I can't operate vim ( hung ).

Screenshots (if need)

Your environment

  • OS: uname -a (macOS/Linux) or ver (Windows)
    Linux DESKTOP 5.15.90.1-microsoft-standard-WSL2+ #2 SMP Thu Aug 31 01:45:54 JST 2023 x86_64 x86_64 x86_64 GNU/Linux

  • Deno version: deno --version
    deno 1.46.1 (stable, release, x86_64-unknown-linux-gnu)
    v8 12.9.202.2-rusty
    typescript 5.5.2

  • Vim/Neovim version: vim --version or nvim --version
    NVIM v0.11.0-dev-408+gb1aa8f5eb
    Build type: RelWithDebInfo
    LuaJIT 2.1.1720049189

  • Denops version: git log -1 (run in the denops.vim repository)
    commit f32f028 (HEAD -> main, origin/main, origin/HEAD)
    Merge: 45b8a1c 604b394
    Author: Λlisue
    Date: Fri Aug 30 08:16:33 2024 +0900

    Merge pull request 👍 no package json #414 from vim-denops/no-package-json

    👍 no package json

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions