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
After ziglang/zig#21063 is merged, the Zig compiler is able to perform certain incremental updates correctly. There's still a ways to go before it's generally usable, but -fno-emit-bin builds will be the first thing to work correctly, and some do under that PR. For instance, simple incremental updates to the compiler itself typically do the right thing now.
In the future, incremental compilation will be able to help the Zig compiler expose detailed semantic information to ZLS or a similar project (ziglang/zig#615). However, ZLS can still make good use of incremental compilation before upstream progress is made there.
If ZLS' build runner introduces support for std.Build.Watch like the standard build runner does, which should be a relatively straightforward enhancement, it can begin using incremental compilation for build-on-save. (Incremental compilation currently only works if the compiler process stays running via the compiler server protocol: serialization and deserialization of compiler state to disk is a WIP feature.)
This functionality should be behind a config option which can be disabled by default. It's definitely possible to crash the compiler right now, or even to get false positive compile errors; incremental compilation is not stable, even when not emitting a binary. When we are emitting a binary, it'll basically crash immediately, so this will currently only work if the user is providing via build_on_save_step the name of a step which will pass -fno-emit-bin to the compiler. Nevertheless, it might be valuable to expose this as an option for people to try out.
The text was updated successfully, but these errors were encountered:
After ziglang/zig#21063 is merged, the Zig compiler is able to perform certain incremental updates correctly. There's still a ways to go before it's generally usable, but
-fno-emit-bin
builds will be the first thing to work correctly, and some do under that PR. For instance, simple incremental updates to the compiler itself typically do the right thing now.In the future, incremental compilation will be able to help the Zig compiler expose detailed semantic information to ZLS or a similar project (ziglang/zig#615). However, ZLS can still make good use of incremental compilation before upstream progress is made there.
If ZLS' build runner introduces support for
std.Build.Watch
like the standard build runner does, which should be a relatively straightforward enhancement, it can begin using incremental compilation for build-on-save. (Incremental compilation currently only works if the compiler process stays running via the compiler server protocol: serialization and deserialization of compiler state to disk is a WIP feature.)This functionality should be behind a config option which can be disabled by default. It's definitely possible to crash the compiler right now, or even to get false positive compile errors; incremental compilation is not stable, even when not emitting a binary. When we are emitting a binary, it'll basically crash immediately, so this will currently only work if the user is providing via
build_on_save_step
the name of a step which will pass-fno-emit-bin
to the compiler. Nevertheless, it might be valuable to expose this as an option for people to try out.The text was updated successfully, but these errors were encountered: