clear roc cache on zig build roc too

This commit is contained in:
Luke Boswell 2025-11-30 13:03:25 +11:00
parent 68c259d3af
commit 34e8dad7d4
No known key found for this signature in database
GPG key ID: 54A7324B1B975757

View file

@ -831,6 +831,11 @@ pub fn build(b: *std.Build) void {
roc_modules.addAll(roc_exe);
install_and_run(b, no_bin, roc_exe, roc_step, run_step, run_args);
// Clear the Roc cache when building the compiler to ensure stale cached artifacts aren't used
const clear_cache_step = createClearCacheStep(b);
roc_step.dependOn(clear_cache_step);
b.getInstallStep().dependOn(clear_cache_step);
// CLI integration tests - run actual roc programs like CI does
if (!no_bin) {
const install = b.addInstallArtifact(roc_exe, .{});