Skip to content

Commit 40ca057

Browse files
Copilotbaronfel
andcommitted
Fix property name: use HashLengthInBytes instead of HashSizeInBytes
Co-authored-by: baronfel <573979+baronfel@users.noreply.github.com>
1 parent ba29265 commit 40ca057

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/GenerateDepsFile.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ bool ShouldIncludeRuntimeAsset(ITaskItem item)
267267
if (File.Exists(depsFilePath))
268268
{
269269
// Hash existing file content using streaming approach
270-
Span<byte> existingHashBuffer = stackalloc byte[XxHash64.HashSizeInBytes];
270+
Span<byte> existingHashBuffer = stackalloc byte[XxHash64.HashLengthInBytes];
271271
var existingHasher = new XxHash64();
272272
using (var existingStream = File.OpenRead(depsFilePath))
273273
{
@@ -276,7 +276,7 @@ bool ShouldIncludeRuntimeAsset(ITaskItem item)
276276
existingHasher.GetCurrentHash(existingHashBuffer);
277277

278278
// Hash new content using streaming approach
279-
Span<byte> newHashBuffer = stackalloc byte[XxHash64.HashSizeInBytes];
279+
Span<byte> newHashBuffer = stackalloc byte[XxHash64.HashLengthInBytes];
280280
var newHasher = new XxHash64();
281281
contentStream.Position = 0;
282282
newHasher.Append(contentStream);

src/Tasks/Microsoft.NET.Build.Tasks/GenerateRuntimeConfigurationFiles.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ private static void WriteToJsonFile(string fileName, object value)
409409
if (File.Exists(fileName))
410410
{
411411
// Hash existing file content using streaming approach
412-
Span<byte> existingHashBuffer = stackalloc byte[XxHash64.HashSizeInBytes];
412+
Span<byte> existingHashBuffer = stackalloc byte[XxHash64.HashLengthInBytes];
413413
var existingHasher = new XxHash64();
414414
using (var existingStream = File.OpenRead(fileName))
415415
{
@@ -418,7 +418,7 @@ private static void WriteToJsonFile(string fileName, object value)
418418
existingHasher.GetCurrentHash(existingHashBuffer);
419419

420420
// Hash new content using streaming approach
421-
Span<byte> newHashBuffer = stackalloc byte[XxHash64.HashSizeInBytes];
421+
Span<byte> newHashBuffer = stackalloc byte[XxHash64.HashLengthInBytes];
422422
var newHasher = new XxHash64();
423423
contentStream.Position = 0;
424424
newHasher.Append(contentStream);

0 commit comments

Comments
 (0)