This repository has been archived by the owner on Aug 12, 2023. It is now read-only.
Tauri app forecd recompile when opening or editing C++ files #1572
Labels
bug
Something isn't working
FAQ
Issues
Neovim Version
v0.9.0
Dev Version?
Operating System
Arch Linux
Minimal Config
Steps to Reproduce
# On Arch Linux pacman -S webkit2gtk pnpm
git clone https://github.com/dosx001/suit cd suit pnpm i pnpm tauri dev
cd suit/src-tauri/clib nvim --clean -u YOUR/PATH/minimal_init.lua TestExec.cpp
Reproducibility Check
minimal_init.lua
template and that my issue is reproducible by runningnvim --clean -u minimal_init.lua
and following the steps above.Expected Behavior
When I save a C++ file my Tauri app recompiles.
Actual Behavior
When I open, edit, or save a C++ file my Tauri app recompiles.
Debug Log
[TRACE Sun 21 May 2023 03:08:33 PM PDT] .../site/pack/packer/start/null-ls.nvim/lua/null-ls/rpc.lua:102: received LSP request for method shutdown
[TRACE Sun 21 May 2023 03:08:33 PM PDT] .../site/pack/packer/start/null-ls.nvim/lua/null-ls/rpc.lua:127: received LSP notification for method exit
[TRACE Sun 21 May 2023 03:08:34 PM PDT] ...te/pack/packer/start/null-ls.nvim/lua/null-ls/client.lua:97: starting null-ls client
[TRACE Sun 21 May 2023 03:08:34 PM PDT] .../site/pack/packer/start/null-ls.nvim/lua/null-ls/rpc.lua:102: received LSP request for method initialize
[DEBUG Sun 21 May 2023 03:08:34 PM PDT] ...te/pack/packer/start/null-ls.nvim/lua/null-ls/client.lua:152: unable to notify client for method textDocument/didOpen (client not active): {
textDocument = {
uri = "file:///home/dosx/repos/gui/suit/src-tauri/clib/TestExec.cpp"
}
}
[TRACE Sun 21 May 2023 03:08:34 PM PDT] .../site/pack/packer/start/null-ls.nvim/lua/null-ls/rpc.lua:127: received LSP notification for method initialized
[TRACE Sun 21 May 2023 03:08:34 PM PDT] .../site/pack/packer/start/null-ls.nvim/lua/null-ls/rpc.lua:127: received LSP notification for method textDocument/didOpen
[TRACE Sun 21 May 2023 03:08:34 PM PDT] ...ack/packer/start/null-ls.nvim/lua/null-ls/generators.lua:21: running generators for method NULL_LS_DIAGNOSTICS_ON_OPEN
[DEBUG Sun 21 May 2023 03:08:34 PM PDT] ...t/null-ls.nvim/lua/null-ls/helpers/generator_factory.lua:320: spawning command "cppcheck" at /home/dosx/repos/gui/suit with args { "--enable=warning,style,performance,portability", "--template=gcc", "/home/dosx/repos/gui/suit/src-tauri/clib/.null-ls_814785_TestExec.cpp" }
[TRACE Sun 21 May 2023 03:08:34 PM PDT] ...t/null-ls.nvim/lua/null-ls/helpers/generator_factory.lua:204: error output: Checking /home/dosx/repos/gui/suit/src-tauri/clib/.null-ls_814785_TestExec.cpp ...
[TRACE Sun 21 May 2023 03:08:34 PM PDT] ...t/null-ls.nvim/lua/null-ls/helpers/generator_factory.lua:205: output: nil
[TRACE Sun 21 May 2023 03:08:34 PM PDT] ...ck/packer/start/null-ls.nvim/lua/null-ls/diagnostics.lua:181: received diagnostics from source 1
[TRACE Sun 21 May 2023 03:08:34 PM PDT] ...ck/packer/start/null-ls.nvim/lua/null-ls/diagnostics.lua:182: {}
Help
Yes
Implementation Help
Background
Tauri is a framework for building cross-platform applications. Backend is written
in Rust and frontend is written in web technologies like JavaScript frameworks.
When running your Tauri app in dev mode, your app will recompile on any saved
changes on the backend.
My Usage Case
In my Tauri app backend, I'm using Rust C++ bindings to run C++ code I've written.
Debugging
I wasn't seeing the same behavior with CMake and CMake_lint.
I also tested with a random python file and PyLint, same behavior as CMake.
I tried switching between CppCheck with CppLint, end up seeing the same behavior CppCheck.
I tried changing CppCheck's method to
methods.internal.DIAGNOSTICS_ON_SAVE
, no luck.Finding the Bug
diagnostic.lua
M.handler
generator.lua
M.run_registered
generator.lua
M.run
Requirements
The text was updated successfully, but these errors were encountered: