diff --git a/src/Compilation.zig b/src/Compilation.zig index 6e3a955632ab9d48a4e50231c3b82fe316253a6e..cd4794554e4edafa2a0f373ecb5e1231e48f4ba1 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2350,7 +2350,12 @@ fn processOneJob(comp: *Compilation, job: Job, main_progress_node: *std.Progress var air = module.analyzeFnBody(decl, func, sema_arena) catch |err| switch (err) { error.AnalysisFail => { - assert(func.state != .in_progress); + if (func.state == .in_progress) { + // If this decl caused the compile error, the analysis field would + // be changed to indicate it was this Decl's fault. Because this + // did not happen, we infer here that it was a dependency failure. + func.state = .dependency_failure; + } return; }, error.OutOfMemory => return error.OutOfMemory, diff --git a/src/value.zig b/src/value.zig index ac4f64cada233b343c030f873d17a6612ff88a76..e3949ea3c46dd5b456e49f9b42be8e5d0751b599 100644 --- a/src/value.zig +++ b/src/value.zig @@ -1543,6 +1543,8 @@ pub const Value = extern union { hash(slice.len, Type.usize, hasher); }, + // For these, hash them as hash of a pointer to the decl, + // combined with a hash of the byte offset from the decl. .elem_ptr => @panic("TODO: Implement more pointer hashing cases"), .field_ptr => @panic("TODO: Implement more pointer hashing cases"), .eu_payload_ptr => @panic("TODO: Implement more pointer hashing cases"),