ZLS 0.17.0
Feature improvements
Don’t follow aliases when renaming symbol (#3199)
Consider the following source file:
const S = struct {
fn foo() void {}
};
comptime {
const foo = S.foo;
foo();
}
- Renaming
foo()will only renamefoo()and constfoo - Renaming
fn foois unchanged and will rename all four locations - References are also unchanged and will provide all four locations no matter where it has been requested
Build System Integration
During the Zig 0.17 development cycle, the separation of maker process and configurer process has broken critical build system integration features in ZLS. Most of them have since been restored using the build system protocol but various regressions remain that are anticipated to be resolved during the next release cycle.
On the positive side, the new protocol lays the foundation for future improvements in ZLS and related tooling. Especially editors could utilize it to integrate unit testing, fuzzing, code coverage reports or debugging capabilities that are fully aware of the Zig build system.
All known regressions are tracked in #3277 and listed below:
Package @imports in build.zig
Type resolution for package imports in build.zig files have regressed.
Upstream Zig Issue: ziglang/zig#36387
Module @imports to exported modules without a compile step
Type resolution for modules that are only exported using b.addModule but aren’t tied to a compile step have regressed.
An build.zig file that would be affected:
const std = @import("std");
pub fn build(b: *std.Build) void {
_ = b.addModule("foo", .{
.root_source_file = b.path("root.zig"),
.imports = &.{
.{ .name = "bar", .module = b.createModule(.{ .root_source_file = b.path("bar.zig") }) },
},
});
}
In the above example, @import("bar") will not be resolved.
Upstream Zig Issue: ziglang/zig#36388
Build system protocol file watching doesn’t work on windows
File watching has regressed on windows due to a bug in the build system protocol. This does not affect the CLI when running zig build --watch.
ZLS does work around this issue by receiving file save events through the LSP protocol. File changes through external programs (e.g. version control) will not be detected.
Upstream Zig Issue: ziglang/zig#37236
Contributors
Here is a list of everyone who has made at least one contribution to this release of ZLS:
- Techatrix
- FnControlOption
- psznm
- xdBronch
- Khang Nguyen Duy
- Akhilesh Arora
- James
- Jassiel Ovando
- fomgleb
- l1yefeng
Sponsors
We’d like to take a second to thank all our awesome contributors and donators/backers/sponsors; if you have time or money to spare, consider partaking in either of these options - they help keep ZLS awesome for everyone!
Full Changelog: 0.16.0…0.17.0
Release Artifacts
All files are signed with minisign using this public key:
RWR+9B91GBZ0zOjh6Lr17+zKf5BoSuFvrx2xSeDE57uIYvnKBGmMjOex
| OS | Arch | Filename | Signature | Size |
|---|---|---|---|---|
| Windows | x86_64 | zls-x86_64-windows-0.17.0.zip | minisig | 4.65 MiB |
| Windows | aarch64 | zls-aarch64-windows-0.17.0.zip | minisig | 4.38 MiB |
| Windows | x86 | zls-x86-windows-0.17.0.zip | minisig | 4.71 MiB |
| macOS | x86_64 | zls-x86_64-macos-0.17.0.tar.xz | minisig | 1.16 MiB |
| macOS | aarch64 | zls-aarch64-macos-0.17.0.tar.xz | minisig | 1.02 MiB |
| Linux | x86_64 | zls-x86_64-linux-0.17.0.tar.xz | minisig | 3.88 MiB |
| Linux | aarch64 | zls-aarch64-linux-0.17.0.tar.xz | minisig | 3.65 MiB |
| Linux | arm | zls-arm-linux-0.17.0.tar.xz | minisig | 3.83 MiB |
| Linux | riscv64 | zls-riscv64-linux-0.17.0.tar.xz | minisig | 4.39 MiB |
| Linux | powerpc64le | zls-powerpc64le-linux-0.17.0.tar.xz | minisig | 3.77 MiB |
| Linux | x86 | zls-x86-linux-0.17.0.tar.xz | minisig | 3.88 MiB |
| Linux | loongarch64 | zls-loongarch64-linux-0.17.0.tar.xz | minisig | 4 MiB |
| Linux | s390x | zls-s390x-linux-0.17.0.tar.xz | minisig | 4.15 MiB |
| WASI | wasm32 | zls-wasm32-wasi-0.17.0.tar.xz | minisig | 2.36 MiB |