From 8da0aa015973289c9c417bed2124f417ba39f0b2 Mon Sep 17 00:00:00 2001 From: Amaury <1293565+amaurym@users.noreply.github.com> Date: Tue, 21 Feb 2023 09:35:33 +0100 Subject: [PATCH] chore: Remove MergedRegistry warning (#45) --- CHANGELOG.md | 6 ++++++ proto/merge.go | 7 ------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f57c7d15..e81607e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [v1.4.6](https://github.com/cosmos/gogoproto/releases/tag/v1.4.6) - 2023-02-21 + +### Improvements + +- [#45](https://github.com/cosmos/gogoproto/pull/45) Remove the StdErr warning about file descriptor mismatches, which was deemed unclear and too invasive. + ## [v1.4.5](https://github.com/cosmos/gogoproto/releases/tag/v1.4.5) - 2023-02-20 ### Improvements diff --git a/proto/merge.go b/proto/merge.go index 095aa258..feba7bdf 100644 --- a/proto/merge.go +++ b/proto/merge.go @@ -6,7 +6,6 @@ import ( "errors" "fmt" "io" - "os" "strings" "github.com/google/go-cmp/cmp" @@ -119,12 +118,6 @@ func mergedFileDescriptors(debug bool) (*descriptorpb.FileDescriptorSet, error) if errStr.Len() > 0 { return nil, fmt.Errorf(errStr.String()) } - } else { - // In production, we just log a warning to StdErr with the number of - // linter errors. - if len(checkImportErr) > 0 || len(diffErr) > 0 { - fmt.Fprintf(os.Stderr, "Got %d file descriptor import path errors and %d file descriptor mismatches. Run `proto.DebugFileDescriptorsMismatch` to debug them.\n", len(checkImportErr), len(diffErr)) - } } slices.SortFunc(fds.File, func(x, y *descriptorpb.FileDescriptorProto) bool {