Dax89 / automaton.nvim

VSCode-Like Workspace Configuration Manager
MIT License
36 stars 3 forks source link

Commands not executed on Windows #10

Open lobneroO opened 3 months ago

lobneroO commented 3 months ago

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)

https://github.com/Dax89/automaton.nvim/assets/17877050/f095d3a2-7a7d-435a-9715-a871565f68bf

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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

lobneroO commented 2 months ago

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.