fredrikaverpil / neotest-golang

Reliable Neotest adapter for running Go tests in Neovim.
MIT License
141 stars 17 forks source link

bug: updating nvim-treesitter to 0.9.2 doesn't detect tests #207

Closed minizilla closed 1 month ago

minizilla commented 1 month ago

Did you check docs and existing issues?

Neovim version (nvim -v)

NVIM v0.10.1

Operating system/version

NixOS 24.11 (Vicuna)

Output from :checkhealth neotest-golang

neotest-golang: require("neotest-golang.health").check()

Requirements ~
- OK Binary 'go' found on PATH: /nix/store/ipdsqmj2pa49qam4j3hml54ambcz3acy-go-1.19.8/bin/go
- OK Found go.mod file for /home/minizilla/personal/testr/example_test.go in /home/minizilla/personal/testr/go.mod
- OK Treesitter parser for go is installed
- OK neotest is available
- OK nvim-treesitter is available
- OK nio is available
- OK plenary is available

DAP (optional) ~
- OK Binary 'dlv' found on PATH: /run/current-system/sw/bin/dlv
- OK dap is available
- WARNING dapui is not available
- OK dap-go is available

Describe the bug

Updating nvim-treesitter to 0.9.2 doesn't detect tests, resulting in No tests found. Many neotest adapter also report the same thing, one of them is neotest-jest#99, their fixed it in this PR.

Although this is breaking change, I think its necessary since nvim-treesitter is a big part of neotest.

Downgrading back to 0.9.1 does works too.

Steps To Reproduce

  1. Use nvim-treesitter 0.9.2
  2. Run test (resulting in No test found)

Expected Behavior

The test should works.

Your Lua setup

No response

fredrikaverpil commented 1 month ago

Hey @minizilla please do not use nvim-treesitter tags. They are too old. Version 0.9.2 is from January 19th, around 9 months old. The last commit to the main branch was today. Just go with the latest commit on their main branch and you'll be fine.

fredrikaverpil commented 1 month ago

I'm closing this issue. Let me know if you think we should reopen it.

minizilla commented 1 month ago

You right, updating to the latest commit works. Thanks