nolanderc / glsl_analyzer

Language server for GLSL (autocomplete, goto-definition, formatter, and more)
GNU General Public License v3.0
156 stars 3 forks source link

src/parse.zig:236:65: error: @intCast must have a known result type #53

Open redinator2000 opened 5 months ago

redinator2000 commented 5 months ago
zig version
0.11.0

From the AUR I downloaded glsl_analyzer 1.4.2-1 This is the result of makepkg -si

==> Making package: glsl_analyzer 1.4.2-1 (Sat 27 Jan 2024 08:15:21 PM EST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found glsl_analyzer-1.4.2.tar.gz
==> Validating source files with sha256sums...
    glsl_analyzer-1.4.2.tar.gz ... Passed
==> Extracting sources...
  -> Extracting glsl_analyzer-1.4.2.tar.gz with bsdtar
==> Starting prepare()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
zig build-exe glsl_analyzer ReleaseSafe native-linux.5.15-gnu: error: the following command failed with 1 compilation errors:
/usr/bin/zig build-exe /home/red/aur/glsl_analyzer/src/glsl_analyzer-1.4.2/src/main.zig -lc -OReleaseSafe --cache-dir /home/red/aur/glsl_analyzer/src/glsl_analyzer-1.4.2/zig-cache --global-cache-dir /home/red/.cache/zig --name glsl_analyzer -target native-linux.5.15-gnu -mcpu x86_64 --mod glsl_spec.json.zlib::/home/red/aur/glsl_analyzer/src/glsl_analyzer-1.4.2/zig-cache/o/0d99a25104017fd8647c9c791387d7bc/spec.json.zlib --mod build_options::/home/red/aur/glsl_analyzer/src/glsl_analyzer-1.4.2/zig-cache/c/a7739f5d2e61771a7ece24220bb67000/options.zig --deps glsl_spec.json.zlib,build_options -L /usr/lib -I /usr/include --listen=- 
Build Summary: 2/5 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
└─ install glsl_analyzer transitive failure
   └─ zig build-exe glsl_analyzer ReleaseSafe native-linux.5.15-gnu 1 errors
src/parse.zig:236:65: error: @intCast must have a known result type
            @memset(nodes.items(.parent)[span.start..span.end], @intCast(index));
                                                                ^~~~~~~~~~~~~~~
src/parse.zig:236:65: note: use @as to provide explicit result type
==> ERROR: A failure occurred in build().
    Aborting...
nolanderc commented 5 months ago

Hi!

glsl_analyzer relies on a nightly version of the Zig compiler: zig 0.12.0-dev.629+1606717b5.