stage2: hook up Sema to the progress bar
This commit is contained in:
@@ -42,6 +42,7 @@ root_pkg: *Package,
|
||||
/// Normally, `main_pkg` and `root_pkg` are the same. The exception is `zig test`, in which
|
||||
/// `root_pkg` is the test runner, and `main_pkg` is the user's source file which has the tests.
|
||||
main_pkg: *Package,
|
||||
sema_prog_node: std.Progress.Node = undefined,
|
||||
|
||||
/// Used by AstGen worker to load and store ZIR cache.
|
||||
global_zir_cache: Compilation.Directory,
|
||||
@@ -3517,6 +3518,10 @@ pub fn ensureDeclAnalyzed(mod: *Module, decl: *Decl) SemaError!void {
|
||||
.unreferenced => false,
|
||||
};
|
||||
|
||||
var decl_prog_node = mod.sema_prog_node.start(mem.sliceTo(decl.name, 0), 0);
|
||||
decl_prog_node.activate();
|
||||
defer decl_prog_node.end();
|
||||
|
||||
const type_changed = mod.semaDecl(decl) catch |err| switch (err) {
|
||||
error.AnalysisFail => {
|
||||
if (decl.analysis == .in_progress) {
|
||||
|
||||
Reference in New Issue
Block a user