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

Commands not executed on Windows #10

Open
lobneroO opened this issue Jun 28, 2024 · 4 comments
Open

Commands not executed on Windows #10

lobneroO opened this issue Jun 28, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@lobneroO
Copy link

lobneroO commented Jun 28, 2024

I had hoped fixing the globals issue would solve this, but sadly it doesn't.

On Windows, commands are not executed. They are printed into a terminal, but they don't do anything.

Also, when trying to execute, it will do so just once. I can close the terminal afterwards and call up the same task again, but now not even the terminal gets opened anymore until I restart nvim.

There is no output that I can see at all (apart from terminal the first time)

automaton_3.mp4

I tested this in Windows Terminal on both Powershell and Git-Bash. In WSL, it works, but also only once. On my Arch Linux system, I didn't notice any such problems.

@Dax89 Dax89 added the bug Something isn't working label Jun 28, 2024
@Dax89
Copy link
Owner

Dax89 commented Jun 28, 2024

Can I see tasks.json?

So the command is executed only once? In runner.lua there is a "jobs map" which prevents to execute the same command if it's still running, maybe (for some reason) it's not cleared when the task is completed.

@lobneroO
Copy link
Author

I have tried it in both a C++ and a Rust project

Rust:

{
    version: "1.0.0",

    tasks: [
        {
            name: "build",
            type: "shell",
            default: "true",
            command: "cargo build",
            quickfix: true,
            compiler: "cargo",
        }
    ]
}

C++

{
    version: "1.0.0",

    tasks: [
        {
            name: "test",
            cwd: "${workspace_folder}",
            type: "shell"
            command: "cmake -S . -B build"
        }
    ]
}

I'll look at the runner when I find the time

@Dax89
Copy link
Owner

Dax89 commented Jun 28, 2024

I'm setting up a VM with windows 10 so I can check if I find something this weekend.

@lobneroO
Copy link
Author

I put some time into debugging this. The issue seems that vim.fn.jobstart never seems to finish (or perhaps even start?). Right now, I don't know how to debug this further.
I use git-bash on Windows as my nvim shell, but I also tried Powershell. Same (lack of) effect.

I don't think the terminal itself is the problem though. I use toggleterm as well and I can execute commands in it.

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

No branches or pull requests

2 participants