Skip to content

Enhancement: Better build-system compilation logging #17821

Closed
@VisenDev

Description

@VisenDev

Zig Version

0.11.0

Steps to Reproduce and Observed Output

One of my major critiques of the current zig build system is that output when compiling your code just looks kind of gross

steps [3/5] zig build-exe zig Debug native... Semantic Analysis [33208] ... 
LLVM Emit Object...

If you are not familiar with the inner workings of a compiler, something like LLVM emit object feels pretty opaque and uninformative. Compare this to building a project with cmake, which gives you regular compilation progress updates

Screenshot 2023-11-01 at 2 15 08 PM

or Compiling a project in rust

Screenshot 2023-11-01 at 2 16 09 PM

Again, much nicer compilation output

I am aware that passing --summary all to zig build makes the build summary printed after compilation look a bit better. However, this doesn't change the actual output that happens during compilation. Even though this is just an aesthetic change. Providing high quality and satisfying compilation logs in my opinion makes it feel much better to compile your projects, especially given that zig's current compiler performance could be improved.

This specific use case was one of the main reasons that kept me from using the zig build system over CMake for my C projects. Once the build scripts were all written, when it came down to actually using them, CMake produced more modern and more satisfying output. Since as a developer I spend a lot of time waiting for my code to compile, I think its important to improve the quality of this issue

As far as I am aware, I don't know of any issues tracking this or build system flags that can be passed that improve output

Expected Output

It would be much better if the zig build system had more aesthetically pleasing output when compiling a project. This could either be the default or be a flag you can pass to zig build

The output of both Cmake and Cargo would be possible sources of inspiration. Ideally, the build system would show you which files/libraries/modules/steps are being compiled, and approximately how much still needs to be done before the project finishes building.

Metadata

Metadata

Assignees

No one assigned

    Labels

    error messageThis issue points out an error message that is unhelpful and should be improved.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions