Skip to content

Commit addf145

Browse files
fjakobsclaude
andcommitted
Replace blake3 with builtin crypto/sha256
Removes the github.com/zeebo/blake3 external dependency and uses the standard library crypto/sha256 instead for computing file checksums in the MCP apps state management. Benefits: - Reduces binary size by ~955 KB (1.72%) - Eliminates external dependency - Uses stable standard library API Both hash implementations follow the same hash.Hash interface, making this a drop-in replacement. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 0f0935e commit addf145

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

experimental/apps-mcp/lib/providers/io/state.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io
22

33
import (
4+
"crypto/sha256"
45
"encoding/hex"
56
"encoding/json"
67
"errors"
@@ -11,7 +12,6 @@ import (
1112
"time"
1213

1314
"github.com/databricks/cli/experimental/apps-mcp/lib/fileutil"
14-
"github.com/zeebo/blake3"
1515
)
1616

1717
const StateFileName = ".edda_state"
@@ -251,7 +251,7 @@ func ComputeChecksum(workDir string) (string, error) {
251251
return "", errors.New("no files to hash - project structure appears invalid")
252252
}
253253

254-
hasher := blake3.New()
254+
hasher := sha256.New()
255255

256256
for _, filePath := range filesToHash {
257257
content, err := os.ReadFile(filePath)

go.mod

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ require (
4444
require (
4545
dagger.io/dagger v0.19.6 // Apache 2.0
4646
github.com/google/jsonschema-go v0.3.0 // BSD-3-Clause
47-
github.com/zeebo/blake3 v0.2.4 // CC0-1.0
4847
)
4948

5049
require (
@@ -71,7 +70,6 @@ require (
7170
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
7271
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
7372
github.com/inconshreveable/mousetrap v1.1.0 // indirect
74-
github.com/klauspost/cpuid/v2 v2.0.12 // indirect
7573
github.com/mattn/go-colorable v0.1.14 // indirect
7674
github.com/mitchellh/go-homedir v1.1.0 // indirect
7775
github.com/pmezard/go-difflib v1.0.0 // indirect

go.sum

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl
111111
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
112112
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
113113
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
114-
github.com/klauspost/cpuid/v2 v2.0.12 h1:p9dKCg8i4gmOxtv35DvrYoWqYzQrvEVdjQ762Y0OqZE=
115-
github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
116114
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
117115
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
118116
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
@@ -166,12 +164,6 @@ github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM
166164
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
167165
github.com/zclconf/go-cty v1.16.4 h1:QGXaag7/7dCzb+odlGrgr+YmYZFaOCMW6DEpS+UD1eE=
168166
github.com/zclconf/go-cty v1.16.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE=
169-
github.com/zeebo/assert v1.1.0 h1:hU1L1vLTHsnO8x8c9KAR5GmM5QscxHg5RNU5z5qbUWY=
170-
github.com/zeebo/assert v1.1.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
171-
github.com/zeebo/blake3 v0.2.4 h1:KYQPkhpRtcqh0ssGYcKLG1JYvddkEA8QwCM/yBqhaZI=
172-
github.com/zeebo/blake3 v0.2.4/go.mod h1:7eeQ6d2iXWRGF6npfaxl2CU+xy2Fjo2gxeyZGCRUjcE=
173-
github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo=
174-
github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4=
175167
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
176168
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
177169
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ=

0 commit comments

Comments
 (0)