You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running into this issue on Windows building ZLS nightly (as uses the latest known-folders.zig), on zig nightly (as of 6c2eb0f131588be111652a755a4492ff72d16440 but built with 0.12.0-dev.3008+b2374c4d7).
Since zig upstream has adopted Wtf8 for better Windows support, it's breaking some error handling downstream, and InvalidUtf8 is no longer used on Windows (i.e. with InvalidWtf8 it's become a WASI only error for now) which hasn't been properly documented with a release (yet, but the merge ziglang/zig#19005 has the summary of changes).
This isn't critical yet, as ZLS naturally also needs time to update, plus it's only been two days, but best to have an issue that people can at least see is there before figuring out support for 0.12. Similar to ZLS figuring out their backwards compatibility (zigtools/zls#1020) I suspect known-folders will have to make some considerations here as well, especially with breaking changes like this, though this isn't an issue for that discussion.
> zig build
install
└─ install zls
└─ zig build-exe zls Debug native 1 errors
C:\Users\alexb\AppData\Local\zig\p\12209925016f4b5486a713828ead3bcc900fa4f039c93de1894aa7d5253f7633b92c\known-folders.zig:100:29: error: expected type 'error{OutOfMemory,InvalidWtf8,EnvironmentVariableNotFound}', found 'error{InvalidUtf8}'
error.InvalidUtf8 => return null,
^~~~~~~~~~~~~~~~~
C:\Users\alexb\AppData\Local\zig\p\12209925016f4b5486a713828ead3bcc900fa4f039c93de1894aa7d5253f7633b92c\known-folders.zig:100:29: note: 'error.InvalidUtf8' not a member of destination error set
referenced by:
comptime_0: C:\Users\alexb\AppData\Local\zig\p\12209925016f4b5486a713828ead3bcc900fa4f039c93de1894aa7d5253f7633b92c\known-folders.zig:339:9
remaining reference traces hidden; use '-freference-trace' to see all reference traces
error: the following command failed with 1 compilation errors:
C:\bin\zig\zig.exe build-exe -ODebug --dep exe_options --dep tracy --dep known-folders --dep zls -Mroot=C:\code\zig\zls\src\main.zig -Mexe_options=C:\code\zig\zls\zig-cache\c\0b9c30ddea2c61b29aa9971e1deb8de5\options.zig -ODebug --dep options -Mtracy=C:\code\zig\zls\src\tracy.zig -Mknown-folders=C:\Users\alexb\AppData\Local\zig\p\12209925016f4b5486a713828ead3bcc900fa4f039c93de1894aa7d5253f7633b92c\known-folders.zig --dep known-folders --dep diffz --dep tracy --dep build_options --dep version_data -Mzls=C:\code\zig\zls\src\zls.zig -Moptions=C:\code\zig\zls\zig-cache\c\85d0d8879cce6839a2a4dcf23c53e5d5\options.zig -Mdiffz=C:\Users\alexb\AppData\Local\zig\p\12200d71e4b7029ea56a429e24260c6c0e85a3069b0d4ba85eace21a0fd75910aa64\DiffMatchPatch.zig -Mbuild_options=C:\code\zig\zls\zig-cache\c\7e53829d1ea0122006493119e8b9b4f7\options.zig -Mversion_data=C:\code\zig\zls\zig-cache\o\328408cdc1d92dec548fab4d92e87b51\version_data_master_19780.zig --cache-dir C:\code\zig\zls\zig-cache --global-cache-dir C:\Users\alexb\AppData\Local\zig --name zls --listen=-
Build Summary: 5/8 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
└─ install zls transitive failure
└─ zig build-exe zls Debug native 1 errors
error: the following build command failed with exit code 1:
C:\code\zig\zls\zig-cache\o\9f088f9bb5978bbefa45ac1174cba596\build.exe C:\bin\zig\zig.exe C:\code\zig\zls C:\code\zig\zls\zig-cache C:\Users\alexb\AppData\Local\zig --seed 0xadf294b1 -Z1c6b4bd0bfd2d3ca
The text was updated successfully, but these errors were encountered:
AlexBlandin
changed the title
Error set mismatch error: expected type ... found 'error{InvalidUtf8}'
Breaking change with InvalidUf8 as zig introduces Wtf8
Feb 27, 2024
AlexBlandin
changed the title
Breaking change with InvalidUf8 as zig introduces Wtf8
Breaking change with InvalidUtf8 as zig introduces Wtf8
Feb 27, 2024
Closed as #45 was merged with the fix which, with the current compatibility policy of ZLS, resolves the issue for compilation for Zig 0.12.0-dev.3030+032c2ee9b and after. It may still be worth considering the compatibility policy of known-folder, though it would likely be the same conclusion as ZLS, but again, this isn't the issue for that topic.
Running into this issue on Windows building ZLS nightly (as uses the latest known-folders.zig), on zig nightly (as of 6c2eb0f131588be111652a755a4492ff72d16440 but built with 0.12.0-dev.3008+b2374c4d7).
Since zig upstream has adopted
Wtf8
for better Windows support, it's breaking some error handling downstream, andInvalidUtf8
is no longer used on Windows (i.e. withInvalidWtf8
it's become aWASI
only error for now) which hasn't been properly documented with a release (yet, but the merge ziglang/zig#19005 has the summary of changes).This isn't critical yet, as ZLS naturally also needs time to update, plus it's only been two days, but best to have an issue that people can at least see is there before figuring out support for 0.12. Similar to ZLS figuring out their backwards compatibility (zigtools/zls#1020) I suspect known-folders will have to make some considerations here as well, especially with breaking changes like this, though this isn't an issue for that discussion.
The text was updated successfully, but these errors were encountered: