pbutil: publish major version 2 of this module.
This commit provides a touch-up of v1.0.3. Since it introduces a new
major version, several steps to upgrade will need to be followed as
described in the CHANGELOG.md file. Users of major version 1 can continue
using that version until they are ready to transition.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e05ec61..6d795ef 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,47 @@
# Changelog
+## v2.0.0
+
+**Summary**: Modernization of this package to Go standards in 2022, mostly
+through internal cleanups.
+
+**New Features**: None
+
+The last time this package was significantly modified was 2016, which predates
+`cmp`, subtests, the modern Protocol Buffer implementation, and numerous Go
+practices that emerged in the intervening years. The new release is tested
+against Go 1.19, though I expect it would work with Go 1.13 just fine.
+
+Finally, I declared bankruptcy on the vendored test fixtures and opted for
+creating my own. This is due to the underlying implementation of the generated
+code in conjunction with working with a moving target that is an external data
+model representation.
+
+**Upgrade Notes**: This is the aborted v1.0.3 release repackaged as a new
+major version 2. To use this, you will need to do or check the following:
+
+1. The Protocol Buffer messages you provide to this API are from the
+ `google.golang.org/protobuf` module. Take special care to audit any
+ generated or checked-in Protocol Buffer message file assets. They may need
+ to be regenerated.
+
+2. Your code should presumably use the `google.golang.org/protobuf` module for
+ Protocol Buffers.
+
+3. This is a new major version of the module, so you will need to transition
+ from module `github.com/matttproud/golang_protobuf_extensions` to
+ `github.com/matttproud/golang_protobuf_extensions/v2`.
+
+## v1.0.4
+
+**Summary**: This is an emergency re-tag of v1.0.2 since v1.0.3 broke API
+compatibility for legacy users. See the description of v1.0.2 for details.
+
## v1.0.3
+**DO NOT USE**: Use v1.0.4 instead. What is described in v1.0.3 will be
+transitioned to a new major version.
+
**Summary**: Modernization of this package to Go standards in 2022, mostly
through internal cleanups.
@@ -23,4 +63,4 @@
**New Features**: None
-End-users wanted a tagged release that includes Go module support.
\ No newline at end of file
+End-users wanted a tagged release that includes Go module support.
diff --git a/go.mod b/go.mod
index c971d86..c6a5186 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/matttproud/golang_protobuf_extensions
+module github.com/matttproud/golang_protobuf_extensions/v2
go 1.19
diff --git a/pbutil/all_test.go b/pbutil/all_test.go
index 8d5f23d..d08aafd 100644
--- a/pbutil/all_test.go
+++ b/pbutil/all_test.go
@@ -23,7 +23,7 @@
"google.golang.org/protobuf/testing/protocmp"
"github.com/google/go-cmp/cmp"
- "github.com/matttproud/golang_protobuf_extensions/testdata"
+ "github.com/matttproud/golang_protobuf_extensions/v2/testdata"
)
func TestWriteDelimited(t *testing.T) {
diff --git a/pbutil/decode_test.go b/pbutil/decode_test.go
index 79c9bbb..fa2972d 100644
--- a/pbutil/decode_test.go
+++ b/pbutil/decode_test.go
@@ -22,7 +22,7 @@
"testing/iotest"
"github.com/google/go-cmp/cmp"
- "github.com/matttproud/golang_protobuf_extensions/testdata"
+ "github.com/matttproud/golang_protobuf_extensions/v2/testdata"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/testing/protocmp"
)
diff --git a/pbutil/encode_test.go b/pbutil/encode_test.go
index 2cc70a1..92bda66 100644
--- a/pbutil/encode_test.go
+++ b/pbutil/encode_test.go
@@ -20,7 +20,7 @@
"testing"
"github.com/google/go-cmp/cmp"
- "github.com/matttproud/golang_protobuf_extensions/testdata"
+ "github.com/matttproud/golang_protobuf_extensions/v2/testdata"
"google.golang.org/protobuf/proto"
)
diff --git a/testdata/test.proto b/testdata/test.proto
index d9d1f8c..93fbe69 100644
--- a/testdata/test.proto
+++ b/testdata/test.proto
@@ -16,7 +16,7 @@
package testdata;
-option go_package = "github.com/matttproud/golang_protobuf_extensions/testdata";
+option go_package = "github.com/matttproud/golang_protobuf_extensions/v2/testdata";
message Record {
optional uint64 first = 1;