Having trouble setting up and building zls 0.13.0

Hello!

Just started out trying zig. Initially installed the developmental version of 0.14.0, and had trouble getting the language to work in CLion IDE. Zig was working as expected otherwise. Now I’m trying to download and build zsl 0.13.0, but i get an error message.

The error indicates I need a greater version to build zls, wich suprises me as im trying to build zls 0.13.0. These are the steps I took. What am I doing wrong?

Zig version expectedly is 0.13.0 running $zig version

Downloaded and extracted zls using:
$ wget https://github.com/zigtools/zls/releases/download/0.13.0/zls-x86_64-linux.tar.xz
$ tar xf zls-x86_64-linux.tar.xz
$ cd zls
$ zig build -Doptimize=ReleaseSafe

Error:

/home/fretry/.local/share/zls/build.zig:574:9: error: Your Zig version does not meet the minimum build requirement:
                                                        required Zig version: 0.14.0-dev.2088+3f7fac5ff (or greater)
                                                        actual   Zig version: 0.13.0
                                                      
                                                      Please download or compile a tagged release of ZLS.
                                                        -> https://github.com/zigtools/zls/releases
                                                        -> https://github.com/zigtools/zls/releases/tag/0.13.0 (may not exist yet)
        @compileError(message);

Welcome to Ziggit @_byta .

The link you downlaoded is a link to the released binaries, not source. When you untar the file you will find a zls binary inside, with version 0.13.0. I’m guessing you had already cloned the zls repository and when you did zig build, it just tried to build that repo.

4 Likes

Thank you!

Oh, thanks for pointing that out! :slight_smile:

1 Like