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

neotest adapter: the argument '--no-run' cannot be used multiple times #357

Closed
4 of 6 tasks
grihabor opened this issue Apr 14, 2024 · 4 comments · Fixed by #358
Closed
4 of 6 tasks

neotest adapter: the argument '--no-run' cannot be used multiple times #357

grihabor opened this issue Apr 14, 2024 · 4 comments · Fixed by #358
Labels
bug Something isn't working

Comments

@grihabor
Copy link

grihabor commented Apr 14, 2024

Have you read the docs and searched existing issues?

Neovim version (nvim -v)

v0.9.4

Operating system/version

Ubuntu 22.04

Output of :checkhealth rustaceanvim

==============================================================================
rustaceanvim: require("rustaceanvim.health").check()

Checking for Lua dependencies ~
- OK [mfussenegger/nvim-dap](https://github.com/mfussenegger/nvim-dap) installed.

Checking external dependencies ~
- OK rust-analyzer: found rust-analyzer 1.75.0 (82e1608 2023-12-21)
- OK Cargo: found cargo 1.75.0 (1d8b05cdd 2023-11-20)
- OK rustc: found rustc 1.75.0 (82e1608df 2023-12-21)
- OK debug adapter: found codelldb 

Checking config ~
- OK No errors found in config.

Checking for conflicting plugins ~
- OK No conflicting plugins detected.

Checking for tree-sitter parser ~
- OK tree-sitter parser for Rust detected.

How to reproduce the issue

Open a rust project, navigate to any test, set a breakpoint, then:

lua require("neotest").run.run({strategy = "dap"})

Test should stop on a breakpoint, then

lua require("neotest").run.stop()

Then run the test again:

lua require("neotest").run.run({strategy = "dap"})


### Expected behaviour

Test stops on the breakpoint and keeps waiting.

### Actual behaviour

Throws an error:
```bash 
Command: cargo test --no-run --no-run --no-run --no-run --no-run --no-run --no-run --package pyny_index_tests --test integration_test --message-format=json
stdout: error: the argument '--no-run' cannot be used multiple times

The minimal config used to reproduce this issue.

Lazy.nvim rustaceanvim config:

return {
    "mrcjkb/rustaceanvim",
    version = "^4",
    ft = { "rust" },
    config = function()
        vim.g.rustaceanvim = function()
            local extension_path = vim.env.HOME .. "/.nix-profile/share/vscode/extensions/vadimcn.vscode-lldb/"
            local codelldb_path = extension_path .. "adapter/codelldb"
            local liblldb_path = extension_path .. "lldb/lib/liblldb.so"

            local cfg = require("rustaceanvim.config")
            return {
                on_attach = require("config.lsp"),
                dap = {
                    adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path),
                },
            }
        end
    end,
}

Install codelldb via (nix) home manager:

    pkgs.vscode-extensions.vadimcn.vscode-lldb
@mrcjkb
Copy link
Owner

mrcjkb commented Apr 14, 2024

Hey 👋

Thanks for the detailed report 🙏
A fix is on the way.

@grihabor
Copy link
Author

grihabor commented Apr 15, 2024

Thank you for the fast fix! 👍

@grihabor
Copy link
Author

@mrcjkb I've just checked the latest version, now I'm getting

rustaceanvim: ...re/nvim/lazy/rustaceanvim/lua/rustaceanvim/overrides.lua:69: attempt to call field 'list_contains' (a nil value)

I think it's related to the change in #358

@mrcjkb
Copy link
Owner

mrcjkb commented Apr 15, 2024

@mrcjkb I've just checked the latest version, now I'm getting

rustaceanvim: ...re/nvim/lazy/rustaceanvim/lua/rustaceanvim/overrides.lua:69: attempt to call field 'list_contains' (a nil value)

I think it's related to the change in #358

Oops, I was using a neovim nightly API call.
Fixed in version 4.22.4.

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