| ... | ... | @@ -861,12 +861,15 @@ pub fn computedPackageHash(f: *const Fetch) Package.Hash { |
| 861 | 861 | const version: []const u8 = std.mem.print(&version_buffer, "{f}", .{man.version}) catch &version_buffer; |
| 862 | 862 | return .init(f.computed_hash.digest, man.name, version, man.id, saturated_size); |
| 863 | 863 | } |
| 864 | // Previous version of Zig did not use f.name to affect the package hash, so |
| 865 | // allow the user to opt in by only doing that if they specify a version. |
| 864 | 866 | var version_buffer: [Manifest.max_version_len]u8 = undefined; |
| 865 | | const v: []const u8 = if (f.parent_specified_version_tok != .none) |
| 866 | | std.mem.print(&version_buffer, "{f}", .{f.parent_specified_version}) catch unreachable |
| 867 | | else |
| 868 | | "V"; |
| 869 | | return .init(f.computed_hash.digest, f.name, v, 0xffff, saturated_size); |
| 867 | if (f.parent_specified_version_tok != .none) { |
| 868 | const v = std.mem.print(&version_buffer, "{f}", .{f.parent_specified_version}) catch unreachable; |
| 869 | return .init(f.computed_hash.digest, f.name, v, 0xffff, saturated_size); |
| 870 | } else { |
| 871 | return .init(f.computed_hash.digest, "N", "V", 0xffff, saturated_size); |
| 872 | } |
| 870 | 873 | } |
| 871 | 874 | |
| 872 | 875 | /// `computeHash` gets a free check for the existence of `build.zig`, but when |