From 3a4742ea09bb118c1f8f31cf626d4b2aaa45cef1 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Sat, 16 Mar 2024 15:22:02 -0600 Subject: [PATCH] WIP: disable dirhash for the moment --- cmd/fetch_repo/module.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/cmd/fetch_repo/module.go b/cmd/fetch_repo/module.go index d4e054ce7..5aa654ccd 100644 --- a/cmd/fetch_repo/module.go +++ b/cmd/fetch_repo/module.go @@ -18,7 +18,6 @@ package main import ( "fmt" "os" - "golang.org/x/mod/sumdb/dirhash" ) func fetchModule(dest, importpath, version, sum string) error { @@ -61,15 +60,15 @@ func fetchModule(dest, importpath, version, sum string) error { return fmt.Errorf("failed copying repo: %w", err) } - // Verify sum - repoSum, err := dirhash.HashDir(dest, importpath+"@"+version, dirhash.Hash1) - if err != nil { - return fmt.Errorf("failed computing sum: %w", err) - } + // // Verify sum + // repoSum, err := dirhash.HashDir(dest, importpath+"@"+version, dirhash.Hash1) + // if err != nil { + // return fmt.Errorf("failed computing sum: %w", err) + // } - if repoSum != sum { - return fmt.Errorf("resulting module with sum %s; expected sum %s", repoSum, sum) - } + // if repoSum != sum { + // return fmt.Errorf("resulting module with sum %s; expected sum %s", repoSum, sum) + // } return nil }