Skip to content

"Build workspace" provides no feedback #196

Open
@Zylann

Description

@Zylann

As a new Zig user, I figured I could use the "Build workspace" command to build my project, which seems to work.

The issue is that there is no feedback of what the command is doing. It eventually succeeds and my executable updates, but there is no way to tell what it does, when it finishes, or even if it runs at all (though it does so far). If there are errors, they do show up in the Problems panel and there are squiggles in the code, which is nice. But otherwise, nothing.

I can't see logs in the output panel. I tried switching it to Zig, or Zig Language Server, still nothing. I didn't notice anything in the status bar either, and couldn't see a particular setting. So I kept doing Ctrl+Shift+Build workspace, having to wait a bit, and then run hoping it finished by then. I'm wondering if I'm missing something?


Alternatively, I created a tasks.json, which I think is better since I can decide to create my own build configurations and choose on the fly:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Zig build",
            "type": "shell",
            "command": "D:/Apps/Zig/zig-windows-x86_64-0.11.0/zig.exe",
            "args": [
                "build",
                "-Doptimize=Debug",
                // "-Doptimize=ReleaseFast",
                "--summary",
                "all"
            ],
            "options": {"cwd": "${workspaceRoot}"},
            "presentation": {
                "echo": true,
                "reveal": "always",
                "focus": false,
                "panel": "shared",
                "showReuseMessage": true,
                "clear": false
            },
            "problemMatcher": [],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

Using tasks does open the Terminal and prints what's happening, which is great. One problem however, is that if compiling encounters errors, they do not show up in the Problems panel and don't produce squiggles in code. This is quite inconvenient and I wonder how I can make this work? Surely there should be a way, since "Build workspace" somehow had that?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions