ziglang/zig
262
5.9k
Fork
You've already forked zig
752

incremental: panic: referenced transitive analysis errors, but none actually emitted renaming a union(enum) declaration #35307

Closed
opened 2026年05月14日 07:43:38 +02:00 by 1off · 7 comments
Contributor
Copy link

Zig Version

0.17.0-dev.298+ad1b746e2

Steps to Reproduce and Observed Behavior

I haven't worked out a smaller repro, so let's just use ZLS.
We'll be editing github.com/zigtools/zls@f0bb3d2780/src/Server.zig (L1608)

Run zig build -fincremental --watch in the project's dir.
Change the name of the union(enum), eg delete the first char ('H').
Save.

Build Summary: 10/10 steps succeeded
install
└─ install zls
 └─ compile exe zls Debug native 2 errors
src/Server.zig:1621:51: error: use of undeclared identifier 'HandledNotificationParams'
const Message = lsp.Message(HandledRequestParams, HandledNotificationParams, .{});
 ^~~~~~~~~~~~~~~~~~~~~~~~~
src/Server.zig:1830:33: error: use of undeclared identifier 'HandledNotificationParams'
 const Params = std.meta.Tag(HandledNotificationParams);
 ^~~~~~~~~~~~~~~~~~~~~~~~~
error: 2 compilation errors

Undo the change. Save.

Build Summary: 7/10 steps succeeded (1 failed)
install
└─ install zls
 └─ compile exe zls Debug native failure
error: referenced transitive analysis errors, but none actually emitted
 func('Server.loop' [32750]) [transitive failure]
 referenced by: func('main.main' [31321])
 referenced by: func('start.posixCallMainAndExit' [31201])
 referenced by: func('start._start' [31186])
 referenced by: comptime(inst=('/home/rad/lab/zig/build/stage4/lib/std/start.zig', %50) [3])
 referenced by: nav_val('std.start' [89])
 referenced by: comptime(inst=('/home/rad/lab/zig/build/stage4/lib/std/std.zig', %554) [0])
 thread 114625 panic: referenced transitive analysis errors, but none actually emitted
 Cannot print stack trace: stack tracing is disabled
 
error: process terminated with signal ABRT
P.S. I tried using a debug build of the compiler to get more info, but it panics in Elf2.zig
~/lab/zig/build/stage5/bin/zig build check -fincremental --watch
check
└─ compile exe zls Debug native
 └─ run exe zls_gen (version_data.zig)
 └─ compile exe zls_gen Debug native failure
error: Compiler crash context:
 (no context)
 
 thread 114849 panic: reached unreachable code
 /home/rad/lab/zig/build/stage3/lib/zig/std/debug.zig:423:14: 0x1753109 in assert (std.zig)
 if (!ok) unreachable; // assertion failure
 ^
 /home/rad/lab/zig/src/link/Elf2.zig:1640:11: 0x2486c9a in initHeaders (main.zig)
 assert(elf.nodes.len == expected_nodes_len);
 ^
 /home/rad/lab/zig/src/link/Elf2.zig:1046:24: 0x248a537 in create (main.zig)
 try elf.initHeaders(class, data, osabi, @"type", machine, maybe_interp);
 ^
 /home/rad/lab/zig/src/link/Elf2.zig:915:18: 0x249f160 in open (main.zig)
 return create(arena, comp, path, options);
 ^
 /home/rad/lab/zig/src/link.zig:548:48: 0x249fb8c in open (main.zig)
 const ptr = try tag.Type().open(arena, comp, emit, options);
 ^
 /home/rad/lab/zig/src/Compilation.zig:2454:51: 0x6091cbc in create (main.zig)
 comp.bin_file = link.File.open(arena, comp, emit, lf_open_opts) catch |err| {
 ^
 /home/rad/lab/zig/src/main.zig:3554:36: 0x1a2f11e in buildOutputType (main.zig)
 const comp = Compilation.create(gpa, arena, io, &create_diag, .{
 ^
 /home/rad/lab/zig/src/main.zig:283:31: 0x1a7d1f7 in mainArgs (main.zig)
 return buildOutputType(gpa, arena, io, args, .{ .build = .Exe }, environ_map);
 ^
 /home/rad/lab/zig/src/main.zig:236:20: 0x19d6941 in main (main.zig)
 return mainArgs(gpa, arena, io, args, &environ_map);
 ^
 /home/rad/lab/zig/build/stage3/lib/zig/std/start.zig:712:88: 0x19d5480 in callMain (std.zig)
 if (fn_info.params[0].type.? == std.process.Init.Minimal) return wrapMain(root.main(.{
 ^
 /home/rad/lab/zig/build/stage3/lib/zig/std/start.zig:203:5: 0x19d4e51 in _start (std.zig)
 asm volatile (switch (native_arch) {
 ^
 
failed command: /home/rad/lab/zig/build/stage5/bin/zig build-exe -fsingle-threaded -Mroot=/home/rad/lab/zls/src/tools/config_gen.zig --cache-dir .zig-cache --global-cache-dir /home/rad/.cache/zig --name zls_gen --zig-lib-dir /home/rad/lab/zig/lib/ -fincremental --listen=-
check
└─ compile exe zls Debug native
 └─ run exe lsp-codegen (lsp_types.zig)
 └─ compile exe lsp-codegen Debug native failure
error: Compiler crash context:
 (no context)
 
 thread 114850 panic: reached unreachable codethread 
 /home/rad/lab/zig/build/stage3/lib/zig/std/debug.zig:423:14: 0x1753109 in assert (std.zig)
 if (!ok) unreachable; // assertion failure
 ^
 /home/rad/lab/zig/src/link/Elf2.zig:1640:11: 0x2486c9a in initHeaders (main.zig)114845 panic: attempt to use null value
 assert(elf.nodes.len == expected_nodes_len);
 ^
 /home/rad/lab/zig/src/link/Elf2.zig:1046:24: 0x248a537 in create (main.zig)
 try elf.initHeaders(class, data, osabi, @"type", machine, maybe_interp);
 ^
 /home/rad/lab/zig/src/link/Elf2.zig:915:18: 0x249f160 in open (main.zig)
 return create(arena, comp, path, options);
 ^
 /home/rad/lab/zig/src/link.zig:548:48: 0x249fb8c in open (main.zig)
 const ptr = try tag.Type().open(arena, comp, emit, options);
 ^
 /home/rad/lab/zig/src/Compilation.zig:2454:51: 0x6091cbc in create (main.zig)
 comp.bin_file = link.File.open(arena, comp, emit, lf_open_opts) catch |err| {
 ^
 /home/rad/lab/zig/src/main.zig:3554:36: 0x1a2f11e in buildOutputType (main.zig)
 const comp = Compilation.create(gpa, arena, io, &create_diag, .{
 ^
 /home/rad/lab/zig/src/main.zig:283:31: 0x1a7d1f7 in mainArgs (main.zig)
 return buildOutputType(gpa, arena, io, args, .{ .build = .Exe }, environ_map);
 ^
 /home/rad/lab/zig/src/main.zig:236:20: 0x19d6941 in main (main.zig)
 return mainArgs(gpa, arena, io, args, &environ_map);
 ^
 /home/rad/lab/zig/build/stage3/lib/zig/std/start.zig:712:88: 0x19d5480 in callMain (std.zig)
 if (fn_info.params[0].type.? == std.process.Init.Minimal) return wrapMain(root.main(.{
 ^
 /home/rad/lab/zig/build/stage3/lib/zig/std/start.zig:203:5: 0x19d4e51 in _start (std.zig)
 asm volatile (switch (native_arch) {
 ^
 
failed command: /home/rad/lab/zig/build/stage5/bin/zig build-exe -fsingle-threaded --dep meta-model -Mroot=/home/rad/lab/zls/zig-pkg/lsp_kit-0.1.0-bi_PL3IyDACfp1xdTnkiOHEok2YpPCCCJHuuOcNzjl1D/src/codegen/codegen.zig -Mmeta-model=/home/rad/lab/zls/zig-pkg/lsp_kit-0.1.0-bi_PL3IyDACfp1xdTnkiOHEok2YpPCCCJHuuOcNzjl1D/metaModel.json --cache-dir .zig-cache --global-cache-dir /home/rad/.cache/zig --name lsp-codegen --zig-lib-dir /home/rad/lab/zig/lib/ -fincremental --listen=-
/home/rad/lab/zig/lib/std/Build/Step/Run.zig:869:95: 0x157ba4d in make (std.zig)
 const file_path = artifact.installed_path orelse artifact.generated_bin.?.path.?;
 ^
/home/rad/lab/zig/lib/std/Build/Step.zig:276:33: 0x148b92f in make (std.zig)
 const make_result = s.makeFn(s, options);
 ^
/home/rad/lab/zig/lib/compiler/build_runner.zig:1343:26: 0x1489f7e in makeStep (build_runner.zig)
 } else if (s.make(.{
 ^
/home/rad/lab/zig/lib/std/Io.zig:1257:17: 0x1489ba5 in start (std.zig)
 _ = @as(Cancelable!void, @call(.auto, function, args_casted.*)) catch {};
 ^
/home/rad/lab/zig/lib/std/Io/Threaded.zig:552:22: 0x1243725 in start (std.zig)
 task.func(task.contextPointer());
 ^
/home/rad/lab/zig/lib/std/Io/Threaded.zig:1797:29: 0x1241924 in worker (std.zig)
 runnable.startFn(runnable, &thread, t);
 ^
/home/rad/lab/zig/lib/std/Thread.zig:422:13: 0x1241605 in callFn__anon_27785 (std.zig)
 @call(.auto, f, args);
 ^
/home/rad/lab/zig/lib/std/Thread.zig:1434:30: 0x12413c0 in entryFn (std.zig)
 return callFn(f, self.fn_args);
 ^
/home/rad/lab/zig/lib/std/os/linux/x86_64.zig:134:5: 0x1241525 in clone (std.zig)
 asm volatile (
 ^
thread 114848 panic: attempt to use null value
/home/rad/lab/zig/lib/std/Build/Step/Run.zig:869:95: 0x157ba4d in make (std.zig)
 const file_path = artifact.installed_path orelse artifact.generated_bin.?.path.?;
 ^
/home/rad/lab/zig/lib/std/Build/Step.zig:276:33: 0x148b92f in make (std.zig)
 const make_result = s.makeFn(s, options);
 ^
/home/rad/lab/zig/lib/compiler/build_runner.zig:1343:26: 0x1489f7e in makeStep (build_runner.zig)
 } else if (s.make(.{
 ^
/home/rad/lab/zig/lib/std/Io.zig:1257:17: 0x1489ba5 in start (std.zig)
 _ = @as(Cancelable!void, @call(.auto, function, args_casted.*)) catch {};
 ^
/home/rad/lab/zig/lib/std/Io/Threaded.zig:552:22: 0x1243725 in start (std.zig)
 task.func(task.contextPointer());
 ^
/home/rad/lab/zig/lib/std/Io/Threaded.zig:1797:29: 0x1241924 in worker (std.zig)
 runnable.startFn(runnable, &thread, t);
 ^
/home/rad/lab/zig/lib/std/Thread.zig:422:13: 0x1241605 in callFn__anon_27785 (std.zig)
 @call(.auto, f, args);
 ^
/home/rad/lab/zig/lib/std/Thread.zig:1434:30: 0x12413c0 in entryFn (std.zig)
 return callFn(f, self.fn_args);
 ^
/home/rad/lab/zig/lib/std/os/linux/x86_64.zig:134:5: 0x1241525 in clone (std.zig)
 asm volatile (
 ^
error: the following build command terminated with signal ABRT:
.zig-cache/o/7e2697b73523257f5034997065048d17/build /home/rad/lab/zig/build/stage5/bin/zig /home/rad/lab/zig/lib /home/rad/lab/zls .zig-cache /home/rad/.cache/zig --seed 0x2969797c -Z55b30264036b2591 check -fincremental --watch

Expected Behavior

### Zig Version 0.17.0-dev.298+ad1b746e2 ### Steps to Reproduce and Observed Behavior I haven't worked out a smaller repro, so let's just use ZLS. We'll be editing https://github.com/zigtools/zls/blob/f0bb3d27808f678a95fc835338a0c434667bcfb8/src/Server.zig#L1608 Run `zig build -fincremental --watch` in the project's dir. Change the name of the `union(enum)`, eg delete the first char ('H'). Save. ``` Build Summary: 10/10 steps succeeded install └─ install zls └─ compile exe zls Debug native 2 errors src/Server.zig:1621:51: error: use of undeclared identifier 'HandledNotificationParams' const Message = lsp.Message(HandledRequestParams, HandledNotificationParams, .{}); ^~~~~~~~~~~~~~~~~~~~~~~~~ src/Server.zig:1830:33: error: use of undeclared identifier 'HandledNotificationParams' const Params = std.meta.Tag(HandledNotificationParams); ^~~~~~~~~~~~~~~~~~~~~~~~~ error: 2 compilation errors ``` Undo the change. Save. ``` Build Summary: 7/10 steps succeeded (1 failed) install └─ install zls └─ compile exe zls Debug native failure error: referenced transitive analysis errors, but none actually emitted func('Server.loop' [32750]) [transitive failure] referenced by: func('main.main' [31321]) referenced by: func('start.posixCallMainAndExit' [31201]) referenced by: func('start._start' [31186]) referenced by: comptime(inst=('/home/rad/lab/zig/build/stage4/lib/std/start.zig', %50) [3]) referenced by: nav_val('std.start' [89]) referenced by: comptime(inst=('/home/rad/lab/zig/build/stage4/lib/std/std.zig', %554) [0]) thread 114625 panic: referenced transitive analysis errors, but none actually emitted Cannot print stack trace: stack tracing is disabled error: process terminated with signal ABRT ``` <details> <summary> P.S. I tried using a debug build of the compiler to get more info, but it panics in Elf2.zig </summary> ``` ~/lab/zig/build/stage5/bin/zig build check -fincremental --watch check └─ compile exe zls Debug native └─ run exe zls_gen (version_data.zig) └─ compile exe zls_gen Debug native failure error: Compiler crash context: (no context) thread 114849 panic: reached unreachable code /home/rad/lab/zig/build/stage3/lib/zig/std/debug.zig:423:14: 0x1753109 in assert (std.zig) if (!ok) unreachable; // assertion failure ^ /home/rad/lab/zig/src/link/Elf2.zig:1640:11: 0x2486c9a in initHeaders (main.zig) assert(elf.nodes.len == expected_nodes_len); ^ /home/rad/lab/zig/src/link/Elf2.zig:1046:24: 0x248a537 in create (main.zig) try elf.initHeaders(class, data, osabi, @"type", machine, maybe_interp); ^ /home/rad/lab/zig/src/link/Elf2.zig:915:18: 0x249f160 in open (main.zig) return create(arena, comp, path, options); ^ /home/rad/lab/zig/src/link.zig:548:48: 0x249fb8c in open (main.zig) const ptr = try tag.Type().open(arena, comp, emit, options); ^ /home/rad/lab/zig/src/Compilation.zig:2454:51: 0x6091cbc in create (main.zig) comp.bin_file = link.File.open(arena, comp, emit, lf_open_opts) catch |err| { ^ /home/rad/lab/zig/src/main.zig:3554:36: 0x1a2f11e in buildOutputType (main.zig) const comp = Compilation.create(gpa, arena, io, &create_diag, .{ ^ /home/rad/lab/zig/src/main.zig:283:31: 0x1a7d1f7 in mainArgs (main.zig) return buildOutputType(gpa, arena, io, args, .{ .build = .Exe }, environ_map); ^ /home/rad/lab/zig/src/main.zig:236:20: 0x19d6941 in main (main.zig) return mainArgs(gpa, arena, io, args, &environ_map); ^ /home/rad/lab/zig/build/stage3/lib/zig/std/start.zig:712:88: 0x19d5480 in callMain (std.zig) if (fn_info.params[0].type.? == std.process.Init.Minimal) return wrapMain(root.main(.{ ^ /home/rad/lab/zig/build/stage3/lib/zig/std/start.zig:203:5: 0x19d4e51 in _start (std.zig) asm volatile (switch (native_arch) { ^ failed command: /home/rad/lab/zig/build/stage5/bin/zig build-exe -fsingle-threaded -Mroot=/home/rad/lab/zls/src/tools/config_gen.zig --cache-dir .zig-cache --global-cache-dir /home/rad/.cache/zig --name zls_gen --zig-lib-dir /home/rad/lab/zig/lib/ -fincremental --listen=- check └─ compile exe zls Debug native └─ run exe lsp-codegen (lsp_types.zig) └─ compile exe lsp-codegen Debug native failure error: Compiler crash context: (no context) thread 114850 panic: reached unreachable codethread /home/rad/lab/zig/build/stage3/lib/zig/std/debug.zig:423:14: 0x1753109 in assert (std.zig) if (!ok) unreachable; // assertion failure ^ /home/rad/lab/zig/src/link/Elf2.zig:1640:11: 0x2486c9a in initHeaders (main.zig)114845 panic: attempt to use null value assert(elf.nodes.len == expected_nodes_len); ^ /home/rad/lab/zig/src/link/Elf2.zig:1046:24: 0x248a537 in create (main.zig) try elf.initHeaders(class, data, osabi, @"type", machine, maybe_interp); ^ /home/rad/lab/zig/src/link/Elf2.zig:915:18: 0x249f160 in open (main.zig) return create(arena, comp, path, options); ^ /home/rad/lab/zig/src/link.zig:548:48: 0x249fb8c in open (main.zig) const ptr = try tag.Type().open(arena, comp, emit, options); ^ /home/rad/lab/zig/src/Compilation.zig:2454:51: 0x6091cbc in create (main.zig) comp.bin_file = link.File.open(arena, comp, emit, lf_open_opts) catch |err| { ^ /home/rad/lab/zig/src/main.zig:3554:36: 0x1a2f11e in buildOutputType (main.zig) const comp = Compilation.create(gpa, arena, io, &create_diag, .{ ^ /home/rad/lab/zig/src/main.zig:283:31: 0x1a7d1f7 in mainArgs (main.zig) return buildOutputType(gpa, arena, io, args, .{ .build = .Exe }, environ_map); ^ /home/rad/lab/zig/src/main.zig:236:20: 0x19d6941 in main (main.zig) return mainArgs(gpa, arena, io, args, &environ_map); ^ /home/rad/lab/zig/build/stage3/lib/zig/std/start.zig:712:88: 0x19d5480 in callMain (std.zig) if (fn_info.params[0].type.? == std.process.Init.Minimal) return wrapMain(root.main(.{ ^ /home/rad/lab/zig/build/stage3/lib/zig/std/start.zig:203:5: 0x19d4e51 in _start (std.zig) asm volatile (switch (native_arch) { ^ failed command: /home/rad/lab/zig/build/stage5/bin/zig build-exe -fsingle-threaded --dep meta-model -Mroot=/home/rad/lab/zls/zig-pkg/lsp_kit-0.1.0-bi_PL3IyDACfp1xdTnkiOHEok2YpPCCCJHuuOcNzjl1D/src/codegen/codegen.zig -Mmeta-model=/home/rad/lab/zls/zig-pkg/lsp_kit-0.1.0-bi_PL3IyDACfp1xdTnkiOHEok2YpPCCCJHuuOcNzjl1D/metaModel.json --cache-dir .zig-cache --global-cache-dir /home/rad/.cache/zig --name lsp-codegen --zig-lib-dir /home/rad/lab/zig/lib/ -fincremental --listen=- /home/rad/lab/zig/lib/std/Build/Step/Run.zig:869:95: 0x157ba4d in make (std.zig) const file_path = artifact.installed_path orelse artifact.generated_bin.?.path.?; ^ /home/rad/lab/zig/lib/std/Build/Step.zig:276:33: 0x148b92f in make (std.zig) const make_result = s.makeFn(s, options); ^ /home/rad/lab/zig/lib/compiler/build_runner.zig:1343:26: 0x1489f7e in makeStep (build_runner.zig) } else if (s.make(.{ ^ /home/rad/lab/zig/lib/std/Io.zig:1257:17: 0x1489ba5 in start (std.zig) _ = @as(Cancelable!void, @call(.auto, function, args_casted.*)) catch {}; ^ /home/rad/lab/zig/lib/std/Io/Threaded.zig:552:22: 0x1243725 in start (std.zig) task.func(task.contextPointer()); ^ /home/rad/lab/zig/lib/std/Io/Threaded.zig:1797:29: 0x1241924 in worker (std.zig) runnable.startFn(runnable, &thread, t); ^ /home/rad/lab/zig/lib/std/Thread.zig:422:13: 0x1241605 in callFn__anon_27785 (std.zig) @call(.auto, f, args); ^ /home/rad/lab/zig/lib/std/Thread.zig:1434:30: 0x12413c0 in entryFn (std.zig) return callFn(f, self.fn_args); ^ /home/rad/lab/zig/lib/std/os/linux/x86_64.zig:134:5: 0x1241525 in clone (std.zig) asm volatile ( ^ thread 114848 panic: attempt to use null value /home/rad/lab/zig/lib/std/Build/Step/Run.zig:869:95: 0x157ba4d in make (std.zig) const file_path = artifact.installed_path orelse artifact.generated_bin.?.path.?; ^ /home/rad/lab/zig/lib/std/Build/Step.zig:276:33: 0x148b92f in make (std.zig) const make_result = s.makeFn(s, options); ^ /home/rad/lab/zig/lib/compiler/build_runner.zig:1343:26: 0x1489f7e in makeStep (build_runner.zig) } else if (s.make(.{ ^ /home/rad/lab/zig/lib/std/Io.zig:1257:17: 0x1489ba5 in start (std.zig) _ = @as(Cancelable!void, @call(.auto, function, args_casted.*)) catch {}; ^ /home/rad/lab/zig/lib/std/Io/Threaded.zig:552:22: 0x1243725 in start (std.zig) task.func(task.contextPointer()); ^ /home/rad/lab/zig/lib/std/Io/Threaded.zig:1797:29: 0x1241924 in worker (std.zig) runnable.startFn(runnable, &thread, t); ^ /home/rad/lab/zig/lib/std/Thread.zig:422:13: 0x1241605 in callFn__anon_27785 (std.zig) @call(.auto, f, args); ^ /home/rad/lab/zig/lib/std/Thread.zig:1434:30: 0x12413c0 in entryFn (std.zig) return callFn(f, self.fn_args); ^ /home/rad/lab/zig/lib/std/os/linux/x86_64.zig:134:5: 0x1241525 in clone (std.zig) asm volatile ( ^ error: the following build command terminated with signal ABRT: .zig-cache/o/7e2697b73523257f5034997065048d17/build /home/rad/lab/zig/build/stage5/bin/zig /home/rad/lab/zig/lib /home/rad/lab/zls .zig-cache /home/rad/.cache/zig --seed 0x2969797c -Z55b30264036b2591 check -fincremental --watch ``` </details> ### Expected Behavior -
Author
Contributor
Copy link

0.17.0-dev.313+27be3b069 has regressed the repro (-fincremental)

zig build -fincremental --watch
install
└─ install zls
 └─ compile exe zls Debug native
 └─ run exe zls_gen (version_data.zig) failure
error: process terminated with signal SEGV
failed command: ./.zig-cache/o/1210fa2b6befa8aa5da96122c5c098fb/zls_gen --langref-version master --langref-path /home/rad/lab/zls/src/tools/langref.html.in --generate-version-data /home/rad/lab/zls/.zig-cache/o/468aa29129dd397b2c87a2fcd1be1e36/version_data.zig
install
└─ install zls
 └─ compile exe zls Debug native
 └─ run exe lsp-codegen (lsp_types.zig) failure
error: process terminated with signal SEGV
failed command: ./.zig-cache/o/fd92e7de8b7a4d575e9d368603cfb389/lsp-codegen /home/rad/lab/zls/.zig-cache/o/a806ed085ac3bdbb47c13c58ec1ca667/lsp_types.zig
Build Summary: 5/10 steps succeeded (2 failed)
0.17.0-dev.313+27be3b069 has regressed the repro (-fincremental) ```sh zig build -fincremental --watch install └─ install zls └─ compile exe zls Debug native └─ run exe zls_gen (version_data.zig) failure error: process terminated with signal SEGV failed command: ./.zig-cache/o/1210fa2b6befa8aa5da96122c5c098fb/zls_gen --langref-version master --langref-path /home/rad/lab/zls/src/tools/langref.html.in --generate-version-data /home/rad/lab/zls/.zig-cache/o/468aa29129dd397b2c87a2fcd1be1e36/version_data.zig install └─ install zls └─ compile exe zls Debug native └─ run exe lsp-codegen (lsp_types.zig) failure error: process terminated with signal SEGV failed command: ./.zig-cache/o/fd92e7de8b7a4d575e9d368603cfb389/lsp-codegen /home/rad/lab/zls/.zig-cache/o/a806ed085ac3bdbb47c13c58ec1ca667/lsp_types.zig Build Summary: 5/10 steps succeeded (2 failed) ```
Owner
Copy link

The new regression will be an Elf2 bug, I'll take a look at that soon. The original issue is a frontend bug, which will be a bit trickier, but I'll also try to look into it when I can! Thanks for the report.

The new regression will be an Elf2 bug, I'll take a look at that soon. The original issue is a frontend bug, which will be a bit trickier, but I'll also try to look into it when I can! Thanks for the report.
mlugg added this to the 0.17.0 milestone 2026年05月19日 11:32:22 +02:00
Author
Contributor
Copy link

Possibly another angle

Using 0.17.0-dev.305+bdfbf432d

github.com/zigtools/zls@d5d31d9af3/src/analyser/InternPool.zig (L118)

118 args_is_comptime: std.bit_set.Static(32) = .empty,

Change .empty to empty, ie just delete the preceding .
Save

check
└─ compile exe zls Debug native 1 errors
src/analyser/InternPool.zig:118:52: error: use of undeclared identifier 'empty'
 args_is_comptime: std.bit_set.Static(32) = empty,
 ^~~~~
error: 1 compilation errors

Undo the change. Save.

check
└─ compile exe zls Debug native failure
error: referenced transitive analysis errors, but none actually emitted
 func('analyser.InternPool.Key.hashWithHasher__anon_58206' [58206]) [transitive failure]
 referenced by: func('analyser.InternPool.Key.hash64' [58198])
 referenced by: func('analyser.InternPool.Key.hash32' [55481])
 referenced by: func('analyser.InternPool.get' [55037])
 referenced by: func('analyser.InternPool.init' [174293])
 referenced by: func('Server.create' [32246])
 referenced by: func('main.main' [31433])
 referenced by: func('start.posixCallMainAndExit' [31313])
 referenced by: func('start._start' [31298])
 referenced by: comptime(inst=('/home/rad/lab/zig/build/stage4/lib/std/start.zig', %50) [3])
 referenced by: nav_val('std.start' [89])
 referenced by: comptime(inst=('/home/rad/lab/zig/build/stage4/lib/std/std.zig', %554) [0])
 thread 110809 panic: referenced transitive analysis errors, but none actually emitted
 Cannot print stack trace: stack tracing is disabled
 
error: process terminated with signal ABRT
Possibly another angle Using 0.17.0-dev.305+bdfbf432d https://github.com/zigtools/zls/blob/d5d31d9af381dc29e7102f966e6a6c1dc25a8c9e/src/analyser/InternPool.zig#L118 ` 118 args_is_comptime: std.bit_set.Static(32) = .empty,` Change `.empty` to `empty`, ie just delete the preceding `.` Save ``` check └─ compile exe zls Debug native 1 errors src/analyser/InternPool.zig:118:52: error: use of undeclared identifier 'empty' args_is_comptime: std.bit_set.Static(32) = empty, ^~~~~ error: 1 compilation errors ``` Undo the change. Save. ``` check └─ compile exe zls Debug native failure error: referenced transitive analysis errors, but none actually emitted func('analyser.InternPool.Key.hashWithHasher__anon_58206' [58206]) [transitive failure] referenced by: func('analyser.InternPool.Key.hash64' [58198]) referenced by: func('analyser.InternPool.Key.hash32' [55481]) referenced by: func('analyser.InternPool.get' [55037]) referenced by: func('analyser.InternPool.init' [174293]) referenced by: func('Server.create' [32246]) referenced by: func('main.main' [31433]) referenced by: func('start.posixCallMainAndExit' [31313]) referenced by: func('start._start' [31298]) referenced by: comptime(inst=('/home/rad/lab/zig/build/stage4/lib/std/start.zig', %50) [3]) referenced by: nav_val('std.start' [89]) referenced by: comptime(inst=('/home/rad/lab/zig/build/stage4/lib/std/std.zig', %554) [0]) thread 110809 panic: referenced transitive analysis errors, but none actually emitted Cannot print stack trace: stack tracing is disabled error: process terminated with signal ABRT ```
Owner
Copy link

@1off, unfortunately I cannot reproduce the SIGSEGV issue you showed in this comment. Assuming you can still reproduce that particular issue, could you:

  • Try running that reproduction with a Debug or ReleaseSafe compiler build, just in case you hit any compiler safety check. I doubt you will, but if you do then it'll probably be very useful!
  • Otherwise, it'd be great if you could send me the crashing zls_gen and/or lsp-codegen binaries---you can see the paths to those binaries in the build system output (just after "failed command:"). That way I can at least see what exactly is being miscompiled.

FWIW I am able to reproduce the original issue (referenced transitive analysis errors, but none actually emitted)---I'll look into that soon.


EDIT: I'm going to treat this issue as tracking the original bug (and I'm about to open a PR fixing that), so I'd also like to ask you to make a new issue regarding the SIGSEGV problem. Thank you!

@1off, unfortunately I cannot reproduce the SIGSEGV issue you showed in [this comment](https://codeberg.org/ziglang/zig/issues/35307#issuecomment-15206691). Assuming you can still reproduce that particular issue, could you: * Try running that reproduction with a Debug or ReleaseSafe compiler build, just in case you hit any compiler safety check. I doubt you will, but if you do then it'll probably be very useful! * Otherwise, it'd be great if you could send me the crashing `zls_gen` and/or `lsp-codegen` binaries---you can see the paths to those binaries in the build system output (just after "failed command:"). That way I can at least see *what* exactly is being miscompiled. FWIW I *am* able to reproduce the original issue (`referenced transitive analysis errors, but none actually emitted`)---I'll look into that soon. --- EDIT: I'm going to treat this issue as tracking the original bug (and I'm about to open a PR fixing that), so I'd also like to ask you to make a *new* issue regarding the SIGSEGV problem. Thank you!
Author
Contributor
Copy link
// Official binary
$ ~/Downloads/zig-x86_64-linux-0.17.0-dev.313+27be3b069/zig build check -fincremental --watch
check
└─ compile exe zls Debug native
 └─ run exe zls_gen (version_data.zig) failure
error: process terminated with signal SEGV
failed command: ./.zig-cache/o/1210fa2b6befa8aa5da96122c5c098fb/zls_gen --langref-version master --langref-path /home/rad/lab/zls/src/tools/langref.html.in --generate-version-data /home/rad/lab/zls/.zig-cache/o/68195cf24a3bbf340fba20d215786b02/version_data.zig
check
└─ compile exe zls Debug native
 └─ run exe lsp-codegen (lsp_types.zig) failure
error: process terminated with signal SEGV
failed command: ./.zig-cache/o/fd92e7de8b7a4d575e9d368603cfb389/lsp-codegen /home/rad/lab/zls/.zig-cache/o/04088ba3fd4930bdce1aea303f62da1b/lsp_types.zig
Build Summary: 5/9 steps succeeded (2 failed)
// Debug build
$ ~/lab/zig/build/stage5/bin/zig version
0.17.0-dev.313+27be3b069
$ ~/lab/zig/build/stage5/bin/zig build check -fincremental --watch
check
└─ compile exe zls Debug native
 └─ run exe zls_gen (version_data.zig) failure
error: process terminated with signal SEGV
failed command: ./.zig-cache/o/3e11733faaeb9b7c0b4eb90fa7d53a1b/zls_gen --langref-version master --langref-path /home/rad/lab/zls/src/tools/langref.html.in --generate-version-data /home/rad/lab/zls/.zig-cache/o/3086aff2e0e1b7b0019665717ba92792/version_data.zig
check
└─ compile exe zls Debug native
 └─ run exe lsp-codegen (lsp_types.zig) failure
error: process terminated with signal SEGV
failed command: ./.zig-cache/o/ecb09c1acd0b1c324bd267980a2bb2e9/lsp-codegen /home/rad/lab/zls/.zig-cache/o/4dbbfbbc2ebf7274fc938e687737597d/lsp_types.zig
Build Summary: 5/9 steps succeeded (2 failed)
$ lldb ./.zig-cache/o/3e11733faaeb9b7c0b4eb90fa7d53a1b/zls_gen
(lldb) target create "./.zig-cache/o/3e11733faaeb9b7c0b4eb90fa7d53a1b/zls_gen"
Current executable set to '/home/rad/lab/zls/.zig-cache/o/3e11733faaeb9b7c0b4eb90fa7d53a1b/zls_gen' (x86_64).
(lldb) run
warning: failed to set breakpoint site at 0x918f50 for breakpoint -2.1: error: 9 sending the breakpoint request
warning: failed to set breakpoint site at 0x918f50 for breakpoint -2.1: error: 9 sending the breakpoint request
Process 167463 launched: '/home/rad/lab/zls/.zig-cache/o/3e11733faaeb9b7c0b4eb90fa7d53a1b/zls_gen' (x86_64)
Process 167463 stopped
* thread #1, name = 'zls_gen', stop reason = signal SIGSEGV: address not mapped to object (fault address=0x918f50)
 frame #0: 0x0000000000918f50 zls_gen`_start
zls_gen`_start:
-> 0x918f50 <+0>: xorl %ebp, %ebp
 0x918f52 <+2>: movq %rsp, %rdi
 0x918f55 <+5>: andq $-0x10, %rsp
 0x918f59 <+9>: movq 0ドルx940620, %rax ; imm = 0x940620
$ lldb ./.zig-cache/o/ecb09c1acd0b1c324bd267980a2bb2e9/lsp-codegen
(lldb) target create "./.zig-cache/o/ecb09c1acd0b1c324bd267980a2bb2e9/lsp-codegen"
Current executable set to '/home/rad/lab/zls/.zig-cache/o/ecb09c1acd0b1c324bd267980a2bb2e9/lsp-codegen' (x86_64).
(lldb) run
warning: failed to set breakpoint site at 0x919050 for breakpoint -2.1: error: 9 sending the breakpoint request
warning: failed to set breakpoint site at 0x919050 for breakpoint -2.1: error: 9 sending the breakpoint request
Process 167498 launched: '/home/rad/lab/zls/.zig-cache/o/ecb09c1acd0b1c324bd267980a2bb2e9/lsp-codegen' (x86_64)
Process 167498 stopped
* thread #1, name = 'lsp-codegen', stop reason = signal SIGSEGV: address not mapped to object (fault address=0x919050)
 frame #0: 0x0000000000919050 lsp-codegen`_start
lsp-codegen`_start:
-> 0x919050 <+0>: xorl %ebp, %ebp
 0x919052 <+2>: movq %rsp, %rdi
 0x919055 <+5>: andq $-0x10, %rsp
 0x919059 <+9>: movq 0ドルx91e620, %rax ; imm = 0x91E620 
``` // Official binary $ ~/Downloads/zig-x86_64-linux-0.17.0-dev.313+27be3b069/zig build check -fincremental --watch check └─ compile exe zls Debug native └─ run exe zls_gen (version_data.zig) failure error: process terminated with signal SEGV failed command: ./.zig-cache/o/1210fa2b6befa8aa5da96122c5c098fb/zls_gen --langref-version master --langref-path /home/rad/lab/zls/src/tools/langref.html.in --generate-version-data /home/rad/lab/zls/.zig-cache/o/68195cf24a3bbf340fba20d215786b02/version_data.zig check └─ compile exe zls Debug native └─ run exe lsp-codegen (lsp_types.zig) failure error: process terminated with signal SEGV failed command: ./.zig-cache/o/fd92e7de8b7a4d575e9d368603cfb389/lsp-codegen /home/rad/lab/zls/.zig-cache/o/04088ba3fd4930bdce1aea303f62da1b/lsp_types.zig Build Summary: 5/9 steps succeeded (2 failed) // Debug build $ ~/lab/zig/build/stage5/bin/zig version 0.17.0-dev.313+27be3b069 $ ~/lab/zig/build/stage5/bin/zig build check -fincremental --watch check └─ compile exe zls Debug native └─ run exe zls_gen (version_data.zig) failure error: process terminated with signal SEGV failed command: ./.zig-cache/o/3e11733faaeb9b7c0b4eb90fa7d53a1b/zls_gen --langref-version master --langref-path /home/rad/lab/zls/src/tools/langref.html.in --generate-version-data /home/rad/lab/zls/.zig-cache/o/3086aff2e0e1b7b0019665717ba92792/version_data.zig check └─ compile exe zls Debug native └─ run exe lsp-codegen (lsp_types.zig) failure error: process terminated with signal SEGV failed command: ./.zig-cache/o/ecb09c1acd0b1c324bd267980a2bb2e9/lsp-codegen /home/rad/lab/zls/.zig-cache/o/4dbbfbbc2ebf7274fc938e687737597d/lsp_types.zig Build Summary: 5/9 steps succeeded (2 failed) $ lldb ./.zig-cache/o/3e11733faaeb9b7c0b4eb90fa7d53a1b/zls_gen (lldb) target create "./.zig-cache/o/3e11733faaeb9b7c0b4eb90fa7d53a1b/zls_gen" Current executable set to '/home/rad/lab/zls/.zig-cache/o/3e11733faaeb9b7c0b4eb90fa7d53a1b/zls_gen' (x86_64). (lldb) run warning: failed to set breakpoint site at 0x918f50 for breakpoint -2.1: error: 9 sending the breakpoint request warning: failed to set breakpoint site at 0x918f50 for breakpoint -2.1: error: 9 sending the breakpoint request Process 167463 launched: '/home/rad/lab/zls/.zig-cache/o/3e11733faaeb9b7c0b4eb90fa7d53a1b/zls_gen' (x86_64) Process 167463 stopped * thread #1, name = 'zls_gen', stop reason = signal SIGSEGV: address not mapped to object (fault address=0x918f50) frame #0: 0x0000000000918f50 zls_gen`_start zls_gen`_start: -> 0x918f50 <+0>: xorl %ebp, %ebp 0x918f52 <+2>: movq %rsp, %rdi 0x918f55 <+5>: andq $-0x10, %rsp 0x918f59 <+9>: movq 0ドルx940620, %rax ; imm = 0x940620 $ lldb ./.zig-cache/o/ecb09c1acd0b1c324bd267980a2bb2e9/lsp-codegen (lldb) target create "./.zig-cache/o/ecb09c1acd0b1c324bd267980a2bb2e9/lsp-codegen" Current executable set to '/home/rad/lab/zls/.zig-cache/o/ecb09c1acd0b1c324bd267980a2bb2e9/lsp-codegen' (x86_64). (lldb) run warning: failed to set breakpoint site at 0x919050 for breakpoint -2.1: error: 9 sending the breakpoint request warning: failed to set breakpoint site at 0x919050 for breakpoint -2.1: error: 9 sending the breakpoint request Process 167498 launched: '/home/rad/lab/zls/.zig-cache/o/ecb09c1acd0b1c324bd267980a2bb2e9/lsp-codegen' (x86_64) Process 167498 stopped * thread #1, name = 'lsp-codegen', stop reason = signal SIGSEGV: address not mapped to object (fault address=0x919050) frame #0: 0x0000000000919050 lsp-codegen`_start lsp-codegen`_start: -> 0x919050 <+0>: xorl %ebp, %ebp 0x919052 <+2>: movq %rsp, %rdi 0x919055 <+5>: andq $-0x10, %rsp 0x919059 <+9>: movq 0ドルx91e620, %rax ; imm = 0x91E620 ```
Owner
Copy link

Thanks @1off; I've split that bug into #35367, and opened a fix for the original issue at #35366.

Thanks @1off; I've split that bug into #35367, and opened a fix for the original issue at #35366.
Author
Contributor
Copy link

👋The repro in this comment seems to be similar, but distinct issue.

Me checking both repros with 0.17.0-dev.332+4a65cc4ac
❯ ~/lab/zig/build/stage3/bin/zig version
0.17.0-dev.332+4a65cc4ac
~/lab/zls master
❯ ~/lab/zig/build/stage3/bin/zig build check -fincremental --watch
Build Summary: 9/9 steps succeeded
check
└─ compile exe zls Debug native 2 errors
src/Server.zig:1621:51: error: use of undeclared identifier 'HandledNotificationParams'
const Message = lsp.Message(HandledRequestParams, HandledNotificationParams, .{});
 ^~~~~~~~~~~~~~~~~~~~~~~~~
src/Server.zig:1830:33: error: use of undeclared identifier 'HandledNotificationParams'
 const Params = std.meta.Tag(HandledNotificationParams);
 ^~~~~~~~~~~~~~~~~~~~~~~~~
error: 2 compilation errors
failed command: {....}
Build Summary: 7/9 steps succeeded (1 failed)
Build Summary: 9/9 steps succeeded
check
└─ compile exe zls Debug native 1 errors
src/analyser/InternPool.zig:118:52: error: use of undeclared identifier 'empty'
 args_is_comptime: std.bit_set.Static(32) = empty,
 ^~~~~
error: 1 compilation errors
failed command: {....}
Build Summary: 7/9 steps succeeded (1 failed)
check
└─ compile exe zls Debug native failure
error: referenced transitive analysis errors, but none actually emitted
 func('analyser.InternPool.Key.hashWithHasher__anon_58209' [58209]) [transitive failure]
 referenced by: func('analyser.InternPool.Key.hash64' [58201])
 referenced by: func('analyser.InternPool.Key.hash32' [55484])
 referenced by: func('analyser.InternPool.get' [55040])
 referenced by: func('analyser.InternPool.init' [174285])
 referenced by: func('Server.create' [32249])
 referenced by: func('main.main' [31436])
 referenced by: func('start.posixCallMainAndExit' [31316])
 referenced by: func('start._start' [31301])
 referenced by: comptime(inst=('/home/rad/lab/zig/build/stage3/lib/zig/std/start.zig', %50) [3])
 referenced by: nav_val('std.start' [89])
 referenced by: comptime(inst=('/home/rad/lab/zig/build/stage3/lib/zig/std/std.zig', %554) [0])
 thread 189207 panic: referenced transitive analysis errors, but none actually emitted
 Cannot print stack trace: stack tracing is disabled
 
error: process terminated with signal ABRT

Stumbled upon this as well Server.zig:1584

@"textDocument/willSaveWaitUntil": types.TextDocument.WillSaveParams,

(Deleted the c in TextDocument, saved, undid, saved)

❯ ~/lab/zig/build/stage3/bin/zig build check -fincremental --watch
Build Summary: 9/9 steps succeeded
check
└─ compile exe zls Debug native 1 errors
src/Server.zig:1584:46: error: root source file struct 'lsp_types' has no member named 'TextDoument'
 @"textDocument/willSaveWaitUntil": types.TextDoument.WillSaveParams,
 ^~~~~~~~~~~
.zig-cache/o/0a79544893f00c59225788f98e31a305/lsp_types.zig:1:1: note: struct declared here
//! Type definitions of the Language Server Protocol.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
 lsp.Message(Server.HandledRequestParams,Server.HandledNotificationParams,.{}).Request: zig-pkg/lsp_kit-0.1.0-bi_PL3IyDACfp1xdTnkiOHEok2YpPCCCJHuuOcNzjl1D/src/lsp.zig:1762:21
 lsp.Message(Server.HandledRequestParams,Server.HandledNotificationParams,.{}): zig-pkg/lsp_kit-0.1.0-bi_PL3IyDACfp1xdTnkiOHEok2YpPCCCJHuuOcNzjl1D/src/lsp.zig:1753:18
 8 reference(s) hidden; use '-freference-trace=10' to see all references
error: 1 compilation errors
failed command: /home/rad/lab/zig/build/stage3/bin/zig build-exe -ODebug --dep exe_options --dep known-folders --dep tracy --dep zls -Mroot=/home/rad/lab/zls/src/main.zig -Mexe_options=.zig-cache/c/e0cd3d7ec5203f0b61a9edf43421ce8a/options.zig -ODebug -Mknown-folders=/home/rad/lab/zls/zig-pkg/known_folders-0.0.0-Fy-PJsbKAACbDh9bBxR0MMThxZSS6A9RH4apWphNHY70/known-folders.zig -fno-sanitize-c -ODebug --dep options -Mtracy=/home/rad/lab/zls/src/tracy.zig -ODebug --dep diffz --dep lsp --dep tracy --dep build_options --dep version_data -Mzls=/home/rad/lab/zls/src/zls.zig -Moptions=.zig-cache/c/83122cb7323ee3a954c40694046011ee/options.zig -ODebug -Mdiffz=/home/rad/lab/zls/zig-pkg/diffz-0.0.1-G2tlIfLNAQCc06RFk0tFGj2M-X-id4WHFkMVw2JoMILR/DiffMatchPatch.zig -ODebug --dep parser --dep types -Mlsp=/home/rad/lab/zls/zig-pkg/lsp_kit-0.1.0-bi_PL3IyDACfp1xdTnkiOHEok2YpPCCCJHuuOcNzjl1D/src/lsp.zig -Mbuild_options=.zig-cache/c/df3e6d5374c60ff853e22e0aedad857e/options.zig -Mversion_data=.zig-cache/o/b3d733de2d169d19e64c3e9cb11845ff/version_data.zig -ODebug -Mparser=/home/rad/lab/zls/zig-pkg/lsp_kit-0.1.0-bi_PL3IyDACfp1xdTnkiOHEok2YpPCCCJHuuOcNzjl1D/src/parser.zig -ODebug --dep parser -Mtypes=.zig-cache/o/0a79544893f00c59225788f98e31a305/lsp_types.zig -fno-emit-bin --cache-dir .zig-cache --global-cache-dir /home/rad/.cache/zig --name zls --zig-lib-dir /home/rad/lab/zig/build/stage3/lib/zig/ -fincremental --listen=-
Build Summary: 7/9 steps succeeded (1 failed)
check
└─ compile exe zls Debug native failure
error: referenced transitive analysis errors, but none actually emitted
 func('lsp.Message(Server.HandledRequestParams,Server.HandledNotificationParams,.{}).parseParamsFromTokenStreamWithKnownMethod__anon_149797' [149797]) [transitive failure]
 referenced by: func('lsp.Message(Server.HandledRequestParams,Server.HandledNotificationParams,.{}).parseFromSliceLeaky' [33653])
 referenced by: func('Server.loop' [32866])
 referenced by: func('main.main' [31436])
 referenced by: func('start.posixCallMainAndExit' [31316])
 referenced by: func('start._start' [31301])
 referenced by: comptime(inst=('/home/rad/lab/zig/build/stage3/lib/zig/std/start.zig', %50) [3])
 referenced by: nav_val('std.start' [89])
 referenced by: comptime(inst=('/home/rad/lab/zig/build/stage3/lib/zig/std/std.zig', %554) [0])
 thread 194293 panic: referenced transitive analysis errors, but none actually emitted
 Cannot print stack trace: stack tracing is disabled
 
error: process terminated with signal ABRT
failed command: /home/rad/lab/zig/build/stage3/bin/zig build-exe -ODebug --dep exe_options --dep known-folders --dep tracy --dep zls -Mroot=/home/rad/lab/zls/src/main.zig -Mexe_options=.zig-cache/c/e0cd3d7ec5203f0b61a9edf43421ce8a/options.zig -ODebug -Mknown-folders=/home/rad/lab/zls/zig-pkg/known_folders-0.0.0-Fy-PJsbKAACbDh9bBxR0MMThxZSS6A9RH4apWphNHY70/known-folders.zig -fno-sanitize-c -ODebug --dep options -Mtracy=/home/rad/lab/zls/src/tracy.zig -ODebug --dep diffz --dep lsp --dep tracy --dep build_options --dep version_data -Mzls=/home/rad/lab/zls/src/zls.zig -Moptions=.zig-cache/c/83122cb7323ee3a954c40694046011ee/options.zig -ODebug -Mdiffz=/home/rad/lab/zls/zig-pkg/diffz-0.0.1-G2tlIfLNAQCc06RFk0tFGj2M-X-id4WHFkMVw2JoMILR/DiffMatchPatch.zig -ODebug --dep parser --dep types -Mlsp=/home/rad/lab/zls/zig-pkg/lsp_kit-0.1.0-bi_PL3IyDACfp1xdTnkiOHEok2YpPCCCJHuuOcNzjl1D/src/lsp.zig -Mbuild_options=.zig-cache/c/df3e6d5374c60ff853e22e0aedad857e/options.zig -Mversion_data=.zig-cache/o/b3d733de2d169d19e64c3e9cb11845ff/version_data.zig -ODebug -Mparser=/home/rad/lab/zls/zig-pkg/lsp_kit-0.1.0-bi_PL3IyDACfp1xdTnkiOHEok2YpPCCCJHuuOcNzjl1D/src/parser.zig -ODebug --dep parser -Mtypes=.zig-cache/o/0a79544893f00c59225788f98e31a305/lsp_types.zig -fno-emit-bin --cache-dir .zig-cache --global-cache-dir /home/rad/.cache/zig --name zls --zig-lib-dir /home/rad/lab/zig/build/stage3/lib/zig/ -fincremental --listen=-
Build Summary: 7/9 steps succeeded (1 failed)
👋The [repro in this comment](https://codeberg.org/ziglang/zig/issues/35307#issuecomment-15368114) seems to be similar, but distinct issue. <details> <summary>Me checking both repros with 0.17.0-dev.332+4a65cc4ac </summary> ``` ❯ ~/lab/zig/build/stage3/bin/zig version 0.17.0-dev.332+4a65cc4ac ~/lab/zls master ❯ ~/lab/zig/build/stage3/bin/zig build check -fincremental --watch Build Summary: 9/9 steps succeeded check └─ compile exe zls Debug native 2 errors src/Server.zig:1621:51: error: use of undeclared identifier 'HandledNotificationParams' const Message = lsp.Message(HandledRequestParams, HandledNotificationParams, .{}); ^~~~~~~~~~~~~~~~~~~~~~~~~ src/Server.zig:1830:33: error: use of undeclared identifier 'HandledNotificationParams' const Params = std.meta.Tag(HandledNotificationParams); ^~~~~~~~~~~~~~~~~~~~~~~~~ error: 2 compilation errors failed command: {....} Build Summary: 7/9 steps succeeded (1 failed) Build Summary: 9/9 steps succeeded check └─ compile exe zls Debug native 1 errors src/analyser/InternPool.zig:118:52: error: use of undeclared identifier 'empty' args_is_comptime: std.bit_set.Static(32) = empty, ^~~~~ error: 1 compilation errors failed command: {....} Build Summary: 7/9 steps succeeded (1 failed) check └─ compile exe zls Debug native failure error: referenced transitive analysis errors, but none actually emitted func('analyser.InternPool.Key.hashWithHasher__anon_58209' [58209]) [transitive failure] referenced by: func('analyser.InternPool.Key.hash64' [58201]) referenced by: func('analyser.InternPool.Key.hash32' [55484]) referenced by: func('analyser.InternPool.get' [55040]) referenced by: func('analyser.InternPool.init' [174285]) referenced by: func('Server.create' [32249]) referenced by: func('main.main' [31436]) referenced by: func('start.posixCallMainAndExit' [31316]) referenced by: func('start._start' [31301]) referenced by: comptime(inst=('/home/rad/lab/zig/build/stage3/lib/zig/std/start.zig', %50) [3]) referenced by: nav_val('std.start' [89]) referenced by: comptime(inst=('/home/rad/lab/zig/build/stage3/lib/zig/std/std.zig', %554) [0]) thread 189207 panic: referenced transitive analysis errors, but none actually emitted Cannot print stack trace: stack tracing is disabled error: process terminated with signal ABRT ``` </details> Stumbled upon this as well `Server.zig:1584` `@"textDocument/willSaveWaitUntil": types.TextDocument.WillSaveParams,` (Deleted the `c` in `TextDocument`, saved, undid, saved) ``` ❯ ~/lab/zig/build/stage3/bin/zig build check -fincremental --watch Build Summary: 9/9 steps succeeded check └─ compile exe zls Debug native 1 errors src/Server.zig:1584:46: error: root source file struct 'lsp_types' has no member named 'TextDoument' @"textDocument/willSaveWaitUntil": types.TextDoument.WillSaveParams, ^~~~~~~~~~~ .zig-cache/o/0a79544893f00c59225788f98e31a305/lsp_types.zig:1:1: note: struct declared here //! Type definitions of the Language Server Protocol. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ referenced by: lsp.Message(Server.HandledRequestParams,Server.HandledNotificationParams,.{}).Request: zig-pkg/lsp_kit-0.1.0-bi_PL3IyDACfp1xdTnkiOHEok2YpPCCCJHuuOcNzjl1D/src/lsp.zig:1762:21 lsp.Message(Server.HandledRequestParams,Server.HandledNotificationParams,.{}): zig-pkg/lsp_kit-0.1.0-bi_PL3IyDACfp1xdTnkiOHEok2YpPCCCJHuuOcNzjl1D/src/lsp.zig:1753:18 8 reference(s) hidden; use '-freference-trace=10' to see all references error: 1 compilation errors failed command: /home/rad/lab/zig/build/stage3/bin/zig build-exe -ODebug --dep exe_options --dep known-folders --dep tracy --dep zls -Mroot=/home/rad/lab/zls/src/main.zig -Mexe_options=.zig-cache/c/e0cd3d7ec5203f0b61a9edf43421ce8a/options.zig -ODebug -Mknown-folders=/home/rad/lab/zls/zig-pkg/known_folders-0.0.0-Fy-PJsbKAACbDh9bBxR0MMThxZSS6A9RH4apWphNHY70/known-folders.zig -fno-sanitize-c -ODebug --dep options -Mtracy=/home/rad/lab/zls/src/tracy.zig -ODebug --dep diffz --dep lsp --dep tracy --dep build_options --dep version_data -Mzls=/home/rad/lab/zls/src/zls.zig -Moptions=.zig-cache/c/83122cb7323ee3a954c40694046011ee/options.zig -ODebug -Mdiffz=/home/rad/lab/zls/zig-pkg/diffz-0.0.1-G2tlIfLNAQCc06RFk0tFGj2M-X-id4WHFkMVw2JoMILR/DiffMatchPatch.zig -ODebug --dep parser --dep types -Mlsp=/home/rad/lab/zls/zig-pkg/lsp_kit-0.1.0-bi_PL3IyDACfp1xdTnkiOHEok2YpPCCCJHuuOcNzjl1D/src/lsp.zig -Mbuild_options=.zig-cache/c/df3e6d5374c60ff853e22e0aedad857e/options.zig -Mversion_data=.zig-cache/o/b3d733de2d169d19e64c3e9cb11845ff/version_data.zig -ODebug -Mparser=/home/rad/lab/zls/zig-pkg/lsp_kit-0.1.0-bi_PL3IyDACfp1xdTnkiOHEok2YpPCCCJHuuOcNzjl1D/src/parser.zig -ODebug --dep parser -Mtypes=.zig-cache/o/0a79544893f00c59225788f98e31a305/lsp_types.zig -fno-emit-bin --cache-dir .zig-cache --global-cache-dir /home/rad/.cache/zig --name zls --zig-lib-dir /home/rad/lab/zig/build/stage3/lib/zig/ -fincremental --listen=- Build Summary: 7/9 steps succeeded (1 failed) check └─ compile exe zls Debug native failure error: referenced transitive analysis errors, but none actually emitted func('lsp.Message(Server.HandledRequestParams,Server.HandledNotificationParams,.{}).parseParamsFromTokenStreamWithKnownMethod__anon_149797' [149797]) [transitive failure] referenced by: func('lsp.Message(Server.HandledRequestParams,Server.HandledNotificationParams,.{}).parseFromSliceLeaky' [33653]) referenced by: func('Server.loop' [32866]) referenced by: func('main.main' [31436]) referenced by: func('start.posixCallMainAndExit' [31316]) referenced by: func('start._start' [31301]) referenced by: comptime(inst=('/home/rad/lab/zig/build/stage3/lib/zig/std/start.zig', %50) [3]) referenced by: nav_val('std.start' [89]) referenced by: comptime(inst=('/home/rad/lab/zig/build/stage3/lib/zig/std/std.zig', %554) [0]) thread 194293 panic: referenced transitive analysis errors, but none actually emitted Cannot print stack trace: stack tracing is disabled error: process terminated with signal ABRT failed command: /home/rad/lab/zig/build/stage3/bin/zig build-exe -ODebug --dep exe_options --dep known-folders --dep tracy --dep zls -Mroot=/home/rad/lab/zls/src/main.zig -Mexe_options=.zig-cache/c/e0cd3d7ec5203f0b61a9edf43421ce8a/options.zig -ODebug -Mknown-folders=/home/rad/lab/zls/zig-pkg/known_folders-0.0.0-Fy-PJsbKAACbDh9bBxR0MMThxZSS6A9RH4apWphNHY70/known-folders.zig -fno-sanitize-c -ODebug --dep options -Mtracy=/home/rad/lab/zls/src/tracy.zig -ODebug --dep diffz --dep lsp --dep tracy --dep build_options --dep version_data -Mzls=/home/rad/lab/zls/src/zls.zig -Moptions=.zig-cache/c/83122cb7323ee3a954c40694046011ee/options.zig -ODebug -Mdiffz=/home/rad/lab/zls/zig-pkg/diffz-0.0.1-G2tlIfLNAQCc06RFk0tFGj2M-X-id4WHFkMVw2JoMILR/DiffMatchPatch.zig -ODebug --dep parser --dep types -Mlsp=/home/rad/lab/zls/zig-pkg/lsp_kit-0.1.0-bi_PL3IyDACfp1xdTnkiOHEok2YpPCCCJHuuOcNzjl1D/src/lsp.zig -Mbuild_options=.zig-cache/c/df3e6d5374c60ff853e22e0aedad857e/options.zig -Mversion_data=.zig-cache/o/b3d733de2d169d19e64c3e9cb11845ff/version_data.zig -ODebug -Mparser=/home/rad/lab/zls/zig-pkg/lsp_kit-0.1.0-bi_PL3IyDACfp1xdTnkiOHEok2YpPCCCJHuuOcNzjl1D/src/parser.zig -ODebug --dep parser -Mtypes=.zig-cache/o/0a79544893f00c59225788f98e31a305/lsp_types.zig -fno-emit-bin --cache-dir .zig-cache --global-cache-dir /home/rad/.cache/zig --name zls --zig-lib-dir /home/rad/lab/zig/build/stage3/lib/zig/ -fincremental --listen=- Build Summary: 7/9 steps succeeded (1 failed) ```
Sign in to join this conversation.
No Branch/Tag specified
master
elfv2
spork8
restricted
0.16.x
panic-rewrite
parking-futex-lockfree
windows-Io-cleanup
Io-watch
ParseCommandLineOptions
windows-async-files
poll-ring
debug-file-leaks-differently
debug-file-leaks
ProcessPrng
elfv2-dyn
jobserver
threadtheft
io-threaded-no-queue
0.15.x
Io.net
comptime-allocator
restricted-function-pointers
cli
wasm-linker-writer
wrangle-writer-buffering
sha1-stream
async-await-demo
fixes
0.14.x
ast-node-methods
macos-debug-info
make-vs-configure
fuzz-macos
sans-aro
ArrayList-reserve
incr-bug
llvm-ir-nosanitize-metadata
ci-tarballs
ci-scripts
threadpool
0.12.x
new-pkg-hash
json-diagnostics
more-doctests
rework-comptime-mutation
0.11.x
ci-perf-comment
stage2-async
0.10.x
autofix
0.9.x
aro
hcs
0.8.x
0.7.x
0.16.0
0.15.2
0.15.1
0.15.0
0.14.1
0.14.0
0.12.1
0.13.0
0.12.0
0.11.0
0.10.1
0.10.0
0.9.1
0.9.0
0.8.1
0.8.0
0.7.1
0.7.0
0.6.0
0.5.0
0.4.0
0.3.0
0.2.0
0.1.1
0.1.0
Labels
Clear labels
abi/f32
abi/ilp32
abi/sf
accepted
This proposal is planned.
arch/21k
arch/6502
arch/aarch64
arch/alpha
arch/amdgcn
arch/arc
arch/arc32
arch/arc64
arch/arm
arch/avr
arch/bfin
arch/bpf
arch/colossus
arch/cris
arch/csky
arch/dlx
arch/epiphany
arch/fr30
arch/frv
arch/hexagon
arch/hppa
arch/hppa64
arch/ia64
arch/kalimba
arch/kvx
arch/lanai
arch/lm32
arch/loongarch32
arch/loongarch64
arch/m32r
arch/m68k
arch/m88k
arch/mcore
arch/microblaze
arch/mips
arch/mips64
arch/mmix
arch/moxie
arch/mrisc32
arch/msp430
arch/nds32
arch/ns32k
arch/nvptx
arch/or1k
arch/powerpc
arch/powerpc64
arch/propeller
arch/riscv32
arch/riscv64
arch/rl78
arch/rx
arch/s390x
arch/sh
arch/sparc
arch/sparc64
arch/spirv
arch/spu
arch/tricore
arch/v850
arch/vax
arch/vc4
arch/ve
arch/wasm
arch/x86
arch/x86_64
arch/xcore
arch/xtensa
autodoc
The web application for interactive documentation and generation of its assets.
backend/c
The C backend outputs C source code.
backend/llvm
The LLVM backend outputs an LLVM bitcode module.
backend/self-hosted
The self-hosted backends produce machine code directly.
binutils
Zig's included binary utilities: zig ar, zig dlltool, zig lib, zig ranlib, zig objcopy, and zig rc.
breaking
Implementing this issue could cause existing code to no longer compile or have different behavior.
build system
The Zig build system - zig build, std.Build, the build runner, and package management.
debug info
An issue related to debug information (e.g. DWARF) produced by the Zig compiler.
docs
An issue with documentation, e.g. the language reference or standard library doc comments.
error message
This issue points out an error message that is unhelpful and should be improved.
frontend
Tokenization, parsing, AstGen, ZonGen, Sema, Legalize, and Liveness.
fuzzing
An issue related to Zig's integrated fuzz testing.
incremental
Reuse of internal compiler state for faster compilation.
lib/c
This issue relates to Zig's libc implementation and/or vendored libcs.
lib/compiler-rt
This issue relates to Zig's compiler-rt library.
lib/cxx
This issue relates to Zig's vendored libc++ and/or libc++abi.
lib/std
This issue relates to Zig's standard library.
lib/tsan
This issue relates to Zig's vendored libtsan.
lib/ubsan-rt
This issue relates to Zig's ubsan-rt library.
lib/unwind
This issue relates to Zig's vendored libunwind.
linking
Zig's integrated object file and incremental linker.
miscompilation
The compiler reports success but produces semantically incorrect code.
os/android
os/contiki
os/dragonfly
os/driverkit
os/emscripten
os/freebsd
os/fuchsia
os/haiku
os/hermit
os/hurd
os/illumos
os/ios
os/linux
os/maccatalyst
os/macos
os/managarm
os/netbsd
os/ohos
os/openbsd
os/plan9
os/redox
os/rtems
os/serenity
os/tvos
os/uefi
os/visionos
os/wasi
os/watchos
os/windows
proposal
This issue suggests language modifications. If it also has the "accepted" label then it is planned.
release notes
This issue or pull request should be mentioned in the release notes.
testing
This issue is related to testing the compiler, standard library, or other parts of Zig.
zig cc
Zig as a drop-in C-family compiler.
zig fmt
The Zig source code formatter.
zig reduce
The Zig source code reduction tool.
bounty
https://ziglang.org/news/announcing-donor-bounties
bug
Observed behavior contradicts documented or intended behavior.
contributor-friendly
This issue is limited in scope and/or knowledge of project internals.
downstream
An issue with a third-party project that uses this project.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
infra
An issue related to project infrastructure, e.g. continuous integration.
optimization
A task to improve performance and/or resource usage.
question
No questions on the issue tracker; use a community space instead.
regression
Something that used to work in a previous version stopped working
upstream
An issue with a third-party project that this project uses.
use case
Describes a real use case that is difficult or impossible, but does not propose a solution.
No labels
abi/f32
abi/ilp32
abi/sf
accepted
arch/21k
arch/6502
arch/aarch64
arch/alpha
arch/amdgcn
arch/arc
arch/arc32
arch/arc64
arch/arm
arch/avr
arch/bfin
arch/bpf
arch/colossus
arch/cris
arch/csky
arch/dlx
arch/epiphany
arch/fr30
arch/frv
arch/hexagon
arch/hppa
arch/hppa64
arch/ia64
arch/kalimba
arch/kvx
arch/lanai
arch/lm32
arch/loongarch32
arch/loongarch64
arch/m32r
arch/m68k
arch/m88k
arch/mcore
arch/microblaze
arch/mips
arch/mips64
arch/mmix
arch/moxie
arch/mrisc32
arch/msp430
arch/nds32
arch/ns32k
arch/nvptx
arch/or1k
arch/powerpc
arch/powerpc64
arch/propeller
arch/riscv32
arch/riscv64
arch/rl78
arch/rx
arch/s390x
arch/sh
arch/sparc
arch/sparc64
arch/spirv
arch/spu
arch/tricore
arch/v850
arch/vax
arch/vc4
arch/ve
arch/wasm
arch/x86
arch/x86_64
arch/xcore
arch/xtensa
autodoc
backend/c
backend/llvm
backend/self-hosted
binutils
breaking
build system
debug info
docs
error message
frontend
fuzzing
incremental
lib/c
lib/compiler-rt
lib/cxx
lib/std
lib/tsan
lib/ubsan-rt
lib/unwind
linking
miscompilation
os/android
os/contiki
os/dragonfly
os/driverkit
os/emscripten
os/freebsd
os/fuchsia
os/haiku
os/hermit
os/hurd
os/illumos
os/ios
os/linux
os/maccatalyst
os/macos
os/managarm
os/netbsd
os/ohos
os/openbsd
os/plan9
os/redox
os/rtems
os/serenity
os/tvos
os/uefi
os/visionos
os/wasi
os/watchos
os/windows
proposal
release notes
testing
zig cc
zig fmt
zig reduce
bounty
bug
contributor-friendly
downstream
enhancement
infra
optimization
question
regression
upstream
use case
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ziglang/zig#35307
Reference in a new issue
ziglang/zig
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?