diff --git a/lib/compiler/Maker.zig b/lib/compiler/Maker.zig index e0ce8142628ad4aac0466293869eaa9f7bab225d..04448eb5ac31e519270f0cbb749c418c8458e19b 100644 --- a/lib/compiler/Maker.zig +++ b/lib/compiler/Maker.zig @@ -1485,6 +1485,10 @@ fn configure(graph: *Graph, options: ConfigureOptions) ConfigureError!ScannedCon fatal("replacing {f}: {t}", .{ dependencies_zig_path, err }); deps_mod.root_path = try dependencies_zig_path.toString(arena); + + if (config_man) |man| { + man.hash.addBytes(&hex_digest); + } } { diff --git a/lib/std/Build.zig b/lib/std/Build.zig index a3c38262f3ea0da7317776fa73bb45d548c06eed..172b39bfe5302585151c39427f6c45a31e4cf822 100644 --- a/lib/std/Build.zig +++ b/lib/std/Build.zig @@ -1959,6 +1959,8 @@ pub fn lazyDependency(b: *Build, name: []const u8, args: anytype) ?*Dependency { /// * `dependencyStep` pub fn declareDependency(b: *Build, name: []const u8) void { const pkg_hash = findPkgHashOrFatal(b, name); + const entry = package_map.get(pkg_hash).?; + if (entry.available) return; markNeededLazyDep(b, pkg_hash); } @@ -1972,6 +1974,8 @@ pub fn declareDependency(b: *Build, name: []const u8) void { pub fn declareDependencyStep(b: *Build, s: *Step, name: []const u8) void { const graph = b.graph; const pkg_hash = findPkgHashOrFatal(b, name); + const entry = package_map.get(pkg_hash).?; + if (entry.available) return; const interned_hash = graph.wip_configuration.addString(pkg_hash) catch @panic("OOM"); s.unlazy_deps.put(graph.arena, interned_hash, {}) catch @panic("OOM"); }