From 6f2109384d277ad8dff50cf7a8df1a87f45a6695 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 20 Sep 2026 14:48:16 -0700 Subject: [PATCH] Maker: add build.zig.zon files to configuration cache manifest closes #36255 follow-up enhancement: only add the root build.zig.zon file as an input to the cache manifest. Do a cache check *before* fetching, that has the ability to skip fetching. If fetching needs to be run, then add the build.zig.zon files as discovered files, keeping the stat and contents around from the fetch process rather than redundantly doing the file system operations. --- lib/compiler/Maker.zig | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/compiler/Maker.zig b/lib/compiler/Maker.zig index 90c6965a6d3fe1bdd9519b9b25861a084d3faabd..743577b43f8b2d5ac8010a6ade2d5653c64014da 100644 --- a/lib/compiler/Maker.zig +++ b/lib/compiler/Maker.zig @@ -1354,11 +1354,15 @@ fn configure(graph: *Graph, options: ConfigureOptions) !ScannedConfig { f.cli_module = m; } - // Each build.zig module needs access to each of its - // dependencies' build.zig modules by name. + // Each build.zig module needs access to each of its dependencies' build.zig modules by + // name. Also, ensure build.zig.zon files are added to the configuration cache manifest. for (fetches) |f| { - const mod = f.cli_module orelse continue; if (!f.have_manifest) continue; + if (config_man) |man| { + const manifest_path = try f.package_root.join(arena, Package.Manifest.basename); + _ = try man.addInputPath(manifest_path, .{}); + } + const mod = f.cli_module orelse continue; const man = &f.manifest; const dep_names = man.dependencies.keys(); try mod.deps.ensureUnusedCapacity(arena, @intCast(dep_names.len)); -- 2.54.0