2022-11-19 13:48:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-01 09:06:54 -07:00
|
|
|
|
|
|
|
|
|
2025-10-07 22:31:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-01 09:06:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-10-29 00:37:25 +01:00
|
|
|
|
2025-10-07 22:31:06 -07:00
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2020-09-14 11:05:51 -07:00
|
|
|
|
2021-12-09 22:07:28 -07:00
|
|
|
|
2025-10-08 21:56:20 -07:00
|
|
|
|
2025-11-24 11:18:35 -08:00
|
|
|
|
2020-09-14 11:05:51 -07:00
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-09 10:00:25 -07:00
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
2026-01-01 14:53:21 -08:00
|
|
|
|
|
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
2024-03-21 16:16:47 -07:00
|
|
|
|
2024-03-21 16:11:59 -07:00
|
|
|
|
2023-02-05 19:39:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-24 16:22:45 -07:00
|
|
|
|
2021-12-09 18:55:20 -07:00
|
|
|
|
2024-12-10 17:43:42 -08:00
|
|
|
|
2020-09-14 11:05:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-16 12:31:42 -07:00
|
|
|
|
2020-09-14 11:05:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-05 19:39:04 -07:00
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-01-01 14:53:21 -08:00
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-01-01 14:53:21 -08:00
|
|
|
|
2023-08-19 15:41:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-01-01 14:53:21 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-19 15:41:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
2020-09-16 12:31:42 -07:00
|
|
|
|
|
|
|
|
|
2020-12-10 21:12:05 -07:00
|
|
|
|
2023-12-11 23:08:03 +01:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2023-05-10 01:52:33 -04:00
|
|
|
|
|
|
|
|
|
2025-12-05 10:18:05 +01:00
|
|
|
|
2020-04-30 20:00:26 -06:00
|
|
|
|
2020-09-08 01:11:10 -07:00
|
|
|
|
2020-09-24 16:22:45 -07:00
|
|
|
|
2020-09-08 01:11:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-10 01:52:33 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-27 20:05:22 -07:00
|
|
|
|
2023-05-10 01:52:33 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-08 01:11:10 -07:00
|
|
|
|
2020-03-06 20:23:15 -07:00
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
2020-05-01 23:06:10 -06:00
|
|
|
|
2024-10-16 12:14:19 -07:00
|
|
|
|
|
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2021-12-30 16:42:32 -07:00
|
|
|
|
2020-12-10 21:12:05 -07:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2021-12-30 16:42:32 -07:00
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2021-12-30 16:42:32 -07:00
|
|
|
|
2025-10-08 21:56:20 -07:00
|
|
|
|
2024-10-11 23:28:31 -07:00
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2024-10-11 23:28:31 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-30 16:42:32 -07:00
|
|
|
|
|
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
2020-04-15 20:13:26 -06:00
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
2020-04-15 20:13:26 -06:00
|
|
|
|
|
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-16 12:14:19 -07:00
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2024-10-16 12:14:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
|
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
|
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2023-04-23 20:06:21 +02:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 21:32:26 -07:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-09-13 19:17:58 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-09-08 01:11:10 -07:00
|
|
|
|
2020-04-07 23:57:19 -06:00
|
|
|
|
2024-03-01 09:18:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-08 01:11:10 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-09-08 01:11:10 -07:00
|
|
|
|
2023-02-21 18:39:22 +01:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-08 01:11:10 -07:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
2024-11-23 17:57:39 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-30 21:57:44 +01:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
zig build system: change target, compilation, and module APIs
Introduce the concept of "target query" and "resolved target". A target
query is what the user specifies, with some things left to default. A
resolved target has the default things discovered and populated.
In the future, std.zig.CrossTarget will be rename to std.Target.Query.
Introduces `std.Build.resolveTargetQuery` to get from one to the other.
The concept of `main_mod_path` is gone, no longer supported. You have to
put the root source file at the module root now.
* remove deprecated API
* update build.zig for the breaking API changes in this branch
* move std.Build.Step.Compile.BuildId to std.zig.BuildId
* add more options to std.Build.ExecutableOptions, std.Build.ObjectOptions,
std.Build.SharedLibraryOptions, std.Build.StaticLibraryOptions, and
std.Build.TestOptions.
* remove `std.Build.constructCMacro`. There is no use for this API.
* deprecate `std.Build.Step.Compile.defineCMacro`. Instead,
`std.Build.Module.addCMacro` is provided.
- remove `std.Build.Step.Compile.defineCMacroRaw`.
* deprecate `std.Build.Step.Compile.linkFrameworkNeeded`
- use `std.Build.Module.linkFramework`
* deprecate `std.Build.Step.Compile.linkFrameworkWeak`
- use `std.Build.Module.linkFramework`
* move more logic into `std.Build.Module`
* allow `target` and `optimize` to be `null` when creating a Module.
Along with other fields, those unspecified options will be inherited
from parent `Module` when inserted into an import table.
* the `target` field of `addExecutable` is now required. pass `b.host`
to get the host target.
2023-12-02 21:51:34 -07:00
|
|
|
|
2023-05-16 20:00:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
2024-08-28 02:35:53 +01:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
2020-09-08 01:11:10 -07:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
|
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-16 12:31:42 -07:00
|
|
|
|
|
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-10 21:12:05 -07:00
|
|
|
|
2020-09-22 22:18:19 -07:00
|
|
|
|
2020-12-10 21:12:05 -07:00
|
|
|
|
2020-09-22 22:18:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-16 12:31:42 -07:00
|
|
|
|
2023-12-11 23:08:03 +01:00
|
|
|
|
2020-12-10 21:12:05 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2024-07-04 14:15:15 -07:00
|
|
|
|
2023-12-10 15:25:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-04 14:15:15 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-04 14:15:15 -07:00
|
|
|
|
|
|
|
|
|
2025-08-27 21:20:18 -07:00
|
|
|
|
2025-06-27 20:05:22 -07:00
|
|
|
|
2024-07-04 14:15:15 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2022-12-06 23:15:54 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-20 21:14:25 -08:00
|
|
|
|
2022-12-06 23:15:54 -05:00
|
|
|
|
|
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-24 16:22:45 -07:00
|
|
|
|
2021-12-09 18:55:20 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
|
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-09 22:07:28 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
2023-12-11 23:08:03 +01:00
|
|
|
|
2024-12-10 17:43:42 -08:00
|
|
|
|
2021-12-09 22:07:28 -07:00
|
|
|
|
|
|
|
|
|
2025-10-08 21:56:20 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2024-12-10 17:43:42 -08:00
|
|
|
|
|
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-10 17:43:42 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-04-07 23:57:19 -06:00
|
|
|
|
|
|
|
|
|
2020-04-15 20:13:26 -06:00
|
|
|
|
2021-10-10 21:57:26 -07:00
|
|
|
|
2020-05-01 23:06:10 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
|
|
|
|
|
2020-04-15 20:13:26 -06:00
|
|
|
|
|
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
2020-04-15 20:13:26 -06:00
|
|
|
|
2024-07-10 15:08:23 -07:00
|
|
|
|
2024-10-16 12:14:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2024-07-10 15:08:23 -07:00
|
|
|
|
|
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2024-10-16 12:14:19 -07:00
|
|
|
|
|
|
|
|
|
2024-07-10 15:08:23 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-16 12:14:19 -07:00
|
|
|
|
2024-07-10 15:08:23 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-24 16:22:45 -07:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
|
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-16 12:14:19 -07:00
|
|
|
|
2024-07-10 15:08:23 -07:00
|
|
|
|
|
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
|
|
|
|
|
2025-07-16 10:38:18 +01:00
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
2024-10-16 12:14:19 -07:00
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-16 12:14:19 -07:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
|
|
|
|
|
2020-04-15 20:13:26 -06:00
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
|
|
|
|
|
2024-10-10 00:41:58 -07:00
|
|
|
|
2020-09-24 16:22:45 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-10 00:41:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-24 16:22:45 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2024-05-12 23:09:40 -04:00
|
|
|
|
2025-08-11 19:44:02 -07:00
|
|
|
|
2024-05-12 23:09:40 -04:00
|
|
|
|
|
|
|
|
|
2024-12-10 17:43:42 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-24 11:18:35 -08:00
|
|
|
|
2024-12-10 17:43:42 -08:00
|
|
|
|
|
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-09-16 12:31:42 -07:00
|
|
|
|
2020-04-07 23:57:19 -06:00
|
|
|
|
|
|
|
|
|
2020-09-24 16:22:45 -07:00
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-07 23:57:19 -06:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-10 17:43:42 -08:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2024-12-10 17:43:42 -08:00
|
|
|
|
2020-12-28 21:48:56 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2023-03-05 12:39:32 +00:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-12-10 21:12:05 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2024-07-04 14:15:15 -07:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2023-04-26 13:57:08 -07:00
|
|
|
|
2023-03-05 12:39:32 +00:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2025-12-06 17:52:57 -08:00
|
|
|
|
|
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-10 01:52:33 -04:00
|
|
|
|
2025-12-08 13:39:09 -08:00
|
|
|
|
2023-05-10 01:52:33 -04:00
|
|
|
|
|
|
|
|
|
2023-05-20 23:11:53 +01:00
|
|
|
|
2023-05-10 01:52:33 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-06 17:52:57 -08:00
|
|
|
|
2023-05-10 01:52:33 -04:00
|
|
|
|
2023-05-20 23:11:53 +01:00
|
|
|
|
2024-12-10 17:43:42 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
2023-05-10 01:52:33 -04:00
|
|
|
|
2024-12-10 20:44:00 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-13 18:05:46 +01:00
|
|
|
|
2024-12-10 20:44:00 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-08 13:39:09 -08:00
|
|
|
|
2024-12-10 20:44:00 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-04-20 18:01:44 -07:00
|
|
|
|
2024-12-10 20:44:00 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-04-20 18:01:44 -07:00
|
|
|
|
2024-12-10 17:43:42 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
|
|
|
|
|
2021-12-09 22:07:28 -07:00
|
|
|
|
2021-12-09 21:14:39 -07:00
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-10 17:43:42 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-11 00:51:41 -04:00
|
|
|
|
|
|
|
|
|
2023-05-10 01:52:33 -04:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-27 20:05:22 -07:00
|
|
|
|
|
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-10-07 22:31:06 -07:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
2025-07-11 10:03:54 -07:00
|
|
|
|
2025-10-07 22:31:06 -07:00
|
|
|
|
2025-08-27 21:20:18 -07:00
|
|
|
|
2025-06-27 20:05:22 -07:00
|
|
|
|
2026-04-20 18:01:44 -07:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
2025-06-27 20:05:22 -07:00
|
|
|
|
|
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-09 18:46:58 -07:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-10-08 21:56:20 -07:00
|
|
|
|
2023-05-11 00:51:41 -04:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
|
|
|
|
|
2025-10-08 21:56:20 -07:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-06 17:52:57 -08:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-04-20 18:01:44 -07:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
2025-12-08 14:17:52 -08:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-10-08 21:56:20 -07:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
|
|
|
|
|
2025-11-24 11:18:35 -08:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
2025-10-08 21:56:20 -07:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
2023-05-11 00:51:41 -04:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
2024-12-10 17:43:42 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-11 00:51:41 -04:00
|
|
|
|
|
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-11 00:51:41 -04:00
|
|
|
|
2020-04-30 17:04:13 -06:00
|
|
|
|
|
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
2023-05-11 00:51:41 -04:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
|
|
|
|
|
std.Build.Cache: fix several bugs
Aside from adding comments to document the logic in `Cache.Manifest.hit`
better, this commit fixes two serious bugs.
The first, spotted by Andrew, is that when upgrading from a shared to an
exclusive lock on the manifest file, we do not seek it back to the
start. This is a simple fix.
The second is more subtle, and has to do with the computation of file
digests. Broadly speaking, the goal of the main loop in `hit` is to
iterate the files listed in the manifest file, and check if they've
changed, based on stat and a file hash. While doing this, the
`bin_digest` field of `std.Build.Cache.File`, which is initially
`undefined`, is populated for all files, either straight from the
manifest (if the stat matches) or recomputed from the file on-disk. This
file digest is then used to update `man.hash.hasher`, which is building
the final hash used as, for instance, the output directory name when the
compiler emits into the cache directory. When `hit` returns a cache
miss, it is expected that `man.hash.hasher` includes the digests of all
"initial files"; that is, those which have been already added with e.g.
`addFilePath`, but not those which will later be added with
`addFilePost` (even though the manifest file has told us about some such
files). Previously, `hit` was using the `unhit` function to do this in a
few cases. However, this is incorrect, because `hit` assumes that all
files already have their `bin_digest` field populated; this function is
only valid to call *after* `hit` returns. Instead, we need to actually
compute the hashes which haven't yet been populated. Even if this logic
has been working, there was still a bug here, because we called `unhit`
when upgrading from a shared to an exclusive lock, writing the
(potentially `undefined`) file digests, but the loop itself writes the
file digests *again*! All in all, the hashing logic here was actually
incredibly broken.
I've taken the opportunity to restructure this section of the code into
what I think is a more readable format. A new function,
`hitWithCurrentLock`, uses the open manifest file to try and find a
cache hit. It returns a tagged union which, in the miss case, tells the
caller (`hit`) how many files already have their hash populated. This
avoids redundant work recomputing the same hash multiple times in
situations where the lock needs upgrading. This also eliminates the
outer loop from `hit`, which was a little confusing because it iterated
no more than twice!
The bugs fixed here could manifest in several different ways depending
on how contended file locks were satisfied. Most notably, on a cache
miss, the Zig compiler might have written the compilation output to the
incorrect directory (because it incorrectly constructed a hash using
`undefined` or repeated file digests), resulting in all future hits on
this manifest causing `error.FileNotFound`. This is #23110. I have been
able to reproduce #23110 on `master`, and have not been able to after
this commit, so I am relatively sure this commit resolves that issue.
Resolves: #23110
2025-04-24 01:17:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-10 21:12:05 -07:00
|
|
|
|
2020-09-22 22:18:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-23 03:58:32 +01:00
|
|
|
|
2025-02-02 00:03:19 -08:00
|
|
|
|
2024-03-23 03:58:32 +01:00
|
|
|
|
2020-09-22 22:18:19 -07:00
|
|
|
|
|
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
2020-09-22 22:18:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-24 11:18:35 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-09 22:07:28 -07:00
|
|
|
|
|
|
|
|
|
2025-10-08 21:56:20 -07:00
|
|
|
|
2021-12-09 22:07:28 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-24 11:18:35 -08:00
|
|
|
|
|
|
|
|
|
2021-12-09 22:07:28 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-10-08 21:56:20 -07:00
|
|
|
|
2021-12-09 22:07:28 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-08 13:39:09 -08:00
|
|
|
|
2021-12-09 22:07:28 -07:00
|
|
|
|
|
|
|
|
|
2025-11-24 11:18:35 -08:00
|
|
|
|
2026-04-20 18:01:44 -07:00
|
|
|
|
2025-11-24 11:18:35 -08:00
|
|
|
|
|
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2021-12-09 22:07:28 -07:00
|
|
|
|
|
|
|
|
|
2025-12-08 14:17:52 -08:00
|
|
|
|
2026-04-20 18:01:44 -07:00
|
|
|
|
2025-11-24 11:18:35 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-09 22:07:28 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-10-08 21:56:20 -07:00
|
|
|
|
2021-12-09 22:07:28 -07:00
|
|
|
|
|
|
|
|
|
2020-09-24 16:22:45 -07:00
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
|
|
|
|
|
2024-10-16 12:14:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-06 17:52:57 -08:00
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2024-10-16 12:14:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
2025-12-08 14:17:52 -08:00
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-30 16:42:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2025-11-24 11:18:35 -08:00
|
|
|
|
2021-10-10 21:57:26 -07:00
|
|
|
|
2025-10-08 21:56:20 -07:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
2020-04-11 16:01:17 -06:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
2020-04-14 19:33:02 -06:00
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-14 19:33:02 -06:00
|
|
|
|
2020-09-08 01:11:10 -07:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
|
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
2020-08-21 15:08:15 +02:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
|
|
|
|
|
2020-08-21 15:08:15 +02:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
|
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-04-14 19:33:02 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-10-10 21:57:26 -07:00
|
|
|
|
2020-04-14 22:17:55 -06:00
|
|
|
|
|
|
|
|
|
2020-09-24 16:22:45 -07:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
2020-04-14 19:33:02 -06:00
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-14 19:33:02 -06:00
|
|
|
|
2024-03-23 03:58:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-01 23:06:10 -06:00
|
|
|
|
2024-03-23 03:58:32 +01:00
|
|
|
|
|
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
2024-03-23 03:58:32 +01:00
|
|
|
|
|
|
|
|
|
2020-04-14 19:33:02 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-24 16:22:45 -07:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
|
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
2024-03-23 03:58:32 +01:00
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
2024-10-16 12:14:19 -07:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
|
|
|
|
|
configure/make phase process separation sketch
`zig build` CLI kicks off async task to compile optimized make runner
executable, does fetch, compiles configure process in debug mode, then
checks cache for the CLI options that affect configuration only. On hit,
skips building/running the configure script. On miss, runs it, saves
result in cache.
The cached artifact is a "configuration" file - a serialized build step
graph, which also includes unlazy package dependencies and additional
file system dependencies.
Next, awaits task for compiling optimized make runner executable, passes
configuration file to it. Make runner is responsible for the CLI after
that point.
For the use case of detecting when `git describe` needs to be rerun, we
can allow the configure process to manually add a file system mtime
dependencies, in this case it would be on `.git/index` and `.git/HEAD`.
This will enable two optimizations:
1. The bulk of the build system will not be rebuilt when user changes
their configure script.
2. The user logic can be completely bypassed when the CLI options
provided do not affect the configure phase - even if they affect the
make phase.
Remaining tasks in the branch:
* some stuff in `zig build` CLI is `@panic("TODO")`.
* configure runner needs to implement serialization of build graph using
std.zig.Configuration
* build runner needs to be transformed into make runner, consuming
configuration file as input and deserializing the step graph.
* introduce depending only on a file's metadata and *not* its contents
into the cache system, and add a std.Build API for using it.
2026-02-12 22:42:34 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-30 16:42:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-05-15 13:21:36 +01:00
|
|
|
|
2021-12-30 16:42:32 -07:00
|
|
|
|
|
|
|
|
|
2023-08-19 15:41:09 -07:00
|
|
|
|
2021-12-30 16:42:32 -07:00
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
2021-12-30 16:42:32 -07:00
|
|
|
|
2025-05-15 13:21:36 +01:00
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
|
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
2024-03-23 03:58:32 +01:00
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-19 13:48:32 -07:00
|
|
|
|
2021-12-30 16:42:32 -07:00
|
|
|
|
2024-10-16 12:14:19 -07:00
|
|
|
|
2021-12-30 16:42:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-24 11:18:35 -08:00
|
|
|
|
2021-12-30 16:42:32 -07:00
|
|
|
|
2025-10-08 21:56:20 -07:00
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
2021-12-30 16:42:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
2021-12-30 16:42:32 -07:00
|
|
|
|
|
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
2021-12-30 16:42:32 -07:00
|
|
|
|
|
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2020-09-15 18:02:42 -07:00
|
|
|
|
2025-08-11 19:44:02 -07:00
|
|
|
|
2024-05-12 23:09:40 -04:00
|
|
|
|
2020-09-15 18:02:42 -07:00
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2025-06-27 20:05:22 -07:00
|
|
|
|
2025-12-08 18:00:55 -08:00
|
|
|
|
|
|
|
|
|
2025-06-27 20:05:22 -07:00
|
|
|
|
2020-09-15 18:02:42 -07:00
|
|
|
|
2025-11-20 23:46:23 +01:00
|
|
|
|
2025-06-27 20:05:22 -07:00
|
|
|
|
|
|
|
|
|
2025-11-20 23:46:23 +01:00
|
|
|
|
2025-06-27 20:05:22 -07:00
|
|
|
|
2020-09-19 14:16:58 +03:00
|
|
|
|
2023-02-05 19:39:04 -07:00
|
|
|
|
2024-06-06 13:40:10 -05:00
|
|
|
|
|
|
|
|
|
2023-08-12 13:15:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-12 23:09:40 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-06 13:40:10 -05:00
|
|
|
|
2025-06-27 20:05:22 -07:00
|
|
|
|
|
|
|
|
|
2024-06-06 13:40:10 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-19 14:16:58 +03:00
|
|
|
|
2025-06-27 20:05:22 -07:00
|
|
|
|
2025-08-11 19:44:02 -07:00
|
|
|
|
2020-09-15 18:02:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-08-18 00:43:33 +02:00
|
|
|
|
|
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2020-04-07 23:57:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-10 21:12:05 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2024-08-18 00:43:33 +02:00
|
|
|
|
|
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2024-08-18 00:43:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-04 14:15:15 -07:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
|
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
|
|
|
|
|
2020-09-24 16:22:45 -07:00
|
|
|
|
2023-01-04 14:51:43 -05:00
|
|
|
|
2025-12-08 17:45:17 -08:00
|
|
|
|
2020-09-28 22:40:50 -07:00
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
|
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2025-07-01 09:06:54 -07:00
|
|
|
|
2025-12-08 17:45:17 -08:00
|
|
|
|
2025-07-01 09:06:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
|
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2025-07-01 09:06:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
|
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
2022-04-18 23:08:00 -07:00
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
2022-03-01 10:42:07 -07:00
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
2022-03-01 10:42:07 -07:00
|
|
|
|
2022-12-06 23:15:54 -05:00
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-10 17:43:42 -08:00
|
|
|
|
2023-05-11 00:51:41 -04:00
|
|
|
|
2022-12-06 23:15:54 -05:00
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
2022-04-18 23:08:00 -07:00
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
2022-03-01 10:42:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
|
|
|
|
|
2024-12-10 17:43:42 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-01 10:42:07 -07:00
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
2023-05-11 00:51:41 -04:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
|
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-09-24 16:22:45 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-09-24 16:22:45 -07:00
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
|
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
|
|
|
|
|
2020-09-24 16:22:45 -07:00
|
|
|
|
|
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-09-24 16:22:45 -07:00
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
|
|
|
|
|
2020-04-30 19:54:40 -06:00
|
|
|
|
2022-12-06 23:15:54 -05:00
|
|
|
|
|
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
2022-12-06 23:15:54 -05:00
|
|
|
|
|
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2024-07-11 16:26:04 -07:00
|
|
|
|
2025-11-20 23:46:23 +01:00
|
|
|
|
2024-08-28 02:35:53 +01:00
|
|
|
|
2024-07-11 18:28:05 -07:00
|
|
|
|
2024-07-11 16:26:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-24 19:40:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-08-28 02:35:53 +01:00
|
|
|
|
2024-07-24 19:40:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-16 12:14:19 -07:00
|
|
|
|
2024-07-24 19:40:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
|
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
|
|
|
|
|
2020-08-21 15:08:15 +02:00
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
2025-12-08 15:23:18 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-01 23:06:10 -06:00
|
|
|
|
2020-08-21 15:08:15 +02:00
|
|
|
|
2020-03-05 00:07:17 -07:00
|
|
|
|
2020-03-05 22:59:19 -07:00
|
|
|
|
2021-10-10 21:57:26 -07:00
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2023-03-03 11:04:08 +03:30
|
|
|
|
|
|
|
|
|
2025-12-08 13:39:09 -08:00
|
|
|
|
2021-10-10 21:57:26 -07:00
|
|
|
|
2021-12-09 18:55:20 -07:00
|
|
|
|
2021-10-10 21:57:26 -07:00
|
|
|
|
2023-03-03 11:04:08 +03:30
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2025-12-08 20:03:50 -08:00
|
|
|
|
2023-03-03 11:04:08 +03:30
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
2025-12-08 14:17:52 -08:00
|
|
|
|
2020-04-11 16:01:17 -06:00
|
|
|
|
|
|
|
|
|
2020-04-07 23:57:59 -06:00
|
|
|
|
2026-01-01 14:53:21 -08:00
|
|
|
|
2025-10-03 16:15:37 -07:00
|
|
|
|
2023-03-14 16:38:14 -07:00
|
|
|
|
|
|
|
|
|
2020-03-05 22:59:19 -07:00
|
|
|
|
2026-01-29 18:47:58 -08:00
|
|
|
|
2026-01-01 14:53:21 -08:00
|
|
|
|
|
|
|
|
|
2020-03-08 15:13:40 -06:00
|
|
|
|
2020-03-05 22:59:19 -07:00
|
|
|
|
|
|
|
|
|
2025-12-08 17:21:52 -08:00
|
|
|
|
2020-03-05 22:59:19 -07:00
|
|
|
|
2021-10-10 21:57:26 -07:00
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
|
|
|
|
|
2025-10-09 00:19:44 -07:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
|
|
|
|
|
2023-12-11 23:08:03 +01:00
|
|
|
|
|
|
|
|
|
2020-03-05 22:59:19 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2025-10-07 22:31:06 -07:00
|
|
|
|
|
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
2025-12-19 16:42:28 -08:00
|
|
|
|
2026-01-01 14:53:21 -08:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
2023-03-14 16:38:14 -07:00
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 22:59:19 -07:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 22:59:19 -07:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
2021-05-05 21:29:16 +03:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-05-05 21:29:16 +03:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
2023-01-04 14:51:43 -05:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
2021-05-05 21:29:16 +03:00
|
|
|
|
2020-03-05 22:59:19 -07:00
|
|
|
|
|
|
|
|
|
2020-04-11 16:01:17 -06:00
|
|
|
|
2020-04-14 21:37:35 -06:00
|
|
|
|
2026-01-01 14:53:21 -08:00
|
|
|
|
2025-10-03 16:15:37 -07:00
|
|
|
|
2023-03-14 16:38:14 -07:00
|
|
|
|
|
|
|
|
|
2020-04-14 21:37:35 -06:00
|
|
|
|
2026-01-29 18:47:58 -08:00
|
|
|
|
2026-01-01 14:53:21 -08:00
|
|
|
|
|
|
|
|
|
2020-04-14 21:37:35 -06:00
|
|
|
|
|
|
|
|
|
2020-05-01 23:06:10 -06:00
|
|
|
|
|
|
|
|
|
2020-04-14 21:37:35 -06:00
|
|
|
|
2025-12-08 17:21:52 -08:00
|
|
|
|
2020-04-14 21:37:35 -06:00
|
|
|
|
2021-10-10 21:57:26 -07:00
|
|
|
|
2025-12-18 22:03:10 -08:00
|
|
|
|
|
|
|
|
|
2025-10-09 00:19:44 -07:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
|
|
|
|
|
2023-12-11 23:08:03 +01:00
|
|
|
|
|
|
|
|
|
2020-04-14 21:37:35 -06:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2025-10-07 22:31:06 -07:00
|
|
|
|
|
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
2025-12-19 16:42:28 -08:00
|
|
|
|
2026-01-01 14:53:21 -08:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
2023-03-14 16:38:14 -07:00
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-14 21:37:35 -06:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
2020-04-14 21:37:35 -06:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
2021-05-05 21:29:16 +03:00
|
|
|
|
2020-05-01 23:06:10 -06:00
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-08 17:21:52 -08:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-05-05 21:29:16 +03:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
2024-03-21 19:53:24 -07:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-05-05 21:29:16 +03:00
|
|
|
|
2020-04-14 21:37:35 -06:00
|
|
|
|
|
|
|
|
|
2020-04-14 21:39:34 -06:00
|
|
|
|
|
|
|
|
|
2025-10-07 22:31:06 -07:00
|
|
|
|
|
|
|
|
|
2023-03-14 16:38:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-01-29 18:47:58 -08:00
|
|
|
|
2026-01-01 14:53:21 -08:00
|
|
|
|
|
|
|
|
|
2020-04-14 21:39:34 -06:00
|
|
|
|
|
|
|
|
|
2023-12-11 23:08:03 +01:00
|
|
|
|
|
|
|
|
|
2020-04-14 21:39:34 -06:00
|
|
|
|
2025-10-07 22:31:06 -07:00
|
|
|
|
|
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2025-12-19 16:42:28 -08:00
|
|
|
|
2026-01-01 14:53:21 -08:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2023-03-14 16:38:14 -07:00
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2020-04-14 21:39:34 -06:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
|
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
2020-04-14 21:39:34 -06:00
|
|
|
|
|
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
2020-04-14 21:39:34 -06:00
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
2020-04-14 21:39:34 -06:00
|
|
|
|
|
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
|
|
|
|
|
2020-04-14 21:39:34 -06:00
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
2020-04-14 21:39:34 -06:00
|
|
|
|
2021-06-27 22:33:17 -07:00
|
|
|
|
|
|
|
|
|
2023-01-04 14:51:43 -05:00
|
|
|
|
2020-04-14 21:39:34 -06:00
|
|
|
|
|
|
|
|
|
2021-05-05 21:29:16 +03:00
|
|
|
|
2020-04-14 21:39:34 -06:00
|
|
|
|
2020-04-30 17:06:03 -06:00
|
|
|
|
2020-09-24 16:22:45 -07:00
|
|
|
|
2026-01-01 14:53:21 -08:00
|
|
|
|
2025-10-03 16:15:37 -07:00
|
|
|
|
2023-03-14 16:38:14 -07:00
|
|
|
|
|
|
|
|
|
2020-04-30 17:06:03 -06:00
|
|
|
|
2026-01-29 18:47:58 -08:00
|
|
|
|
2026-01-01 14:53:21 -08:00
|
|
|
|
|
|
|
|
|
2020-04-30 19:47:04 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-30 17:06:03 -06:00
|
|
|
|
2025-12-08 17:21:52 -08:00
|
|
|
|
|
|
|
|
|
2020-04-30 17:06:03 -06:00
|
|
|
|
2021-10-10 21:57:26 -07:00
|
|
|
|
2025-12-18 22:03:10 -08:00
|
|
|
|
|
|
|
|
|
2025-10-09 00:19:44 -07:00
|
|
|
|
2020-05-25 19:29:03 -04:00
|
|
|
|
|
|
|
|
|
2023-12-11 23:08:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-30 17:06:03 -06:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2025-10-07 22:31:06 -07:00
|
|
|
|
|
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
2025-12-19 16:42:28 -08:00
|
|
|
|
2026-01-01 14:53:21 -08:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
2023-03-14 16:38:14 -07:00
|
|
|
|
2025-12-03 20:37:43 -08:00
|
|
|
|
2020-09-13 18:04:17 -07:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-30 17:06:03 -06:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
2020-04-30 17:06:03 -06:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
2021-05-05 21:29:16 +03:00
|
|
|
|
2020-04-30 19:47:04 -06:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-05-05 21:29:16 +03:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
2023-01-04 14:51:43 -05:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
2021-05-05 21:29:16 +03:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
2025-12-08 17:21:52 -08:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
2021-10-10 21:57:26 -07:00
|
|
|
|
2025-12-18 22:03:10 -08:00
|
|
|
|
|
|
|
|
|
2025-10-09 00:19:44 -07:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-05-05 21:29:16 +03:00
|
|
|
|
2020-09-16 03:02:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-05-05 21:29:16 +03:00
|
|
|
|
2020-04-30 17:06:03 -06:00
|
|
|
|
|
|
|
|
|