From 0129f09d615d17e46a09eeeb494ff5351d676045 Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Fri, 20 Mar 2026 10:10:16 -0400 Subject: [PATCH 1/2] Remove xslog.NopLogger usage Dropped upstream in favor of standard library. Ref: bufbuild/standard-go#4 --- go.mod | 2 +- go.sum | 4 ++-- private/buf/bufstudioagent/bufstudioagent_test.go | 2 +- private/buf/buftesting/buftesting.go | 4 ++-- .../bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go | 2 +- private/bufpkg/bufmodule/bufmoduletesting/bufmoduletesting.go | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 42708bb663..fc781a68e0 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( buf.build/go/protovalidate v1.1.3 buf.build/go/protoyaml v0.6.0 buf.build/go/spdx v0.2.0 - buf.build/go/standard v0.1.0 + buf.build/go/standard v0.1.1-0.20260320140628-2996a887cf13 connectrpc.com/connect v1.19.1 connectrpc.com/otelconnect v0.9.0 github.com/bufbuild/protocompile v0.14.2-0.20260313233150-4b57e9e2a3ff diff --git a/go.sum b/go.sum index 3bb9875e30..17d0bfdf41 100644 --- a/go.sum +++ b/go.sum @@ -24,8 +24,8 @@ buf.build/go/protoyaml v0.6.0 h1:Nzz1lvcXF8YgNZXk+voPPwdU8FjDPTUV4ndNTXN0n2w= buf.build/go/protoyaml v0.6.0/go.mod h1:RgUOsBu/GYKLDSIRgQXniXbNgFlGEZnQpRAUdLAFV2Q= buf.build/go/spdx v0.2.0 h1:IItqM0/cMxvFJJumcBuP8NrsIzMs/UYjp/6WSpq8LTw= buf.build/go/spdx v0.2.0/go.mod h1:bXdwQFem9Si3nsbNy8aJKGPoaPi5DKwdeEp5/ArZ6w8= -buf.build/go/standard v0.1.0 h1:g98T9IyvAl0vS3Pq8iVk6Cvj2ZiFvoUJRtfyGa0120U= -buf.build/go/standard v0.1.0/go.mod h1:PiqpHz/7ZFq+kqvYhc/SK3lxFIB9N/aiH2CFC2JHIQg= +buf.build/go/standard v0.1.1-0.20260320140628-2996a887cf13 h1:DKqZWklTpM7sDtEc4in34sI8mGxTA5C8QS3TOTvxjtc= +buf.build/go/standard v0.1.1-0.20260320140628-2996a887cf13/go.mod h1:PiqpHz/7ZFq+kqvYhc/SK3lxFIB9N/aiH2CFC2JHIQg= cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= connectrpc.com/connect v1.19.1 h1:R5M57z05+90EfEvCY1b7hBxDVOUl45PrtXtAV2fOC14= diff --git a/private/buf/bufstudioagent/bufstudioagent_test.go b/private/buf/bufstudioagent/bufstudioagent_test.go index bca0a9d006..3ae3aeffe0 100644 --- a/private/buf/bufstudioagent/bufstudioagent_test.go +++ b/private/buf/bufstudioagent/bufstudioagent_test.go @@ -138,7 +138,7 @@ func testPlainPostHandler(t *testing.T, upstreamServer *httptest.Server) { func testPlainPostHandlerErrors(t *testing.T, upstreamServer *httptest.Server) { agentServer := httptest.NewTLSServer( NewHandler( - xslog.NopLogger, + slog.New(slog.DiscardHandler), "https://example.buf.build", upstreamServer.TLS, map[string]struct{}{"forbidden-header": {}}, diff --git a/private/buf/buftesting/buftesting.go b/private/buf/buftesting/buftesting.go index a75e139f96..a45087b700 100644 --- a/private/buf/buftesting/buftesting.go +++ b/private/buf/buftesting/buftesting.go @@ -48,7 +48,7 @@ var ( } testStorageosProvider = storageos.NewProvider(storageos.ProviderWithSymlinks()) testArchiveReader = githubtesting.NewArchiveReader( - xslog.NopLogger, + slog.New(slog.DiscardHandler), testStorageosProvider, testHTTPClient, ) @@ -130,7 +130,7 @@ func GetProtocFilePathsErr(ctx context.Context, dirPath string, limit int) ([]st // impact on our dependency tree. moduleSet, err := bufprotoc.NewModuleSetForProtoc( ctx, - xslog.NopLogger, + slog.New(slog.DiscardHandler), testStorageosProvider, []string{dirPath}, nil, diff --git a/private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go b/private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go index 77fbf6aedd..483c56792d 100644 --- a/private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go +++ b/private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go @@ -141,7 +141,7 @@ func fuzzBuild(ctx context.Context, dirPath string) (bufimage.Image, error) { } return bufimage.BuildImage( ctx, - xslog.NopLogger, + slog.New(slog.DiscardHandler), bufmodule.ModuleSetToModuleReadBucketWithOnlyProtoFiles(moduleSet), bufimage.WithExcludeSourceCodeInfo(), ) diff --git a/private/bufpkg/bufmodule/bufmoduletesting/bufmoduletesting.go b/private/bufpkg/bufmodule/bufmoduletesting/bufmoduletesting.go index 4b41e8e87a..881f70618a 100644 --- a/private/bufpkg/bufmodule/bufmoduletesting/bufmoduletesting.go +++ b/private/bufpkg/bufmodule/bufmoduletesting/bufmoduletesting.go @@ -344,7 +344,7 @@ func newModuleSet( // may be nil commitIDToCreateTime map[uuid.UUID]time.Time, ) (bufmodule.ModuleSet, error) { - moduleSetBuilder := bufmodule.NewModuleSetBuilder(context.Background(), xslog.NopLogger, bufmodule.NopModuleDataProvider, bufmodule.NopCommitProvider) + moduleSetBuilder := bufmodule.NewModuleSetBuilder(context.Background(), slog.New(slog.DiscardHandler), bufmodule.NopModuleDataProvider, bufmodule.NopCommitProvider) for i, moduleData := range moduleDatas { if err := addModuleDataToModuleSetBuilder( moduleSetBuilder, From 7ad8f5785548ad67195ad8070d9fd8e4e41696e5 Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Fri, 20 Mar 2026 10:17:58 -0400 Subject: [PATCH 2/2] Fix imports --- private/buf/bufstudioagent/bufstudioagent_test.go | 2 +- private/buf/buftesting/buftesting.go | 2 +- private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go | 2 +- private/bufpkg/bufmodule/bufmoduletesting/bufmoduletesting.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/private/buf/bufstudioagent/bufstudioagent_test.go b/private/buf/bufstudioagent/bufstudioagent_test.go index 3ae3aeffe0..8a40d4ecf2 100644 --- a/private/buf/bufstudioagent/bufstudioagent_test.go +++ b/private/buf/bufstudioagent/bufstudioagent_test.go @@ -21,6 +21,7 @@ import ( "encoding/base64" "errors" "io" + "log/slog" "net" "net/http" "net/http/httptest" @@ -28,7 +29,6 @@ import ( "testing" "time" - "buf.build/go/standard/xlog/xslog" "connectrpc.com/connect" studiov1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/studio/v1alpha1" "github.com/bufbuild/buf/private/pkg/protoencoding" diff --git a/private/buf/buftesting/buftesting.go b/private/buf/buftesting/buftesting.go index a45087b700..cb11b05fb6 100644 --- a/private/buf/buftesting/buftesting.go +++ b/private/buf/buftesting/buftesting.go @@ -17,12 +17,12 @@ package buftesting import ( "context" "io" + "log/slog" "net/http" "path/filepath" "testing" "time" - "buf.build/go/standard/xlog/xslog" "github.com/bufbuild/buf/private/buf/bufprotoc" "github.com/bufbuild/buf/private/bufpkg/bufmodule" "github.com/bufbuild/buf/private/pkg/github/githubtesting" diff --git a/private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go b/private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go index 483c56792d..f78d507a4e 100644 --- a/private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go +++ b/private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go @@ -21,12 +21,12 @@ import ( "errors" "fmt" "io/fs" + "log/slog" "os" "path/filepath" "strings" "testing" - "buf.build/go/standard/xlog/xslog" "github.com/bufbuild/buf/private/buf/buftesting" "github.com/bufbuild/buf/private/bufpkg/bufimage" "github.com/bufbuild/buf/private/bufpkg/bufmodule" diff --git a/private/bufpkg/bufmodule/bufmoduletesting/bufmoduletesting.go b/private/bufpkg/bufmodule/bufmoduletesting/bufmoduletesting.go index 881f70618a..b64655a139 100644 --- a/private/bufpkg/bufmodule/bufmoduletesting/bufmoduletesting.go +++ b/private/bufpkg/bufmodule/bufmoduletesting/bufmoduletesting.go @@ -19,9 +19,9 @@ import ( "errors" "fmt" "io/fs" + "log/slog" "time" - "buf.build/go/standard/xlog/xslog" "buf.build/go/standard/xslices" "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/bufpkg/bufmodule"