Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: neotest-golang shows WARN when there are build errors #218

Closed
2 tasks done
abhipranay opened this issue Nov 19, 2024 · 2 comments · Fixed by #219
Closed
2 tasks done

bug: neotest-golang shows WARN when there are build errors #218

abhipranay opened this issue Nov 19, 2024 · 2 comments · Fixed by #219
Labels
bug Something isn't working

Comments

@abhipranay
Copy link

Did you check docs and existing issues?

Neovim version (nvim -v)

NVIM v0.10.0

Operating system/version

MacOS 14.7.1

Output from :checkhealth neotest-golang

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

Requirements ~
- OK Binary 'go' found on PATH: /opt/homebrew/bin/go
- OK Found go.mod file for 
- 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: 
- OK dap is available
- OK dapui is available
- OK dap-go is available

Gotestsum (optional) ~
- OK Binary 'gotestsum' found on PATH: 
- Found gotestsum to be installed, but not set as test runner.

Describe the bug

I am using Lazyvim.
Below warning message is shown if build fails due to come error during compilation.

WARN | 2024-11-19T22:32:17Z+0100 | .../nvim/lazy/neotest-golang/lua/neotest-golang/logging.lua:69 | [neotest-golang] Test(s) not associated (not found/executed):

On checking the logs further I found this might be due to go test non-json output on stdout during build failure. golang team already has this issue

Steps To Reproduce

  1. Write a test.
  2. Introduce some compilation error.
  3. Run tests.

Expected Behavior

Warning notification should not appear. Output should show build related errors in panel.

Your Lua setup

Default config.
@abhipranay abhipranay added the bug Something isn't working label Nov 19, 2024
@fredrikaverpil
Copy link
Owner

Thanks @abhipranay for the report!
I'm working on a fix in #219

@fredrikaverpil
Copy link
Owner

fredrikaverpil commented Nov 30, 2024

Hey again @abhipranay if you update neotest-golang to use what's on the main branch, you should now see updated behavior.

You can e.g. set branch = "main" if you are using the lazy.nvim package manager.

Please let me know what you think!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants