kbenzie / vim-spirv

A vim plugin for the Khronos Group's SPIR-V standard.
MIT License
30 stars 2 forks source link

Automatic disassembly/assembly of SPIR-V binary files can't be disabled #11

Closed AlexeySachkov closed 3 years ago

AlexeySachkov commented 3 years ago

Hi,

There is an option g:spirv_enable_autodisassemble, but it is only used to enable/disable highlighting of IDs and OpExtImport errors when opening a binary SPIR-V files. Autocommands for assembly/disassembly binary SPIR-V files are added uncoditionally:

https://github.com/kbenzie/vim-spirv/blob/9b005a0569fa5e18f71fcccbacda227c1cef7eaa/plugin/spirv.vim#L29-L39

This means that even if I set g:spirv_enable_autodisassemble = 0 I will still see the following error when opening a binary SPIR-V file:

spirv-dis failed
Error detected while processing BufRead Autocommands for "*.spv"..function spirv#disassemble:
line   13:
E484: Can't open file /tmp/vzQKVBI/1

I guess this is not an important issue, because with autodisassemble disabled I wouldn't open binary files anyway

kbenzie commented 3 years ago

Thanks for the bug report. This looks a lot like I've made a mistake, I'll look into it :smile:

kbenzie commented 3 years ago

This should now be fixed.