Browse Source

go.mod: rename google.golang.org/proto as github.com/golang/protobuf/v2

This change was created by running:
	git ls-files | xargs sed -i "s|google.golang.org/proto|github.com/golang/protobuf/v2|g"

This change is *not* an endorsement of "github.com/golang/protobuf/v2" as the
final import path when the v2 API is eventually released as stable.
We continue to reserve the right to make breaking changes as we see fit.

This change enables us to host the v2 API on a repository that is go-gettable
(since go.googlesource.com is not a known host by the "go get" tool;
and google.golang.org/proto was just a stub URL that is not currently served).
Thus, we can start work on a forked version of the v1 API that explores
what it would take to implement v1 in terms of v2 in a backwards compatible way.

Change-Id: Ia3ebc41ac4238af62ee140200d3158b53ac9ec48
Reviewed-on: https://go-review.googlesource.com/136736
Reviewed-by: Damien Neil <dneil@google.com>
Joe Tsai 7 years ago
parent
commit
01ab29648e
67 changed files with 99 additions and 99 deletions
  1. 2 2
      cmd/protoc-gen-go/main.go
  2. 2 2
      cmd/protoc-gen-go/oneof.go
  3. 2 2
      cmd/protoc-gen-go/options.go
  4. 1 1
      cmd/protoc-gen-go/testdata/comments/comments.proto
  5. 1 1
      cmd/protoc-gen-go/testdata/comments/deprecated.proto
  6. 1 1
      cmd/protoc-gen-go/testdata/extensions/base/base.proto
  7. 2 2
      cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go
  8. 1 1
      cmd/protoc-gen-go/testdata/extensions/ext/ext.proto
  9. 1 1
      cmd/protoc-gen-go/testdata/extensions/extra/extra.proto
  10. 1 1
      cmd/protoc-gen-go/testdata/extensions/proto3/ext3.proto
  11. 1 1
      cmd/protoc-gen-go/testdata/fieldnames/fieldnames.proto
  12. 1 1
      cmd/protoc-gen-go/testdata/import_public/a.pb.go
  13. 1 1
      cmd/protoc-gen-go/testdata/import_public/a.proto
  14. 1 1
      cmd/protoc-gen-go/testdata/import_public/b.pb.go
  15. 1 1
      cmd/protoc-gen-go/testdata/import_public/b.proto
  16. 1 1
      cmd/protoc-gen-go/testdata/import_public/sub/a.proto
  17. 1 1
      cmd/protoc-gen-go/testdata/import_public/sub/b.proto
  18. 1 1
      cmd/protoc-gen-go/testdata/proto2/enum.proto
  19. 1 1
      cmd/protoc-gen-go/testdata/proto2/fields.proto
  20. 1 1
      cmd/protoc-gen-go/testdata/proto2/nested_messages.proto
  21. 1 1
      cmd/protoc-gen-go/testdata/proto2/proto2.proto
  22. 1 1
      cmd/protoc-gen-go/testdata/proto3/enum.proto
  23. 1 1
      cmd/protoc-gen-go/testdata/proto3/fields.proto
  24. 1 1
      go.mod
  25. 2 2
      internal/cmd/generate-types/main.go
  26. 4 4
      internal/cmd/pbdump/pbdump.go
  27. 2 2
      internal/cmd/pbdump/pbdump_test.go
  28. 1 1
      internal/encoding/json/decode.go
  29. 1 1
      internal/encoding/json/encode.go
  30. 1 1
      internal/encoding/json/number.go
  31. 1 1
      internal/encoding/json/string.go
  32. 2 2
      internal/encoding/pack/pack.go
  33. 2 2
      internal/encoding/pack/pack_test.go
  34. 2 2
      internal/encoding/text/decode.go
  35. 1 1
      internal/encoding/text/encode.go
  36. 1 1
      internal/encoding/text/number.go
  37. 1 1
      internal/encoding/text/string.go
  38. 2 2
      internal/encoding/text/text_test.go
  39. 2 2
      internal/encoding/text/value.go
  40. 1 1
      internal/encoding/wire/wire.go
  41. 1 1
      internal/impl/message.go
  42. 2 2
      internal/impl/message_field.go
  43. 2 2
      internal/impl/message_test.go
  44. 1 1
      protogen/names.go
  45. 3 3
      protogen/protogen.go
  46. 2 2
      reflect/protoreflect/proto.go
  47. 1 1
      reflect/protoreflect/value.go
  48. 1 1
      reflect/protoreflect/value_pure.go
  49. 1 1
      reflect/protoreflect/value_unsafe.go
  50. 2 2
      reflect/protoregistry/registry.go
  51. 3 3
      reflect/protoregistry/registry_test.go
  52. 1 1
      reflect/prototype/descriptor.go
  53. 1 1
      reflect/prototype/go_type.go
  54. 1 1
      reflect/prototype/name_pure.go
  55. 1 1
      reflect/prototype/name_unsafe.go
  56. 1 1
      reflect/prototype/placeholder.go
  57. 2 2
      reflect/prototype/placeholder_type.go
  58. 1 1
      reflect/prototype/protofile.go
  59. 4 4
      reflect/prototype/protofile_desc.go
  60. 3 3
      reflect/prototype/protofile_list.go
  61. 2 2
      reflect/prototype/protofile_list_gen.go
  62. 2 2
      reflect/prototype/protofile_type.go
  63. 1 1
      reflect/prototype/standalone.go
  64. 2 2
      reflect/prototype/standalone_type.go
  65. 2 2
      reflect/prototype/stringer.go
  66. 1 1
      reflect/prototype/type_test.go
  67. 1 1
      reflect/prototype/validate.go

+ 2 - 2
cmd/protoc-gen-go/main.go

@@ -20,8 +20,8 @@ import (
 
 	"github.com/golang/protobuf/proto"
 	descpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
-	"google.golang.org/proto/protogen"
-	"google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/protogen"
+	"github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 // generatedCodeVersion indicates a version of the generated code.

+ 2 - 2
cmd/protoc-gen-go/oneof.go

@@ -5,8 +5,8 @@ import (
 	"strings"
 
 	"github.com/golang/protobuf/proto"
-	"google.golang.org/proto/protogen"
-	"google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/protogen"
+	"github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 // genOneofField generates the struct field for a oneof.

+ 2 - 2
cmd/protoc-gen-go/options.go

@@ -11,8 +11,8 @@ package main
 import (
 	"github.com/golang/protobuf/proto"
 	descpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
-	"google.golang.org/proto/protogen"
-	"google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/protogen"
+	"github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 // messageOptions returns the MessageOptions for a message.

+ 1 - 1
cmd/protoc-gen-go/testdata/comments/comments.proto

@@ -7,7 +7,7 @@ syntax = "proto2";
 // COMMENT: package goproto.protoc.comments;
 package goproto.protoc.comments;
 
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/comments";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/comments";
 
 // COMMENT: Message1
 message Message1 {

+ 1 - 1
cmd/protoc-gen-go/testdata/comments/deprecated.proto

@@ -7,7 +7,7 @@ syntax = "proto3";
 package goproto.protoc.comments;
 
 option deprecated = true;
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/comments";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/comments";
 
 message DeprecatedMessage {
   option deprecated = true;

+ 1 - 1
cmd/protoc-gen-go/testdata/extensions/base/base.proto

@@ -6,7 +6,7 @@ syntax = "proto2";
 
 package goproto.protoc.extension.base;
 
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/extensions/base";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/extensions/base";
 
 message BaseMessage {
   optional string field = 1;

+ 2 - 2
cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go

@@ -6,8 +6,8 @@ package ext
 import (
 	fmt "fmt"
 	proto "github.com/golang/protobuf/proto"
-	base "google.golang.org/proto/cmd/protoc-gen-go/testdata/extensions/base"
-	extra "google.golang.org/proto/cmd/protoc-gen-go/testdata/extensions/extra"
+	base "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/extensions/base"
+	extra "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/extensions/extra"
 	math "math"
 )
 

+ 1 - 1
cmd/protoc-gen-go/testdata/extensions/ext/ext.proto

@@ -9,7 +9,7 @@ import "extensions/extra/extra.proto";
 
 package goproto.protoc.extension.ext;
 
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/extensions/ext";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/extensions/ext";
 
 message Message {
   optional bytes data = 1;

+ 1 - 1
cmd/protoc-gen-go/testdata/extensions/extra/extra.proto

@@ -6,7 +6,7 @@ syntax = "proto2";
 
 package goproto.protoc.extension.extra;
 
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/extensions/extra";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/extensions/extra";
 
 message ExtraMessage {
   optional bytes data = 1;

+ 1 - 1
cmd/protoc-gen-go/testdata/extensions/proto3/ext3.proto

@@ -8,7 +8,7 @@ import "google/protobuf/descriptor.proto";
 
 package goproto.protoc.extension.proto3;
 
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/extensions/proto3";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/extensions/proto3";
 
 message Message {}
 enum Enum { ZERO = 0; }

+ 1 - 1
cmd/protoc-gen-go/testdata/fieldnames/fieldnames.proto

@@ -6,7 +6,7 @@ syntax = "proto2";
 
 package goproto.protoc.fieldnames;
 
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/fieldnames";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/fieldnames";
 
 // Assorted edge cases in field name conflict resolution.
 //

+ 1 - 1
cmd/protoc-gen-go/testdata/import_public/a.pb.go

@@ -6,7 +6,7 @@ package import_public
 import (
 	fmt "fmt"
 	proto "github.com/golang/protobuf/proto"
-	sub "google.golang.org/proto/cmd/protoc-gen-go/testdata/import_public/sub"
+	sub "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/import_public/sub"
 	math "math"
 )
 

+ 1 - 1
cmd/protoc-gen-go/testdata/import_public/a.proto

@@ -6,7 +6,7 @@ syntax = "proto3";
 
 package goproto.protoc.import_public;
 
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/import_public";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/import_public";
 
 import public "import_public/sub/a.proto"; // Different Go package.
 import public "import_public/b.proto";     // Same Go package.

+ 1 - 1
cmd/protoc-gen-go/testdata/import_public/b.pb.go

@@ -6,7 +6,7 @@ package import_public
 import (
 	fmt "fmt"
 	proto "github.com/golang/protobuf/proto"
-	sub "google.golang.org/proto/cmd/protoc-gen-go/testdata/import_public/sub"
+	sub "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/import_public/sub"
 	math "math"
 )
 

+ 1 - 1
cmd/protoc-gen-go/testdata/import_public/b.proto

@@ -6,7 +6,7 @@ syntax = "proto3";
 
 package goproto.protoc.import_public;
 
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/import_public";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/import_public";
 
 import "import_public/sub/a.proto";
 

+ 1 - 1
cmd/protoc-gen-go/testdata/import_public/sub/a.proto

@@ -6,7 +6,7 @@ syntax = "proto3";
 
 package goproto.protoc.import_public.sub;
 
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/import_public/sub";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/import_public/sub";
 
 import "import_public/sub/b.proto";
 

+ 1 - 1
cmd/protoc-gen-go/testdata/import_public/sub/b.proto

@@ -6,7 +6,7 @@ syntax = "proto3";
 
 package goproto.protoc.import_public.sub;
 
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/import_public/sub";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/import_public/sub";
 
 message M2 {
 }

+ 1 - 1
cmd/protoc-gen-go/testdata/proto2/enum.proto

@@ -6,7 +6,7 @@ syntax = "proto2";
 
 package goproto.protoc.proto2;
 
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/proto2";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/proto2";
 
 // EnumType1 comment.
 enum EnumType1 {

+ 1 - 1
cmd/protoc-gen-go/testdata/proto2/fields.proto

@@ -6,7 +6,7 @@ syntax = "proto2";
 
 package goproto.protoc.proto2;
 
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/proto2";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/proto2";
 
 message FieldTestMessage {
   optional bool     optional_bool     = 1;

+ 1 - 1
cmd/protoc-gen-go/testdata/proto2/nested_messages.proto

@@ -6,7 +6,7 @@ syntax = "proto2";
 
 package goproto.protoc.proto2;
 
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/proto2";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/proto2";
 
 message Layer1 {
   message Layer2 {

+ 1 - 1
cmd/protoc-gen-go/testdata/proto2/proto2.proto

@@ -6,7 +6,7 @@ syntax = "proto2";
 
 package goproto.protoc.proto2;
 
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/proto2";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/proto2";
 
 message Message {
   optional int32 i32 = 1;

+ 1 - 1
cmd/protoc-gen-go/testdata/proto3/enum.proto

@@ -6,7 +6,7 @@ syntax = "proto3";
 
 package goproto.protoc.proto3;
 
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/proto3";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/proto3";
 
 enum Enum {
   ZERO = 0;

+ 1 - 1
cmd/protoc-gen-go/testdata/proto3/fields.proto

@@ -6,7 +6,7 @@ syntax = "proto3";
 
 package goproto.protoc.proto3;
 
-option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/proto3";
+option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/proto3";
 
 message FieldTestMessage {
   string   optional_bool     = 1;

+ 1 - 1
go.mod

@@ -1,4 +1,4 @@
-module google.golang.org/proto
+module github.com/golang/protobuf/v2
 
 require (
 	github.com/golang/protobuf v1.2.0

+ 2 - 2
internal/cmd/generate-types/main.go

@@ -200,8 +200,8 @@ func writeSource(file, src string) {
 		"fmt",
 		"sync",
 		"",
-		"google.golang.org/proto/internal/pragma",
-		"google.golang.org/proto/reflect/protoreflect",
+		"github.com/golang/protobuf/v2/internal/pragma",
+		"github.com/golang/protobuf/v2/reflect/protoreflect",
 	} {
 		if pkg == "" {
 			imports = append(imports, "") // blank line between stdlib and proto packages

+ 4 - 4
internal/cmd/pbdump/pbdump.go

@@ -17,10 +17,10 @@ import (
 	"strconv"
 	"strings"
 
-	"google.golang.org/proto/internal/encoding/pack"
-	"google.golang.org/proto/internal/encoding/wire"
-	"google.golang.org/proto/reflect/protoreflect"
-	"google.golang.org/proto/reflect/prototype"
+	"github.com/golang/protobuf/v2/internal/encoding/pack"
+	"github.com/golang/protobuf/v2/internal/encoding/wire"
+	"github.com/golang/protobuf/v2/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/reflect/prototype"
 )
 
 func main() {

+ 2 - 2
internal/cmd/pbdump/pbdump_test.go

@@ -12,8 +12,8 @@ import (
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-cmp/cmp/cmpopts"
 
-	pref "google.golang.org/proto/reflect/protoreflect"
-	ptype "google.golang.org/proto/reflect/prototype"
+	pref "github.com/golang/protobuf/v2/reflect/protoreflect"
+	ptype "github.com/golang/protobuf/v2/reflect/prototype"
 )
 
 func TestFields(t *testing.T) {

+ 1 - 1
internal/encoding/json/decode.go

@@ -10,7 +10,7 @@ import (
 	"regexp"
 	"unicode/utf8"
 
-	"google.golang.org/proto/internal/errors"
+	"github.com/golang/protobuf/v2/internal/errors"
 )
 
 type syntaxError struct{ error }

+ 1 - 1
internal/encoding/json/encode.go

@@ -7,7 +7,7 @@ package json
 import (
 	"strings"
 
-	"google.golang.org/proto/internal/errors"
+	"github.com/golang/protobuf/v2/internal/errors"
 )
 
 // Marshal serializes v as the JSON format.

+ 1 - 1
internal/encoding/json/number.go

@@ -10,7 +10,7 @@ import (
 	"regexp"
 	"strconv"
 
-	"google.golang.org/proto/internal/errors"
+	"github.com/golang/protobuf/v2/internal/errors"
 )
 
 // marshalNumber encodes v as a Number.

+ 1 - 1
internal/encoding/json/string.go

@@ -12,7 +12,7 @@ import (
 	"unicode/utf16"
 	"unicode/utf8"
 
-	"google.golang.org/proto/internal/errors"
+	"github.com/golang/protobuf/v2/internal/errors"
 )
 
 func (p *encoder) marshalString(v Value) error {

+ 2 - 2
internal/encoding/pack/pack.go

@@ -21,8 +21,8 @@ import (
 	"unicode"
 	"unicode/utf8"
 
-	"google.golang.org/proto/internal/encoding/wire"
-	"google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/internal/encoding/wire"
+	"github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 // Number is the field number; aliased from the wire package for convenience.

+ 2 - 2
internal/encoding/pack/pack_test.go

@@ -11,9 +11,9 @@ import (
 	"math"
 	"testing"
 
+	pref "github.com/golang/protobuf/v2/reflect/protoreflect"
+	ptype "github.com/golang/protobuf/v2/reflect/prototype"
 	"github.com/google/go-cmp/cmp"
-	pref "google.golang.org/proto/reflect/protoreflect"
-	ptype "google.golang.org/proto/reflect/prototype"
 )
 
 var msgDesc = func() pref.MessageDescriptor {

+ 2 - 2
internal/encoding/text/decode.go

@@ -10,8 +10,8 @@ import (
 	"regexp"
 	"unicode/utf8"
 
-	"google.golang.org/proto/internal/errors"
-	"google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/internal/errors"
+	"github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 type syntaxError struct{ error }

+ 1 - 1
internal/encoding/text/encode.go

@@ -8,7 +8,7 @@ import (
 	"bytes"
 	"strings"
 
-	"google.golang.org/proto/internal/errors"
+	"github.com/golang/protobuf/v2/internal/errors"
 )
 
 // Marshal serializes v as the proto text format, where v must be a Message.

+ 1 - 1
internal/encoding/text/number.go

@@ -12,7 +12,7 @@ import (
 	"strconv"
 	"strings"
 
-	"google.golang.org/proto/internal/errors"
+	"github.com/golang/protobuf/v2/internal/errors"
 )
 
 // marshalNumber encodes v as either a Bool, Int, Uint, or Float.

+ 1 - 1
internal/encoding/text/string.go

@@ -15,7 +15,7 @@ import (
 	"unicode/utf16"
 	"unicode/utf8"
 
-	"google.golang.org/proto/internal/errors"
+	"github.com/golang/protobuf/v2/internal/errors"
 )
 
 func (p *encoder) marshalString(v Value) error {

+ 2 - 2
internal/encoding/text/text_test.go

@@ -11,10 +11,10 @@ import (
 	"testing"
 	"unicode/utf8"
 
+	"github.com/golang/protobuf/v2/internal/flags"
+	"github.com/golang/protobuf/v2/reflect/protoreflect"
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-cmp/cmp/cmpopts"
-	"google.golang.org/proto/internal/flags"
-	"google.golang.org/proto/reflect/protoreflect"
 )
 
 func Test(t *testing.T) {

+ 2 - 2
internal/encoding/text/value.go

@@ -33,8 +33,8 @@ import (
 	"math"
 	"strings"
 
-	"google.golang.org/proto/internal/flags"
-	"google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/internal/flags"
+	"github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 // Type represents a type expressible in the text format.

+ 1 - 1
internal/encoding/wire/wire.go

@@ -11,7 +11,7 @@ import (
 	"io"
 	"math/bits"
 
-	"google.golang.org/proto/internal/errors"
+	"github.com/golang/protobuf/v2/internal/errors"
 )
 
 // Number represents the field number.

+ 1 - 1
internal/impl/message.go

@@ -9,7 +9,7 @@ import (
 	"strconv"
 	"strings"
 
-	pref "google.golang.org/proto/reflect/protoreflect"
+	pref "github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 type MessageInfo struct {

+ 2 - 2
internal/impl/message_field.go

@@ -8,8 +8,8 @@ import (
 	"fmt"
 	"reflect"
 
-	"google.golang.org/proto/internal/flags"
-	pref "google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/internal/flags"
+	pref "github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 type fieldInfo struct {

+ 2 - 2
internal/impl/message_test.go

@@ -10,8 +10,8 @@ import (
 
 	"github.com/google/go-cmp/cmp"
 
-	pref "google.golang.org/proto/reflect/protoreflect"
-	ptype "google.golang.org/proto/reflect/prototype"
+	pref "github.com/golang/protobuf/v2/reflect/protoreflect"
+	ptype "github.com/golang/protobuf/v2/reflect/prototype"
 )
 
 type (

+ 1 - 1
protogen/names.go

@@ -8,7 +8,7 @@ import (
 	"unicode"
 	"unicode/utf8"
 
-	"google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 // A GoIdent is a Go identifier, consisting of a name and import path.

+ 3 - 3
protogen/protogen.go

@@ -29,10 +29,10 @@ import (
 	"github.com/golang/protobuf/proto"
 	descpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
 	pluginpb "github.com/golang/protobuf/protoc-gen-go/plugin"
+	"github.com/golang/protobuf/v2/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/reflect/protoregistry"
+	"github.com/golang/protobuf/v2/reflect/prototype"
 	"golang.org/x/tools/go/ast/astutil"
-	"google.golang.org/proto/reflect/protoreflect"
-	"google.golang.org/proto/reflect/protoregistry"
-	"google.golang.org/proto/reflect/prototype"
 )
 
 // Run executes a function as a protoc plugin.

+ 2 - 2
reflect/protoreflect/proto.go

@@ -30,8 +30,8 @@ import (
 	"regexp"
 	"strings"
 
-	"google.golang.org/proto/internal/encoding/wire"
-	"google.golang.org/proto/internal/pragma"
+	"github.com/golang/protobuf/v2/internal/encoding/wire"
+	"github.com/golang/protobuf/v2/internal/pragma"
 )
 
 type doNotImplement pragma.DoNotImplement

+ 1 - 1
reflect/protoreflect/value.go

@@ -4,7 +4,7 @@
 
 package protoreflect
 
-import "google.golang.org/proto/internal/encoding/wire"
+import "github.com/golang/protobuf/v2/internal/encoding/wire"
 
 // TODO: Document the behavior of each Range operation when a mutation
 // occurs while ranging. Also document the order.

+ 1 - 1
reflect/protoreflect/value_pure.go

@@ -6,7 +6,7 @@
 
 package protoreflect
 
-import "google.golang.org/proto/internal/pragma"
+import "github.com/golang/protobuf/v2/internal/pragma"
 
 type valueType int
 

+ 1 - 1
reflect/protoreflect/value_unsafe.go

@@ -9,7 +9,7 @@ package protoreflect
 import (
 	"unsafe"
 
-	"google.golang.org/proto/internal/pragma"
+	"github.com/golang/protobuf/v2/internal/pragma"
 )
 
 type (

+ 2 - 2
reflect/protoregistry/registry.go

@@ -10,8 +10,8 @@ import (
 	"sort"
 	"strings"
 
-	"google.golang.org/proto/internal/errors"
-	"google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/internal/errors"
+	"github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 // TODO: Perhaps Register should record the frame of where the function was

+ 3 - 3
reflect/protoregistry/registry_test.go

@@ -12,9 +12,9 @@ import (
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-cmp/cmp/cmpopts"
 
-	pref "google.golang.org/proto/reflect/protoreflect"
-	preg "google.golang.org/proto/reflect/protoregistry"
-	ptype "google.golang.org/proto/reflect/prototype"
+	pref "github.com/golang/protobuf/v2/reflect/protoreflect"
+	preg "github.com/golang/protobuf/v2/reflect/protoregistry"
+	ptype "github.com/golang/protobuf/v2/reflect/prototype"
 )
 
 func TestFiles(t *testing.T) {

+ 1 - 1
reflect/prototype/descriptor.go

@@ -5,7 +5,7 @@
 package prototype
 
 import (
-	pref "google.golang.org/proto/reflect/protoreflect"
+	pref "github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 // TODO: This cannot be implemented without proto.Unmarshal.

+ 1 - 1
reflect/prototype/go_type.go

@@ -9,7 +9,7 @@ import (
 	"reflect"
 	"sync"
 
-	"google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 // GoEnum is a constructor for a protoreflect.EnumType.

+ 1 - 1
reflect/prototype/name_pure.go

@@ -6,7 +6,7 @@
 
 package prototype
 
-import pref "google.golang.org/proto/reflect/protoreflect"
+import pref "github.com/golang/protobuf/v2/reflect/protoreflect"
 
 func getNameBuilder() *nameBuilder { return nil }
 func putNameBuilder(*nameBuilder)  {}

+ 1 - 1
reflect/prototype/name_unsafe.go

@@ -11,7 +11,7 @@ import (
 	"sync"
 	"unsafe"
 
-	pref "google.golang.org/proto/reflect/protoreflect"
+	pref "github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 var nameBuilderPool = sync.Pool{

+ 1 - 1
reflect/prototype/placeholder.go

@@ -4,7 +4,7 @@
 
 package prototype
 
-import "google.golang.org/proto/reflect/protoreflect"
+import "github.com/golang/protobuf/v2/reflect/protoreflect"
 
 // PlaceholderFile returns a placeholder protoreflect.FileType where
 // only the Path and Package accessors are valid.

+ 2 - 2
reflect/prototype/placeholder_type.go

@@ -7,8 +7,8 @@ package prototype
 import (
 	"fmt"
 
-	"google.golang.org/proto/internal/pragma"
-	pref "google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/internal/pragma"
+	pref "github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 var (

+ 1 - 1
reflect/prototype/protofile.go

@@ -14,7 +14,7 @@
 package prototype
 
 import (
-	"google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 // Every struct has a "meta" struct embedded within it as a pointer.

+ 4 - 4
reflect/prototype/protofile_desc.go

@@ -12,10 +12,10 @@ import (
 
 	descriptorV1 "github.com/golang/protobuf/protoc-gen-go/descriptor"
 
-	"google.golang.org/proto/internal/encoding/text"
-	"google.golang.org/proto/internal/errors"
-	"google.golang.org/proto/reflect/protoreflect"
-	"google.golang.org/proto/reflect/protoregistry"
+	"github.com/golang/protobuf/v2/internal/encoding/text"
+	"github.com/golang/protobuf/v2/internal/errors"
+	"github.com/golang/protobuf/v2/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/reflect/protoregistry"
 )
 
 // TODO: Should we be responsible for validating other parts of the descriptor

+ 3 - 3
reflect/prototype/protofile_list.go

@@ -8,9 +8,9 @@ import (
 	"fmt"
 	"sync"
 
-	"google.golang.org/proto/internal/pragma"
-	"google.golang.org/proto/internal/set"
-	pref "google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/internal/pragma"
+	"github.com/golang/protobuf/v2/internal/set"
+	pref "github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 type numbersMeta struct {

+ 2 - 2
reflect/prototype/protofile_list_gen.go

@@ -10,8 +10,8 @@ import (
 	"fmt"
 	"sync"
 
-	"google.golang.org/proto/internal/pragma"
-	"google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/internal/pragma"
+	"github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 type messagesMeta struct {

+ 2 - 2
reflect/prototype/protofile_type.go

@@ -10,8 +10,8 @@ import (
 	"strings"
 	"sync"
 
-	"google.golang.org/proto/internal/pragma"
-	pref "google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/internal/pragma"
+	pref "github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 // inheritedMeta is information inherited from the parent.

+ 1 - 1
reflect/prototype/standalone.go

@@ -5,7 +5,7 @@
 package prototype
 
 import (
-	"google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 // TODO: Should the constructors take in a value rather than a pointer?

+ 2 - 2
reflect/prototype/standalone_type.go

@@ -7,8 +7,8 @@ package prototype
 import (
 	"fmt"
 
-	"google.golang.org/proto/internal/pragma"
-	pref "google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/internal/pragma"
+	pref "github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 type standaloneMessage struct{ m *StandaloneMessage }

+ 2 - 2
reflect/prototype/stringer.go

@@ -12,8 +12,8 @@ import (
 	"strconv"
 	"strings"
 
-	"google.golang.org/proto/internal/pragma"
-	pref "google.golang.org/proto/reflect/protoreflect"
+	"github.com/golang/protobuf/v2/internal/pragma"
+	pref "github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 type list interface {

+ 1 - 1
reflect/prototype/type_test.go

@@ -15,7 +15,7 @@ import (
 	protoV1 "github.com/golang/protobuf/proto"
 	descriptorV1 "github.com/golang/protobuf/protoc-gen-go/descriptor"
 
-	pref "google.golang.org/proto/reflect/protoreflect"
+	pref "github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 // TestDescriptors tests that the implementations do not declare additional

+ 1 - 1
reflect/prototype/validate.go

@@ -5,7 +5,7 @@
 package prototype
 
 import (
-	pref "google.golang.org/proto/reflect/protoreflect"
+	pref "github.com/golang/protobuf/v2/reflect/protoreflect"
 )
 
 // TODO: This is important to prevent users from creating invalid types,