automatically synthesize a check step for build on save
For a typical zig init like project, the "install" step is simple enough that a "check" could automatically be inferred by ZLS. The build runner could inject additional steps into the build graph so that the user doesn't need to do edit their build.zig to get it ready for build on save.
Hey @Techatrix, I was curious about ZLS and this issue in particular and wanted to take a stub. I was thinking about triggering conditions where ZLS can safely assume the project/install step is simple enough to infer the "check". Was there anything specific on your mind or as long as install has parseasble graph with compilations - it's good enough?
We already collect all compilation steps that are descendants of the install step, have you had in mind simply nullying the generated_bin, generated_pdb and such so we run synthesize a "check" that would simply run such trimmed compilations? Btw, would we also want to include the compilation from the test?
ideally it should be a single line https://codeberg.org/ziglang/zig/issues/36309
@nektro ah, that's neat! so if I get it right, if the upstream issue is fixed, the only thing to do here would be to collect compilation steps and exec them, right?