vim-glance icon indicating copy to clipboard operation
vim-glance copied to clipboard

Glance crashes with WASM related dependency from asciidoc

Open peacock0803sz opened this issue 9 months ago • 1 comments

It likes caused by asciidoctor-wasm's breaking changes...?

Error (with g:denops#debug and g:denops#trace)

[denops] Spawn server [0/3]
[denops] Server started: ['deno', 'run', '-q', '--no-lock', '-A', '/Users/peacock/ghq/github.com/vim-denops/denops.vim/denops/@denops-private/cli.ts', '--quiet', '--identity', '--port', '0']
[denops] Server listen: 127.0.0.1:51277
[denops] Channel connected (127.0.0.1:51277)
[denops] DenopsReady
[denops] load plugin: ['glance', '/Users/peacock/ghq/github.com/tani/vim-glance/denops/glance/main.ts']
[denops] 1 plugins are discovered
[denops] DenopsPluginPre:glance
[denops] DenopsPluginPost:glance
[denops] Listening on http://127.0.0.1:8765/
[denops] Unhandled rejection: LinkError: WebAssembly.instantiate(): Import #22 "canonical_abi" "resource_new_rb-iseq": function import requires a callable
[denops]     at RubyVM.instantiateModule (file:///Users/peacock/Library/Caches/deno/npm/registry.npmjs.org/@ruby/wasm-wasi/2.7.1/dist/esm/vm.js:34:44)
[denops]     at DefaultRubyVM (file:///Users/peacock/Library/Caches/deno/npm/registry.npmjs.org/@ruby/wasm-wasi/2.7.1/dist/esm/browser.js:16:43)
[denops]     at _Asciidoctor.initFromModule (file:///Users/peacock/Library/Caches/deno/npm/registry.npmjs.org/asciidoctor-wasm/0.2023.19/dist/browser.js:35:26)
[denops]     at _Asciidoctor.initFromURL (file:///Users/peacock/Library/Caches/deno/npm/registry.npmjs.org/asciidoctor-wasm/0.2023.19/dist/browser.js:49:36)
[denops]     at eventLoopTick (ext:core/01_core.js:177:7)
[denops]     at async AsciidocRenderer.create (file:///Users/peacock/ghq/github.com/tani/vim-glance/denops/glance/asciidoc.ts:14:20)
[denops]     at async file:///Users/peacock/ghq/github.com/tani/vim-glance/denops/glance/main.ts:135:22
[denops] Unhandled rejection: LinkError: WebAssembly.instantiate(): Import #22 "canonical_abi" "resource_new_rb-iseq": function import requires a callable
[denops]     at RubyVM.instantiateModule (file:///Users/peacock/Library/Caches/deno/npm/registry.npmjs.org/@ruby/wasm-wasi/2.7.1/dist/esm/vm.js:34:44)
[denops]     at DefaultRubyVM (file:///Users/peacock/Library/Caches/deno/npm/registry.npmjs.org/@ruby/wasm-wasi/2.7.1/dist/esm/browser.js:16:43)
[denops]     at _Asciidoctor.initFromModule (file:///Users/peacock/Library/Caches/deno/npm/registry.npmjs.org/asciidoctor-wasm/0.2023.19/dist/browser.js:35:26)
[denops]     at _Asciidoctor.initFromURL (file:///Users/peacock/Library/Caches/deno/npm/registry.npmjs.org/asciidoctor-wasm/0.2023.19/dist/browser.js:49:36)
[denops]     at eventLoopTick (ext:core/01_core.js:177:7)
[denops]     at async AsciidocRenderer.create (file:///Users/peacock/ghq/github.com/tani/vim-glance/denops/glance/asciidoc.ts:14:20)
[denops]     at async file:///Users/peacock/ghq/github.com/tani/vim-glance/denops/glance/main.ts:135:22

Environment

  • NVIM v0.11.0-nightly+b90f649
  • deno 2.2.2
  • macOS 15.3.1

Step to repro

Create vimrc.repro with:

set runtimepath+=~/ghq/github.com/vim-denops/denops.vim
set runtimepath+=~/ghq/github.com/tani/vim-glance

" {{{ optional for clipboard
set runtimepath+=~/.local/share/nvim/lazy/capture.vim
set clipboard=unnamedplus
" }}}

let g:denops#debug = v:true
let g:denops#trace = v:true

let g:glance#server_open = v:false

Opening with this vimrc (nvim -u repro.vimrc +Glance README.md), run Glance and move cursor

peacock0803sz avatar Mar 10 '25 02:03 peacock0803sz

Thank you for reporting me. As I have no time to fix asciidoctor-wasm's problem at the moment. So, I will revert change and employ asciidoctor.js again. Thanks.

tani avatar Mar 10 '25 06:03 tani