Giter VIP home page Giter VIP logo

cmake-gtest.nvim's People

Contributors

faybe avatar hfn92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cmake-gtest.nvim's Issues

INVALID -- Cannot call async function from non-async context

When I try to :ConfigureGtest I get this error:

Error executing Lua callback: ~/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:193: Cannot call async function from non-async context
stack traceback:
        [C]: in function 'error'
        ~/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:193: in function 'wait'
        ~/.local/share/nvim/lazy/nvim-nio/lua/nio/control.lua:141: in function 'wait'
        ~/.local/share/nvim/lazy/neotest-gtest/lua/neotest-gtest/executables/init.lua:28: in function ~/.local/share/nvim/lazy/neotest-gtest/lua/neotest-gtest/executables/init.lua:27>

Versions:

  • neovim v0.10.0-dev-2754+g12240600f
  • neotest v5.0.1 @ e07fe82
  • neotest-gtest 6e794ac

At work, I have a setup similar to:

repo                       <--- top of a "monorepo"
  .git
  subdir                   <--- I work in this tree (pwd for neovim)
    CMakeLists.txt
    lib
      CMakeLists.txt       <--- library built here
      tests
        test_foo.cpp
        CMakeLists.txt     <--- tests added here
  build
    CTestTestfile.cmake    <--- top level index into tests
    lib
      tests
        test_foo           <--- test executable

Reproduce:

  • :e lib/tests/test_foo.cpp
  • require("neotest").summary.open() -- everything works correctly (I see a list of my tests, tests in current file are highlighted in purple)
  • use m to mark my tests in the split window (now highlighted in orange)
  • run :ConfigureGtest and I get the messages pasted above
  • I git to get rid of them and am presented with:
Select executable for marked nodes:
1: build/lib/tests/test_foo
2: Enter path...
Type number and <Enter> or click with the mouse (q or empty cancels):
  • I select build/lib/tests/test_foo
  • navigate to a test case and require("neotest").run.run(vim.fn.expand("%"))
  • I get the following...
neotest-gtest: ~/.local/share/nvim/lazy/nvim-nio/lua/nio/init.lua:119: The coroutine failed with this message:
vim/_editor.lua:0: E5560: nvim_echo must not be called in a lua loop callback
stack traceback:
        [C]: in function 'nvim_echo'
        vim/_editor.lua: in function 'notify'
        ~/.local/share/nvim/lazy/neotest-gtest/lua/neotest-gtest/report.lua:238: in function '_notify_if_incomplete_results'
        ~/.local/share/nvim/lazy/neotest-gtest/lua/neotest-gtest/report.lua:223: in function 'results'
        ~/.local/share/nvim/lazy/neotest/lua/neotest/client/runner.lua:132: in function '_run_spec'
        ~/.local/share/nvim/lazy/neotest/lua/neotest/client/runner.lua:89: in function ~/.local/share/nvim/lazy/neotest/lua/neotest/client/runner.lua:88>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.