From cdae55e1d53874a0290948a57f9c7df394d7f99f Mon Sep 17 00:00:00 2001 From: QiuSW <105186638@qq.com> Date: Mon, 5 Oct 2026 16:00:53 +0800 Subject: [PATCH] build(windows): pin renameio v0.1.0 for hnsw on Windows github.com/TFMV/hnsw uses renameio.TempFile, which renameio v1 does not provide on Windows, so the pristine tree fails to build there with "undefined: renameio.TempFile". Pin v0.1.0 via a replace directive. OPC local patch (opc/main only); not intended for upstream as-is. Co-Authored-By: Claude Opus 5.5 --- go.mod | 5 +++++ go.sum | 1 + 2 files changed, 6 insertions(+) diff --git a/go.mod b/go.mod index 949464a..e0c69d7 100644 --- a/go.mod +++ b/go.mod @@ -142,3 +142,8 @@ require ( sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect sigs.k8s.io/yaml v1.6.0 // indirect ) + +// OPC local patch: github.com/TFMV/hnsw calls renameio.TempFile, which +// renameio v1 does not provide on Windows. Pin v0.1.0 so the binary builds +// on Windows. Drop this once upstream hnsw/renameio no longer needs it. +replace github.com/google/renameio => github.com/google/renameio v0.1.0 diff --git a/go.sum b/go.sum index d686727..3c8a2da 100644 --- a/go.sum +++ b/go.sum @@ -232,6 +232,7 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= +github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/renameio v1.0.1 h1:Lh/jXZmvZxb0BBeSY5VKEfidcbcbenKjZFzM/q0fSeU= github.com/google/renameio v1.0.1/go.mod h1:t/HQoYBZSsWSNK35C6CO/TpPLDVWvxOHboWUAweKUpk=