| ... | @@ -2261,7 +2261,7 @@ pub fn update(comp: *Compilation, main_progress_node: std.Progress.Node) !void { | ... | @@ -2261,7 +2261,7 @@ pub fn update(comp: *Compilation, main_progress_node: std.Progress.Node) !void { |
| 2261 | | 2261 | |
| 2262 | zcu.compile_log_text.shrinkAndFree(gpa, 0); | 2262 | zcu.compile_log_text.shrinkAndFree(gpa, 0); |
| 2263 | | 2263 | |
| 2264 | zcu.skip_analysis_errors = false; | 2264 | zcu.skip_analysis_this_update = false; |
| 2265 | | 2265 | |
| 2266 | // Make sure std.zig is inside the import_table. We unconditionally need | 2266 | // Make sure std.zig is inside the import_table. We unconditionally need |
| 2267 | // it for start.zig. | 2267 | // it for start.zig. |
| ... | @@ -2336,6 +2336,17 @@ pub fn update(comp: *Compilation, main_progress_node: std.Progress.Node) !void { | ... | @@ -2336,6 +2336,17 @@ pub fn update(comp: *Compilation, main_progress_node: std.Progress.Node) !void { |
| 2336 | const pt: Zcu.PerThread = .activate(zcu, .main); | 2336 | const pt: Zcu.PerThread = .activate(zcu, .main); |
| 2337 | defer pt.deactivate(); | 2337 | defer pt.deactivate(); |
| 2338 | | 2338 | |
| | 2339 | if (!zcu.skip_analysis_this_update) { |
| | 2340 | if (comp.config.is_test) { |
| | 2341 | // The `test_functions` decl has been intentionally postponed until now, |
| | 2342 | // at which point we must populate it with the list of test functions that |
| | 2343 | // have been discovered and not filtered out. |
| | 2344 | try pt.populateTestFunctions(main_progress_node); |
| | 2345 | } |
| | 2346 | |
| | 2347 | try pt.processExports(); |
| | 2348 | } |
| | 2349 | |
| 2339 | if (build_options.enable_debug_extensions and comp.verbose_intern_pool) { | 2350 | if (build_options.enable_debug_extensions and comp.verbose_intern_pool) { |
| 2340 | std.debug.print("intern pool stats for '{s}':\n", .{ | 2351 | std.debug.print("intern pool stats for '{s}':\n", .{ |
| 2341 | comp.root_name, | 2352 | comp.root_name, |
| ... | @@ -2350,15 +2361,6 @@ pub fn update(comp: *Compilation, main_progress_node: std.Progress.Node) !void { | ... | @@ -2350,15 +2361,6 @@ pub fn update(comp: *Compilation, main_progress_node: std.Progress.Node) !void { |
| 2350 | }); | 2361 | }); |
| 2351 | zcu.intern_pool.dumpGenericInstances(gpa); | 2362 | zcu.intern_pool.dumpGenericInstances(gpa); |
| 2352 | } | 2363 | } |
| 2353 | | | |
| 2354 | if (comp.config.is_test) { | | |
| 2355 | // The `test_functions` decl has been intentionally postponed until now, | | |
| 2356 | // at which point we must populate it with the list of test functions that | | |
| 2357 | // have been discovered and not filtered out. | | |
| 2358 | try pt.populateTestFunctions(main_progress_node); | | |
| 2359 | } | | |
| 2360 | | | |
| 2361 | try pt.processExports(); | | |
| 2362 | } | 2364 | } |
| 2363 | | 2365 | |
| 2364 | if (anyErrors(comp)) { | 2366 | if (anyErrors(comp)) { |
| ... | @@ -3310,7 +3312,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) !ErrorBundle { | ... | @@ -3310,7 +3312,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) !ErrorBundle { |
| 3310 | } | 3312 | } |
| 3311 | } | 3313 | } |
| 3312 | } | 3314 | } |
| 3313 | if (zcu.skip_analysis_errors) break :zcu_errors; | 3315 | if (zcu.skip_analysis_this_update) break :zcu_errors; |
| 3314 | var sorted_failed_analysis: std.AutoArrayHashMapUnmanaged(InternPool.AnalUnit, *Zcu.ErrorMsg).DataList.Slice = s: { | 3316 | var sorted_failed_analysis: std.AutoArrayHashMapUnmanaged(InternPool.AnalUnit, *Zcu.ErrorMsg).DataList.Slice = s: { |
| 3315 | const SortOrder = struct { | 3317 | const SortOrder = struct { |
| 3316 | zcu: *Zcu, | 3318 | zcu: *Zcu, |
| ... | @@ -3446,7 +3448,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) !ErrorBundle { | ... | @@ -3446,7 +3448,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) !ErrorBundle { |
| 3446 | try comp.link_diags.addMessagesToBundle(&bundle, comp.bin_file); | 3448 | try comp.link_diags.addMessagesToBundle(&bundle, comp.bin_file); |
| 3447 | | 3449 | |
| 3448 | if (comp.zcu) |zcu| { | 3450 | if (comp.zcu) |zcu| { |
| 3449 | if (!zcu.skip_analysis_errors and bundle.root_list.items.len == 0 and zcu.compile_log_sources.count() != 0) { | 3451 | if (!zcu.skip_analysis_this_update and bundle.root_list.items.len == 0 and zcu.compile_log_sources.count() != 0) { |
| 3450 | const values = zcu.compile_log_sources.values(); | 3452 | const values = zcu.compile_log_sources.values(); |
| 3451 | // First one will be the error; subsequent ones will be notes. | 3453 | // First one will be the error; subsequent ones will be notes. |
| 3452 | const src_loc = values[0].src(); | 3454 | const src_loc = values[0].src(); |
| ... | @@ -3957,7 +3959,7 @@ fn performAllTheWorkInner( | ... | @@ -3957,7 +3959,7 @@ fn performAllTheWorkInner( |
| 3957 | // However, this means our analysis data is invalid, so we want to omit all analysis errors. | 3959 | // However, this means our analysis data is invalid, so we want to omit all analysis errors. |
| 3958 | | 3960 | |
| 3959 | assert(zcu.failed_files.count() > 0); // we will get an error | 3961 | assert(zcu.failed_files.count() > 0); // we will get an error |
| 3960 | zcu.skip_analysis_errors = true; | 3962 | zcu.skip_analysis_this_update = true; |
| 3961 | return; | 3963 | return; |
| 3962 | } | 3964 | } |
| 3963 | | 3965 | |