Upgrade golang-protobuf to v1.3.0 am: a647664c0f am: bd46f6d13b
am: 453a76a7f3

Change-Id: Ifcc1a007cb35fcd4095ff6d240f8ba00b8afcb77
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..cb9fc37
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,20 @@
+---
+name: Bug report
+about: Create a report to help us improve
+
+---
+
+**What version of protobuf and what language are you using?**
+Version: (e.g., `v1.1.0`, `89a0c16f`, etc)
+
+**What did you do?**
+If possible, provide a recipe for reproducing the error.
+A complete runnable program is good with `.proto` and `.go` source code.
+
+**What did you expect to see?**
+
+**What did you see instead?**
+
+Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
+
+**Anything else we should know about your project / environment?**
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..b904f1f
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,17 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is.
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md
new file mode 100644
index 0000000..bfa6dde
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/question.md
@@ -0,0 +1,7 @@
+---
+name: Question
+about: Questions and troubleshooting
+
+---
+
+
diff --git a/.travis.yml b/.travis.yml
index 78949c8..fd650b2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,14 +1,15 @@
 sudo: false
 language: go
 go:
-- 1.6.x
+- 1.9.x
 - 1.10.x
+- 1.11.x
 - 1.x
 
 install:
   - go get -v -d google.golang.org/grpc
   - go get -v -d -t github.com/golang/protobuf/...
-  - curl -L https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip -o /tmp/protoc.zip
+  - curl -L https://github.com/google/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip -o /tmp/protoc.zip
   - unzip /tmp/protoc.zip -d "$HOME"/protoc
   - mkdir -p "$HOME"/src && ln -s "$HOME"/protoc "$HOME"/src/protobuf
 
diff --git a/Android.bp b/Android.bp
index ad44526..2f68261 100644
--- a/Android.bp
+++ b/Android.bp
@@ -92,10 +92,6 @@
         "proto/text.go",
         "proto/text_parser.go",
     ],
-    testSrcs: [
-        "proto/message_set_test.go",
-        "proto/size2_test.go",
-    ],
 }
 
 bootstrap_go_package {
@@ -131,8 +127,10 @@
         // Requires golang.org/x/sync/errgroup
         //"proto/extensions_test.go",
         "proto/map_test.go",
+        "proto/message_set_test.go",
         "proto/proto3_test.go",
         "proto/size_test.go",
+        "proto/size2_test.go",
         "proto/text_parser_test.go",
         "proto/text_test.go",
     ],
diff --git a/METADATA b/METADATA
index 4302ffe..cda78be 100644
--- a/METADATA
+++ b/METADATA
@@ -8,10 +8,10 @@
     type: GIT
     value: "https://github.com/golang/protobuf"
   }
-  version: "9eb2c01ac278a5d89ce4b2be68fe4500955d8179"
+  version: "v1.3.0"
   last_upgrade_date {
-    year: 2018
-    month: 7
-    day: 6
+    year: 2019
+    month: 3
+    day: 13
   }
 }
diff --git a/Makefile b/Makefile
index 4c7901f..7a51c95 100644
--- a/Makefile
+++ b/Makefile
@@ -36,6 +36,7 @@
 
 test:
 	go test ./... ./protoc-gen-go/testdata
+	go test -tags purego ./... ./protoc-gen-go/testdata
 	go build ./protoc-gen-go/testdata/grpc/grpc.pb.go
 	make -C conformance test
 
diff --git a/README.md b/README.md
index e0e6a3b..04a52df 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
 Copyright 2010 The Go Authors.
 https://github.com/golang/protobuf
 
-This package and the code it generates requires at least Go 1.6.
+This package and the code it generates requires at least Go 1.9.
 
 This software implements Go bindings for protocol buffers.  For
 information about protocol buffers themselves, see
@@ -24,11 +24,19 @@
 	https://golang.org/doc/install
   for details or, if you are using gccgo, follow the instructions at
 	https://golang.org/doc/install/gccgo
-- Grab the code from the repository and install the proto package.
+- Grab the code from the repository and install the `proto` package.
   The simplest way is to run `go get -u github.com/golang/protobuf/protoc-gen-go`.
-  The compiler plugin, protoc-gen-go, will be installed in $GOBIN,
-  defaulting to $GOPATH/bin.  It must be in your $PATH for the protocol
-  compiler, protoc, to find it.
+  The compiler plugin, `protoc-gen-go`, will be installed in `$GOPATH/bin`
+  unless `$GOBIN` is set. It must be in your `$PATH` for the protocol
+  compiler, `protoc`, to find it.
+- If you need a particular version of `protoc-gen-go` (e.g., to match your
+  `proto` package version), one option is
+  ```shell
+  GIT_TAG="v1.2.0" # change as needed
+  go get -d -u github.com/golang/protobuf/protoc-gen-go
+  git -C "$(go env GOPATH)"/src/github.com/golang/protobuf checkout $GIT_TAG
+  go install github.com/golang/protobuf/protoc-gen-go
+  ```
 
 This software has two parts: a 'protocol compiler plugin' that
 generates Go source files that, once compiled, can access and manage
@@ -83,15 +91,19 @@
 
 - Relative to the import path:
 
-	protoc --go_out=. inputs/x.proto
-	# writes ./github.com/golang/protobuf/p/x.pb.go
+```shell
+  protoc --go_out=. inputs/x.proto
+  # writes ./github.com/golang/protobuf/p/x.pb.go
+```
 
   (This can work well with `--go_out=$GOPATH`.)
 
 - Relative to the input file:
 
-	protoc --go_out=paths=source_relative:. inputs/x.proto
-	# generate ./inputs/x.pb.go
+```shell
+protoc --go_out=paths=source_relative:. inputs/x.proto
+# generate ./inputs/x.pb.go
+```
 
 ## Generated code ##
 
@@ -157,9 +169,6 @@
 	  required string label = 1;
 	  optional int32 type = 2 [default=77];
 	  repeated int64 reps = 3;
-	  optional group OptionalGroup = 4 {
-	    required string RequiredField = 5;
-	  }
 	}
 ```
 
@@ -176,13 +185,10 @@
 	)
 
 	func main() {
-		test := &example.Test {
+		test := &example.Test{
 			Label: proto.String("hello"),
 			Type:  proto.Int32(17),
 			Reps:  []int64{1, 2, 3},
-			Optionalgroup: &example.Test_OptionalGroup {
-				RequiredField: proto.String("good bye"),
-			},
 		}
 		data, err := proto.Marshal(test)
 		if err != nil {
diff --git a/conformance/internal/conformance_proto/conformance.pb.go b/conformance/internal/conformance_proto/conformance.pb.go
index e2afb6b..1c3ced0 100644
--- a/conformance/internal/conformance_proto/conformance.pb.go
+++ b/conformance/internal/conformance_proto/conformance.pb.go
@@ -7,15 +7,17 @@
 
 package conformance
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import any "github.com/golang/protobuf/ptypes/any"
-import duration "github.com/golang/protobuf/ptypes/duration"
-import _struct "github.com/golang/protobuf/ptypes/struct"
-import timestamp "github.com/golang/protobuf/ptypes/timestamp"
-import wrappers "github.com/golang/protobuf/ptypes/wrappers"
-import field_mask "google.golang.org/genproto/protobuf/field_mask"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	any "github.com/golang/protobuf/ptypes/any"
+	duration "github.com/golang/protobuf/ptypes/duration"
+	_struct "github.com/golang/protobuf/ptypes/struct"
+	timestamp "github.com/golang/protobuf/ptypes/timestamp"
+	wrappers "github.com/golang/protobuf/ptypes/wrappers"
+	field_mask "google.golang.org/genproto/protobuf/field_mask"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -26,7 +28,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type WireFormat int32
 
@@ -41,6 +43,7 @@
 	1: "PROTOBUF",
 	2: "JSON",
 }
+
 var WireFormat_value = map[string]int32{
 	"UNSPECIFIED": 0,
 	"PROTOBUF":    1,
@@ -50,8 +53,9 @@
 func (x WireFormat) String() string {
 	return proto.EnumName(WireFormat_name, int32(x))
 }
+
 func (WireFormat) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_conformance_48ac832451f5d6c3, []int{0}
+	return fileDescriptor_e7c910178d599565, []int{0}
 }
 
 type ForeignEnum int32
@@ -67,6 +71,7 @@
 	1: "FOREIGN_BAR",
 	2: "FOREIGN_BAZ",
 }
+
 var ForeignEnum_value = map[string]int32{
 	"FOREIGN_FOO": 0,
 	"FOREIGN_BAR": 1,
@@ -76,8 +81,9 @@
 func (x ForeignEnum) String() string {
 	return proto.EnumName(ForeignEnum_name, int32(x))
 }
+
 func (ForeignEnum) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_conformance_48ac832451f5d6c3, []int{1}
+	return fileDescriptor_e7c910178d599565, []int{1}
 }
 
 type TestAllTypes_NestedEnum int32
@@ -95,6 +101,7 @@
 	2:  "BAZ",
 	-1: "NEG",
 }
+
 var TestAllTypes_NestedEnum_value = map[string]int32{
 	"FOO": 0,
 	"BAR": 1,
@@ -105,8 +112,9 @@
 func (x TestAllTypes_NestedEnum) String() string {
 	return proto.EnumName(TestAllTypes_NestedEnum_name, int32(x))
 }
+
 func (TestAllTypes_NestedEnum) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_conformance_48ac832451f5d6c3, []int{2, 0}
+	return fileDescriptor_e7c910178d599565, []int{2, 0}
 }
 
 // Represents a single test case's input.  The testee should:
@@ -133,16 +141,17 @@
 func (m *ConformanceRequest) String() string { return proto.CompactTextString(m) }
 func (*ConformanceRequest) ProtoMessage()    {}
 func (*ConformanceRequest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_conformance_48ac832451f5d6c3, []int{0}
+	return fileDescriptor_e7c910178d599565, []int{0}
 }
+
 func (m *ConformanceRequest) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_ConformanceRequest.Unmarshal(m, b)
 }
 func (m *ConformanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_ConformanceRequest.Marshal(b, m, deterministic)
 }
-func (dst *ConformanceRequest) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ConformanceRequest.Merge(dst, src)
+func (m *ConformanceRequest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ConformanceRequest.Merge(m, src)
 }
 func (m *ConformanceRequest) XXX_Size() int {
 	return xxx_messageInfo_ConformanceRequest.Size(m)
@@ -160,12 +169,14 @@
 type ConformanceRequest_ProtobufPayload struct {
 	ProtobufPayload []byte `protobuf:"bytes,1,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"`
 }
+
 type ConformanceRequest_JsonPayload struct {
 	JsonPayload string `protobuf:"bytes,2,opt,name=json_payload,json=jsonPayload,proto3,oneof"`
 }
 
 func (*ConformanceRequest_ProtobufPayload) isConformanceRequest_Payload() {}
-func (*ConformanceRequest_JsonPayload) isConformanceRequest_Payload()     {}
+
+func (*ConformanceRequest_JsonPayload) isConformanceRequest_Payload() {}
 
 func (m *ConformanceRequest) GetPayload() isConformanceRequest_Payload {
 	if m != nil {
@@ -195,72 +206,14 @@
 	return WireFormat_UNSPECIFIED
 }
 
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*ConformanceRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
-	return _ConformanceRequest_OneofMarshaler, _ConformanceRequest_OneofUnmarshaler, _ConformanceRequest_OneofSizer, []interface{}{
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*ConformanceRequest) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
 		(*ConformanceRequest_ProtobufPayload)(nil),
 		(*ConformanceRequest_JsonPayload)(nil),
 	}
 }
 
-func _ConformanceRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
-	m := msg.(*ConformanceRequest)
-	// payload
-	switch x := m.Payload.(type) {
-	case *ConformanceRequest_ProtobufPayload:
-		b.EncodeVarint(1<<3 | proto.WireBytes)
-		b.EncodeRawBytes(x.ProtobufPayload)
-	case *ConformanceRequest_JsonPayload:
-		b.EncodeVarint(2<<3 | proto.WireBytes)
-		b.EncodeStringBytes(x.JsonPayload)
-	case nil:
-	default:
-		return fmt.Errorf("ConformanceRequest.Payload has unexpected type %T", x)
-	}
-	return nil
-}
-
-func _ConformanceRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
-	m := msg.(*ConformanceRequest)
-	switch tag {
-	case 1: // payload.protobuf_payload
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeRawBytes(true)
-		m.Payload = &ConformanceRequest_ProtobufPayload{x}
-		return true, err
-	case 2: // payload.json_payload
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeStringBytes()
-		m.Payload = &ConformanceRequest_JsonPayload{x}
-		return true, err
-	default:
-		return false, nil
-	}
-}
-
-func _ConformanceRequest_OneofSizer(msg proto.Message) (n int) {
-	m := msg.(*ConformanceRequest)
-	// payload
-	switch x := m.Payload.(type) {
-	case *ConformanceRequest_ProtobufPayload:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.ProtobufPayload)))
-		n += len(x.ProtobufPayload)
-	case *ConformanceRequest_JsonPayload:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.JsonPayload)))
-		n += len(x.JsonPayload)
-	case nil:
-	default:
-		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
-	}
-	return n
-}
-
 // Represents a single test case's output.
 type ConformanceResponse struct {
 	// Types that are valid to be assigned to Result:
@@ -280,16 +233,17 @@
 func (m *ConformanceResponse) String() string { return proto.CompactTextString(m) }
 func (*ConformanceResponse) ProtoMessage()    {}
 func (*ConformanceResponse) Descriptor() ([]byte, []int) {
-	return fileDescriptor_conformance_48ac832451f5d6c3, []int{1}
+	return fileDescriptor_e7c910178d599565, []int{1}
 }
+
 func (m *ConformanceResponse) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_ConformanceResponse.Unmarshal(m, b)
 }
 func (m *ConformanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_ConformanceResponse.Marshal(b, m, deterministic)
 }
-func (dst *ConformanceResponse) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ConformanceResponse.Merge(dst, src)
+func (m *ConformanceResponse) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ConformanceResponse.Merge(m, src)
 }
 func (m *ConformanceResponse) XXX_Size() int {
 	return xxx_messageInfo_ConformanceResponse.Size(m)
@@ -307,28 +261,38 @@
 type ConformanceResponse_ParseError struct {
 	ParseError string `protobuf:"bytes,1,opt,name=parse_error,json=parseError,proto3,oneof"`
 }
+
 type ConformanceResponse_SerializeError struct {
 	SerializeError string `protobuf:"bytes,6,opt,name=serialize_error,json=serializeError,proto3,oneof"`
 }
+
 type ConformanceResponse_RuntimeError struct {
 	RuntimeError string `protobuf:"bytes,2,opt,name=runtime_error,json=runtimeError,proto3,oneof"`
 }
+
 type ConformanceResponse_ProtobufPayload struct {
 	ProtobufPayload []byte `protobuf:"bytes,3,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"`
 }
+
 type ConformanceResponse_JsonPayload struct {
 	JsonPayload string `protobuf:"bytes,4,opt,name=json_payload,json=jsonPayload,proto3,oneof"`
 }
+
 type ConformanceResponse_Skipped struct {
 	Skipped string `protobuf:"bytes,5,opt,name=skipped,proto3,oneof"`
 }
 
-func (*ConformanceResponse_ParseError) isConformanceResponse_Result()      {}
-func (*ConformanceResponse_SerializeError) isConformanceResponse_Result()  {}
-func (*ConformanceResponse_RuntimeError) isConformanceResponse_Result()    {}
+func (*ConformanceResponse_ParseError) isConformanceResponse_Result() {}
+
+func (*ConformanceResponse_SerializeError) isConformanceResponse_Result() {}
+
+func (*ConformanceResponse_RuntimeError) isConformanceResponse_Result() {}
+
 func (*ConformanceResponse_ProtobufPayload) isConformanceResponse_Result() {}
-func (*ConformanceResponse_JsonPayload) isConformanceResponse_Result()     {}
-func (*ConformanceResponse_Skipped) isConformanceResponse_Result()         {}
+
+func (*ConformanceResponse_JsonPayload) isConformanceResponse_Result() {}
+
+func (*ConformanceResponse_Skipped) isConformanceResponse_Result() {}
 
 func (m *ConformanceResponse) GetResult() isConformanceResponse_Result {
 	if m != nil {
@@ -379,9 +343,9 @@
 	return ""
 }
 
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*ConformanceResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
-	return _ConformanceResponse_OneofMarshaler, _ConformanceResponse_OneofUnmarshaler, _ConformanceResponse_OneofSizer, []interface{}{
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*ConformanceResponse) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
 		(*ConformanceResponse_ParseError)(nil),
 		(*ConformanceResponse_SerializeError)(nil),
 		(*ConformanceResponse_RuntimeError)(nil),
@@ -391,120 +355,6 @@
 	}
 }
 
-func _ConformanceResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
-	m := msg.(*ConformanceResponse)
-	// result
-	switch x := m.Result.(type) {
-	case *ConformanceResponse_ParseError:
-		b.EncodeVarint(1<<3 | proto.WireBytes)
-		b.EncodeStringBytes(x.ParseError)
-	case *ConformanceResponse_SerializeError:
-		b.EncodeVarint(6<<3 | proto.WireBytes)
-		b.EncodeStringBytes(x.SerializeError)
-	case *ConformanceResponse_RuntimeError:
-		b.EncodeVarint(2<<3 | proto.WireBytes)
-		b.EncodeStringBytes(x.RuntimeError)
-	case *ConformanceResponse_ProtobufPayload:
-		b.EncodeVarint(3<<3 | proto.WireBytes)
-		b.EncodeRawBytes(x.ProtobufPayload)
-	case *ConformanceResponse_JsonPayload:
-		b.EncodeVarint(4<<3 | proto.WireBytes)
-		b.EncodeStringBytes(x.JsonPayload)
-	case *ConformanceResponse_Skipped:
-		b.EncodeVarint(5<<3 | proto.WireBytes)
-		b.EncodeStringBytes(x.Skipped)
-	case nil:
-	default:
-		return fmt.Errorf("ConformanceResponse.Result has unexpected type %T", x)
-	}
-	return nil
-}
-
-func _ConformanceResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
-	m := msg.(*ConformanceResponse)
-	switch tag {
-	case 1: // result.parse_error
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeStringBytes()
-		m.Result = &ConformanceResponse_ParseError{x}
-		return true, err
-	case 6: // result.serialize_error
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeStringBytes()
-		m.Result = &ConformanceResponse_SerializeError{x}
-		return true, err
-	case 2: // result.runtime_error
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeStringBytes()
-		m.Result = &ConformanceResponse_RuntimeError{x}
-		return true, err
-	case 3: // result.protobuf_payload
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeRawBytes(true)
-		m.Result = &ConformanceResponse_ProtobufPayload{x}
-		return true, err
-	case 4: // result.json_payload
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeStringBytes()
-		m.Result = &ConformanceResponse_JsonPayload{x}
-		return true, err
-	case 5: // result.skipped
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeStringBytes()
-		m.Result = &ConformanceResponse_Skipped{x}
-		return true, err
-	default:
-		return false, nil
-	}
-}
-
-func _ConformanceResponse_OneofSizer(msg proto.Message) (n int) {
-	m := msg.(*ConformanceResponse)
-	// result
-	switch x := m.Result.(type) {
-	case *ConformanceResponse_ParseError:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.ParseError)))
-		n += len(x.ParseError)
-	case *ConformanceResponse_SerializeError:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.SerializeError)))
-		n += len(x.SerializeError)
-	case *ConformanceResponse_RuntimeError:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.RuntimeError)))
-		n += len(x.RuntimeError)
-	case *ConformanceResponse_ProtobufPayload:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.ProtobufPayload)))
-		n += len(x.ProtobufPayload)
-	case *ConformanceResponse_JsonPayload:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.JsonPayload)))
-		n += len(x.JsonPayload)
-	case *ConformanceResponse_Skipped:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.Skipped)))
-		n += len(x.Skipped)
-	case nil:
-	default:
-		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
-	}
-	return n
-}
-
 // This proto includes every type of field in both singular and repeated
 // forms.
 type TestAllTypes struct {
@@ -632,16 +482,17 @@
 func (m *TestAllTypes) String() string { return proto.CompactTextString(m) }
 func (*TestAllTypes) ProtoMessage()    {}
 func (*TestAllTypes) Descriptor() ([]byte, []int) {
-	return fileDescriptor_conformance_48ac832451f5d6c3, []int{2}
+	return fileDescriptor_e7c910178d599565, []int{2}
 }
+
 func (m *TestAllTypes) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_TestAllTypes.Unmarshal(m, b)
 }
 func (m *TestAllTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_TestAllTypes.Marshal(b, m, deterministic)
 }
-func (dst *TestAllTypes) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_TestAllTypes.Merge(dst, src)
+func (m *TestAllTypes) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_TestAllTypes.Merge(m, src)
 }
 func (m *TestAllTypes) XXX_Size() int {
 	return xxx_messageInfo_TestAllTypes.Size(m)
@@ -652,35 +503,6 @@
 
 var xxx_messageInfo_TestAllTypes proto.InternalMessageInfo
 
-type isTestAllTypes_OneofField interface {
-	isTestAllTypes_OneofField()
-}
-
-type TestAllTypes_OneofUint32 struct {
-	OneofUint32 uint32 `protobuf:"varint,111,opt,name=oneof_uint32,json=oneofUint32,proto3,oneof"`
-}
-type TestAllTypes_OneofNestedMessage struct {
-	OneofNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,112,opt,name=oneof_nested_message,json=oneofNestedMessage,proto3,oneof"`
-}
-type TestAllTypes_OneofString struct {
-	OneofString string `protobuf:"bytes,113,opt,name=oneof_string,json=oneofString,proto3,oneof"`
-}
-type TestAllTypes_OneofBytes struct {
-	OneofBytes []byte `protobuf:"bytes,114,opt,name=oneof_bytes,json=oneofBytes,proto3,oneof"`
-}
-
-func (*TestAllTypes_OneofUint32) isTestAllTypes_OneofField()        {}
-func (*TestAllTypes_OneofNestedMessage) isTestAllTypes_OneofField() {}
-func (*TestAllTypes_OneofString) isTestAllTypes_OneofField()        {}
-func (*TestAllTypes_OneofBytes) isTestAllTypes_OneofField()         {}
-
-func (m *TestAllTypes) GetOneofField() isTestAllTypes_OneofField {
-	if m != nil {
-		return m.OneofField
-	}
-	return nil
-}
-
 func (m *TestAllTypes) GetOptionalInt32() int32 {
 	if m != nil {
 		return m.OptionalInt32
@@ -1115,6 +937,41 @@
 	return nil
 }
 
+type isTestAllTypes_OneofField interface {
+	isTestAllTypes_OneofField()
+}
+
+type TestAllTypes_OneofUint32 struct {
+	OneofUint32 uint32 `protobuf:"varint,111,opt,name=oneof_uint32,json=oneofUint32,proto3,oneof"`
+}
+
+type TestAllTypes_OneofNestedMessage struct {
+	OneofNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,112,opt,name=oneof_nested_message,json=oneofNestedMessage,proto3,oneof"`
+}
+
+type TestAllTypes_OneofString struct {
+	OneofString string `protobuf:"bytes,113,opt,name=oneof_string,json=oneofString,proto3,oneof"`
+}
+
+type TestAllTypes_OneofBytes struct {
+	OneofBytes []byte `protobuf:"bytes,114,opt,name=oneof_bytes,json=oneofBytes,proto3,oneof"`
+}
+
+func (*TestAllTypes_OneofUint32) isTestAllTypes_OneofField() {}
+
+func (*TestAllTypes_OneofNestedMessage) isTestAllTypes_OneofField() {}
+
+func (*TestAllTypes_OneofString) isTestAllTypes_OneofField() {}
+
+func (*TestAllTypes_OneofBytes) isTestAllTypes_OneofField() {}
+
+func (m *TestAllTypes) GetOneofField() isTestAllTypes_OneofField {
+	if m != nil {
+		return m.OneofField
+	}
+	return nil
+}
+
 func (m *TestAllTypes) GetOneofUint32() uint32 {
 	if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint32); ok {
 		return x.OneofUint32
@@ -1437,9 +1294,9 @@
 	return 0
 }
 
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*TestAllTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
-	return _TestAllTypes_OneofMarshaler, _TestAllTypes_OneofUnmarshaler, _TestAllTypes_OneofSizer, []interface{}{
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*TestAllTypes) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
 		(*TestAllTypes_OneofUint32)(nil),
 		(*TestAllTypes_OneofNestedMessage)(nil),
 		(*TestAllTypes_OneofString)(nil),
@@ -1447,95 +1304,6 @@
 	}
 }
 
-func _TestAllTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
-	m := msg.(*TestAllTypes)
-	// oneof_field
-	switch x := m.OneofField.(type) {
-	case *TestAllTypes_OneofUint32:
-		b.EncodeVarint(111<<3 | proto.WireVarint)
-		b.EncodeVarint(uint64(x.OneofUint32))
-	case *TestAllTypes_OneofNestedMessage:
-		b.EncodeVarint(112<<3 | proto.WireBytes)
-		if err := b.EncodeMessage(x.OneofNestedMessage); err != nil {
-			return err
-		}
-	case *TestAllTypes_OneofString:
-		b.EncodeVarint(113<<3 | proto.WireBytes)
-		b.EncodeStringBytes(x.OneofString)
-	case *TestAllTypes_OneofBytes:
-		b.EncodeVarint(114<<3 | proto.WireBytes)
-		b.EncodeRawBytes(x.OneofBytes)
-	case nil:
-	default:
-		return fmt.Errorf("TestAllTypes.OneofField has unexpected type %T", x)
-	}
-	return nil
-}
-
-func _TestAllTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
-	m := msg.(*TestAllTypes)
-	switch tag {
-	case 111: // oneof_field.oneof_uint32
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.OneofField = &TestAllTypes_OneofUint32{uint32(x)}
-		return true, err
-	case 112: // oneof_field.oneof_nested_message
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		msg := new(TestAllTypes_NestedMessage)
-		err := b.DecodeMessage(msg)
-		m.OneofField = &TestAllTypes_OneofNestedMessage{msg}
-		return true, err
-	case 113: // oneof_field.oneof_string
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeStringBytes()
-		m.OneofField = &TestAllTypes_OneofString{x}
-		return true, err
-	case 114: // oneof_field.oneof_bytes
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeRawBytes(true)
-		m.OneofField = &TestAllTypes_OneofBytes{x}
-		return true, err
-	default:
-		return false, nil
-	}
-}
-
-func _TestAllTypes_OneofSizer(msg proto.Message) (n int) {
-	m := msg.(*TestAllTypes)
-	// oneof_field
-	switch x := m.OneofField.(type) {
-	case *TestAllTypes_OneofUint32:
-		n += 2 // tag and wire
-		n += proto.SizeVarint(uint64(x.OneofUint32))
-	case *TestAllTypes_OneofNestedMessage:
-		s := proto.Size(x.OneofNestedMessage)
-		n += 2 // tag and wire
-		n += proto.SizeVarint(uint64(s))
-		n += s
-	case *TestAllTypes_OneofString:
-		n += 2 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.OneofString)))
-		n += len(x.OneofString)
-	case *TestAllTypes_OneofBytes:
-		n += 2 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.OneofBytes)))
-		n += len(x.OneofBytes)
-	case nil:
-	default:
-		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
-	}
-	return n
-}
-
 type TestAllTypes_NestedMessage struct {
 	A                    int32         `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"`
 	Corecursive          *TestAllTypes `protobuf:"bytes,2,opt,name=corecursive,proto3" json:"corecursive,omitempty"`
@@ -1548,16 +1316,17 @@
 func (m *TestAllTypes_NestedMessage) String() string { return proto.CompactTextString(m) }
 func (*TestAllTypes_NestedMessage) ProtoMessage()    {}
 func (*TestAllTypes_NestedMessage) Descriptor() ([]byte, []int) {
-	return fileDescriptor_conformance_48ac832451f5d6c3, []int{2, 0}
+	return fileDescriptor_e7c910178d599565, []int{2, 0}
 }
+
 func (m *TestAllTypes_NestedMessage) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_TestAllTypes_NestedMessage.Unmarshal(m, b)
 }
 func (m *TestAllTypes_NestedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_TestAllTypes_NestedMessage.Marshal(b, m, deterministic)
 }
-func (dst *TestAllTypes_NestedMessage) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_TestAllTypes_NestedMessage.Merge(dst, src)
+func (m *TestAllTypes_NestedMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_TestAllTypes_NestedMessage.Merge(m, src)
 }
 func (m *TestAllTypes_NestedMessage) XXX_Size() int {
 	return xxx_messageInfo_TestAllTypes_NestedMessage.Size(m)
@@ -1593,16 +1362,17 @@
 func (m *ForeignMessage) String() string { return proto.CompactTextString(m) }
 func (*ForeignMessage) ProtoMessage()    {}
 func (*ForeignMessage) Descriptor() ([]byte, []int) {
-	return fileDescriptor_conformance_48ac832451f5d6c3, []int{3}
+	return fileDescriptor_e7c910178d599565, []int{3}
 }
+
 func (m *ForeignMessage) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_ForeignMessage.Unmarshal(m, b)
 }
 func (m *ForeignMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_ForeignMessage.Marshal(b, m, deterministic)
 }
-func (dst *ForeignMessage) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ForeignMessage.Merge(dst, src)
+func (m *ForeignMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ForeignMessage.Merge(m, src)
 }
 func (m *ForeignMessage) XXX_Size() int {
 	return xxx_messageInfo_ForeignMessage.Size(m)
@@ -1621,6 +1391,9 @@
 }
 
 func init() {
+	proto.RegisterEnum("conformance.WireFormat", WireFormat_name, WireFormat_value)
+	proto.RegisterEnum("conformance.ForeignEnum", ForeignEnum_name, ForeignEnum_value)
+	proto.RegisterEnum("conformance.TestAllTypes_NestedEnum", TestAllTypes_NestedEnum_name, TestAllTypes_NestedEnum_value)
 	proto.RegisterType((*ConformanceRequest)(nil), "conformance.ConformanceRequest")
 	proto.RegisterType((*ConformanceResponse)(nil), "conformance.ConformanceResponse")
 	proto.RegisterType((*TestAllTypes)(nil), "conformance.TestAllTypes")
@@ -1645,14 +1418,11 @@
 	proto.RegisterMapType((map[uint64]uint64)(nil), "conformance.TestAllTypes.MapUint64Uint64Entry")
 	proto.RegisterType((*TestAllTypes_NestedMessage)(nil), "conformance.TestAllTypes.NestedMessage")
 	proto.RegisterType((*ForeignMessage)(nil), "conformance.ForeignMessage")
-	proto.RegisterEnum("conformance.WireFormat", WireFormat_name, WireFormat_value)
-	proto.RegisterEnum("conformance.ForeignEnum", ForeignEnum_name, ForeignEnum_value)
-	proto.RegisterEnum("conformance.TestAllTypes_NestedEnum", TestAllTypes_NestedEnum_name, TestAllTypes_NestedEnum_value)
 }
 
-func init() { proto.RegisterFile("conformance.proto", fileDescriptor_conformance_48ac832451f5d6c3) }
+func init() { proto.RegisterFile("conformance.proto", fileDescriptor_e7c910178d599565) }
 
-var fileDescriptor_conformance_48ac832451f5d6c3 = []byte{
+var fileDescriptor_e7c910178d599565 = []byte{
 	// 2600 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x5a, 0x5b, 0x73, 0x13, 0xc9,
 	0x15, 0xf6, 0x68, 0xc0, 0x36, 0x2d, 0xd9, 0x96, 0xdb, 0xb7, 0xc6, 0x50, 0xcb, 0x60, 0x96, 0x20,
diff --git a/go.mod b/go.mod
index eccf7fd..3942d6e 100644
--- a/go.mod
+++ b/go.mod
@@ -1 +1,7 @@
 module github.com/golang/protobuf
+
+require (
+	golang.org/x/net v0.0.0-20180906233101-161cd47e91fd // indirect
+	golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
+	google.golang.org/genproto v0.0.0-20180831171423-11092d34479b
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..72fb985
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,6 @@
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+google.golang.org/genproto v0.0.0-20180831171423-11092d34479b h1:lohp5blsw53GBXtLyLNaTXPXS9pJ1tiTw61ZHUoE9Qw=
+google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
diff --git a/jsonpb/jsonpb.go b/jsonpb/jsonpb.go
index a569810..ada2b78 100644
--- a/jsonpb/jsonpb.go
+++ b/jsonpb/jsonpb.go
@@ -106,6 +106,9 @@
 // way they are marshaled to JSON. Messages that implement this should
 // also implement JSONPBUnmarshaler so that the custom format can be
 // parsed.
+//
+// The JSON marshaling must follow the proto to JSON specification:
+//	https://developers.google.com/protocol-buffers/docs/proto3#json
 type JSONPBMarshaler interface {
 	MarshalJSONPB(*Marshaler) ([]byte, error)
 }
@@ -114,6 +117,9 @@
 // the way they are unmarshaled from JSON. Messages that implement this
 // should also implement JSONPBMarshaler so that the custom format can be
 // produced.
+//
+// The JSON unmarshaling must follow the JSON to proto specification:
+//	https://developers.google.com/protocol-buffers/docs/proto3#json
 type JSONPBUnmarshaler interface {
 	UnmarshalJSONPB(*Unmarshaler, []byte) error
 }
@@ -565,6 +571,7 @@
 				out.write(m.Indent)
 			}
 
+			// TODO handle map key prop properly
 			b, err := json.Marshal(k.Interface())
 			if err != nil {
 				return err
@@ -586,7 +593,11 @@
 				out.write(` `)
 			}
 
-			if err := m.marshalValue(out, prop, v.MapIndex(k), indent+m.Indent); err != nil {
+			vprop := prop
+			if prop != nil && prop.MapValProp != nil {
+				vprop = prop.MapValProp
+			}
+			if err := m.marshalValue(out, vprop, v.MapIndex(k), indent+m.Indent); err != nil {
 				return err
 			}
 		}
@@ -1010,16 +1021,22 @@
 					k = reflect.ValueOf(ks)
 				} else {
 					k = reflect.New(targetType.Key()).Elem()
-					// TODO: pass the correct Properties if needed.
-					if err := u.unmarshalValue(k, json.RawMessage(ks), nil); err != nil {
+					var kprop *proto.Properties
+					if prop != nil && prop.MapKeyProp != nil {
+						kprop = prop.MapKeyProp
+					}
+					if err := u.unmarshalValue(k, json.RawMessage(ks), kprop); err != nil {
 						return err
 					}
 				}
 
 				// Unmarshal map value.
 				v := reflect.New(targetType.Elem()).Elem()
-				// TODO: pass the correct Properties if needed.
-				if err := u.unmarshalValue(v, raw, nil); err != nil {
+				var vprop *proto.Properties
+				if prop != nil && prop.MapValProp != nil {
+					vprop = prop.MapValProp
+				}
+				if err := u.unmarshalValue(v, raw, vprop); err != nil {
 					return err
 				}
 				target.SetMapIndex(k, v)
@@ -1105,6 +1122,8 @@
 func (s mapKeys) Less(i, j int) bool {
 	if k := s[i].Kind(); k == s[j].Kind() {
 		switch k {
+		case reflect.String:
+			return s[i].String() < s[j].String()
 		case reflect.Int32, reflect.Int64:
 			return s[i].Int() < s[j].Int()
 		case reflect.Uint32, reflect.Uint64:
diff --git a/jsonpb/jsonpb_test.go b/jsonpb/jsonpb_test.go
index 1f47d3b..45a13d4 100644
--- a/jsonpb/jsonpb_test.go
+++ b/jsonpb/jsonpb_test.go
@@ -453,8 +453,7 @@
 	{"map<int64, string>", marshaler, &pb.Mappy{Buggy: map[int64]string{1234: "yup"}},
 		`{"buggy":{"1234":"yup"}}`},
 	{"map<bool, bool>", marshaler, &pb.Mappy{Booly: map[bool]bool{false: true}}, `{"booly":{"false":true}}`},
-	// TODO: This is broken.
-	//{"map<string, enum>", marshaler, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}, `{"enumy":{"XIV":"ROMAN"}`},
+	{"map<string, enum>", marshaler, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}, `{"enumy":{"XIV":"ROMAN"}}`},
 	{"map<string, enum as int>", Marshaler{EnumsAsInts: true}, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}, `{"enumy":{"XIV":2}}`},
 	{"map<int32, bool>", marshaler, &pb.Mappy{S32Booly: map[int32]bool{1: true, 3: false, 10: true, 12: false}}, `{"s32booly":{"1":true,"3":false,"10":true,"12":false}}`},
 	{"map<int64, bool>", marshaler, &pb.Mappy{S64Booly: map[int64]bool{1: true, 3: false, 10: true, 12: false}}, `{"s64booly":{"1":true,"3":false,"10":true,"12":false}}`},
@@ -573,7 +572,7 @@
 
 func TestMarshalJSONPBMarshaler(t *testing.T) {
 	rawJson := `{ "foo": "bar", "baz": [0, 1, 2, 3] }`
-	msg := dynamicMessage{rawJson: rawJson}
+	msg := dynamicMessage{RawJson: rawJson}
 	str, err := new(Marshaler).MarshalToString(&msg)
 	if err != nil {
 		t.Errorf("an unexpected error occurred when marshalling JSONPBMarshaler: %v", err)
@@ -584,7 +583,7 @@
 }
 
 func TestMarshalAnyJSONPBMarshaler(t *testing.T) {
-	msg := dynamicMessage{rawJson: `{ "foo": "bar", "baz": [0, 1, 2, 3] }`}
+	msg := dynamicMessage{RawJson: `{ "foo": "bar", "baz": [0, 1, 2, 3] }`}
 	a, err := ptypes.MarshalAny(&msg)
 	if err != nil {
 		t.Errorf("an unexpected error occurred when marshalling to Any: %v", err)
@@ -602,7 +601,7 @@
 }
 
 func TestMarshalWithCustomValidation(t *testing.T) {
-	msg := dynamicMessage{rawJson: `{ "foo": "bar", "baz": [0, 1, 2, 3] }`, dummy: &dynamicMessage{}}
+	msg := dynamicMessage{RawJson: `{ "foo": "bar", "baz": [0, 1, 2, 3] }`, Dummy: &dynamicMessage{}}
 
 	js, err := new(Marshaler).MarshalToString(&msg)
 	if err != nil {
@@ -748,8 +747,7 @@
 	{"Any with message and indent", Unmarshaler{}, anySimplePrettyJSON, anySimple},
 	{"Any with WKT", Unmarshaler{}, anyWellKnownJSON, anyWellKnown},
 	{"Any with WKT and indent", Unmarshaler{}, anyWellKnownPrettyJSON, anyWellKnown},
-	// TODO: This is broken.
-	//{"map<string, enum>", Unmarshaler{}, `{"enumy":{"XIV":"ROMAN"}`, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}},
+	{"map<string, enum>", Unmarshaler{}, `{"enumy":{"XIV":"ROMAN"}}`, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}},
 	{"map<string, enum as int>", Unmarshaler{}, `{"enumy":{"XIV":2}}`, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}},
 	{"oneof", Unmarshaler{}, `{"salary":31000}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Salary{31000}}},
 	{"oneof spec name", Unmarshaler{}, `{"Country":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Country{"Australia"}}},
@@ -854,7 +852,7 @@
 
 		err := tt.unmarshaler.Unmarshal(strings.NewReader(tt.json), p)
 		if err != nil {
-			t.Errorf("%s: %v", tt.desc, err)
+			t.Errorf("unmarshalling %s: %v", tt.desc, err)
 			continue
 		}
 
@@ -1013,8 +1011,8 @@
 	if err := Unmarshal(strings.NewReader(rawJson), &msg); err != nil {
 		t.Errorf("an unexpected error occurred when parsing into JSONPBUnmarshaler: %v", err)
 	}
-	if msg.rawJson != rawJson {
-		t.Errorf("message contents not set correctly after unmarshalling JSON: got %s, wanted %s", msg.rawJson, rawJson)
+	if msg.RawJson != rawJson {
+		t.Errorf("message contents not set correctly after unmarshalling JSON: got %s, wanted %s", msg.RawJson, rawJson)
 	}
 }
 
@@ -1038,7 +1036,7 @@
 		t.Errorf("an unexpected error occurred when parsing into JSONPBUnmarshaler: %v", err)
 	}
 
-	dm := &dynamicMessage{rawJson: `{"baz":[0,1,2,3],"foo":"bar"}`}
+	dm := &dynamicMessage{RawJson: `{"baz":[0,1,2,3],"foo":"bar"}`}
 	var want anypb.Any
 	if b, err := proto.Marshal(dm); err != nil {
 		t.Errorf("an unexpected error occurred when marshaling message: %v", err)
@@ -1099,30 +1097,30 @@
 // dynamicMessage implements protobuf.Message but is not a normal generated message type.
 // It provides implementations of JSONPBMarshaler and JSONPBUnmarshaler for JSON support.
 type dynamicMessage struct {
-	rawJson string `protobuf:"bytes,1,opt,name=rawJson"`
+	RawJson string `protobuf:"bytes,1,opt,name=rawJson"`
 
 	// an unexported nested message is present just to ensure that it
 	// won't result in a panic (see issue #509)
-	dummy *dynamicMessage `protobuf:"bytes,2,opt,name=dummy"`
+	Dummy *dynamicMessage `protobuf:"bytes,2,opt,name=dummy"`
 }
 
 func (m *dynamicMessage) Reset() {
-	m.rawJson = "{}"
+	m.RawJson = "{}"
 }
 
 func (m *dynamicMessage) String() string {
-	return m.rawJson
+	return m.RawJson
 }
 
 func (m *dynamicMessage) ProtoMessage() {
 }
 
 func (m *dynamicMessage) MarshalJSONPB(jm *Marshaler) ([]byte, error) {
-	return []byte(m.rawJson), nil
+	return []byte(m.RawJson), nil
 }
 
 func (m *dynamicMessage) UnmarshalJSONPB(jum *Unmarshaler, js []byte) error {
-	m.rawJson = string(js)
+	m.RawJson = string(js)
 	return nil
 }
 
diff --git a/jsonpb/jsonpb_test_proto/more_test_objects.pb.go b/jsonpb/jsonpb_test_proto/more_test_objects.pb.go
index 0555e44..ef8bc34 100644
--- a/jsonpb/jsonpb_test_proto/more_test_objects.pb.go
+++ b/jsonpb/jsonpb_test_proto/more_test_objects.pb.go
@@ -3,9 +3,11 @@
 
 package jsonpb
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type Numeral int32
 
@@ -31,6 +33,7 @@
 	1: "ARABIC",
 	2: "ROMAN",
 }
+
 var Numeral_value = map[string]int32{
 	"UNKNOWN": 0,
 	"ARABIC":  1,
@@ -40,8 +43,9 @@
 func (x Numeral) String() string {
 	return proto.EnumName(Numeral_name, int32(x))
 }
+
 func (Numeral) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{0}
+	return fileDescriptor_e6c135db3023e377, []int{0}
 }
 
 type Simple3 struct {
@@ -55,16 +59,17 @@
 func (m *Simple3) String() string { return proto.CompactTextString(m) }
 func (*Simple3) ProtoMessage()    {}
 func (*Simple3) Descriptor() ([]byte, []int) {
-	return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{0}
+	return fileDescriptor_e6c135db3023e377, []int{0}
 }
+
 func (m *Simple3) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Simple3.Unmarshal(m, b)
 }
 func (m *Simple3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Simple3.Marshal(b, m, deterministic)
 }
-func (dst *Simple3) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Simple3.Merge(dst, src)
+func (m *Simple3) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Simple3.Merge(m, src)
 }
 func (m *Simple3) XXX_Size() int {
 	return xxx_messageInfo_Simple3.Size(m)
@@ -93,16 +98,17 @@
 func (m *SimpleSlice3) String() string { return proto.CompactTextString(m) }
 func (*SimpleSlice3) ProtoMessage()    {}
 func (*SimpleSlice3) Descriptor() ([]byte, []int) {
-	return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{1}
+	return fileDescriptor_e6c135db3023e377, []int{1}
 }
+
 func (m *SimpleSlice3) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_SimpleSlice3.Unmarshal(m, b)
 }
 func (m *SimpleSlice3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_SimpleSlice3.Marshal(b, m, deterministic)
 }
-func (dst *SimpleSlice3) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SimpleSlice3.Merge(dst, src)
+func (m *SimpleSlice3) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SimpleSlice3.Merge(m, src)
 }
 func (m *SimpleSlice3) XXX_Size() int {
 	return xxx_messageInfo_SimpleSlice3.Size(m)
@@ -131,16 +137,17 @@
 func (m *SimpleMap3) String() string { return proto.CompactTextString(m) }
 func (*SimpleMap3) ProtoMessage()    {}
 func (*SimpleMap3) Descriptor() ([]byte, []int) {
-	return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{2}
+	return fileDescriptor_e6c135db3023e377, []int{2}
 }
+
 func (m *SimpleMap3) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_SimpleMap3.Unmarshal(m, b)
 }
 func (m *SimpleMap3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_SimpleMap3.Marshal(b, m, deterministic)
 }
-func (dst *SimpleMap3) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SimpleMap3.Merge(dst, src)
+func (m *SimpleMap3) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SimpleMap3.Merge(m, src)
 }
 func (m *SimpleMap3) XXX_Size() int {
 	return xxx_messageInfo_SimpleMap3.Size(m)
@@ -169,16 +176,17 @@
 func (m *SimpleNull3) String() string { return proto.CompactTextString(m) }
 func (*SimpleNull3) ProtoMessage()    {}
 func (*SimpleNull3) Descriptor() ([]byte, []int) {
-	return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{3}
+	return fileDescriptor_e6c135db3023e377, []int{3}
 }
+
 func (m *SimpleNull3) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_SimpleNull3.Unmarshal(m, b)
 }
 func (m *SimpleNull3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_SimpleNull3.Marshal(b, m, deterministic)
 }
-func (dst *SimpleNull3) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SimpleNull3.Merge(dst, src)
+func (m *SimpleNull3) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SimpleNull3.Merge(m, src)
 }
 func (m *SimpleNull3) XXX_Size() int {
 	return xxx_messageInfo_SimpleNull3.Size(m)
@@ -216,16 +224,17 @@
 func (m *Mappy) String() string { return proto.CompactTextString(m) }
 func (*Mappy) ProtoMessage()    {}
 func (*Mappy) Descriptor() ([]byte, []int) {
-	return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{4}
+	return fileDescriptor_e6c135db3023e377, []int{4}
 }
+
 func (m *Mappy) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Mappy.Unmarshal(m, b)
 }
 func (m *Mappy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Mappy.Marshal(b, m, deterministic)
 }
-func (dst *Mappy) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Mappy.Merge(dst, src)
+func (m *Mappy) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Mappy.Merge(m, src)
 }
 func (m *Mappy) XXX_Size() int {
 	return xxx_messageInfo_Mappy.Size(m)
@@ -307,6 +316,7 @@
 }
 
 func init() {
+	proto.RegisterEnum("jsonpb.Numeral", Numeral_name, Numeral_value)
 	proto.RegisterType((*Simple3)(nil), "jsonpb.Simple3")
 	proto.RegisterType((*SimpleSlice3)(nil), "jsonpb.SimpleSlice3")
 	proto.RegisterType((*SimpleMap3)(nil), "jsonpb.SimpleMap3")
@@ -323,14 +333,11 @@
 	proto.RegisterMapType((map[string]string)(nil), "jsonpb.Mappy.StrryEntry")
 	proto.RegisterMapType((map[uint32]bool)(nil), "jsonpb.Mappy.U32boolyEntry")
 	proto.RegisterMapType((map[uint64]bool)(nil), "jsonpb.Mappy.U64boolyEntry")
-	proto.RegisterEnum("jsonpb.Numeral", Numeral_name, Numeral_value)
 }
 
-func init() {
-	proto.RegisterFile("more_test_objects.proto", fileDescriptor_more_test_objects_bef0d79b901f4c4a)
-}
+func init() { proto.RegisterFile("more_test_objects.proto", fileDescriptor_e6c135db3023e377) }
 
-var fileDescriptor_more_test_objects_bef0d79b901f4c4a = []byte{
+var fileDescriptor_e6c135db3023e377 = []byte{
 	// 526 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xdd, 0x6b, 0xdb, 0x3c,
 	0x14, 0x87, 0x5f, 0x27, 0xf5, 0xd7, 0x49, 0xfb, 0x2e, 0x88, 0xb1, 0x99, 0xf4, 0x62, 0xc5, 0xb0,
diff --git a/jsonpb/jsonpb_test_proto/test_objects.pb.go b/jsonpb/jsonpb_test_proto/test_objects.pb.go
index 6c15fd1..9f4a97e 100644
--- a/jsonpb/jsonpb_test_proto/test_objects.pb.go
+++ b/jsonpb/jsonpb_test_proto/test_objects.pb.go
@@ -3,14 +3,16 @@
 
 package jsonpb
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import any "github.com/golang/protobuf/ptypes/any"
-import duration "github.com/golang/protobuf/ptypes/duration"
-import _struct "github.com/golang/protobuf/ptypes/struct"
-import timestamp "github.com/golang/protobuf/ptypes/timestamp"
-import wrappers "github.com/golang/protobuf/ptypes/wrappers"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	any "github.com/golang/protobuf/ptypes/any"
+	duration "github.com/golang/protobuf/ptypes/duration"
+	_struct "github.com/golang/protobuf/ptypes/struct"
+	timestamp "github.com/golang/protobuf/ptypes/timestamp"
+	wrappers "github.com/golang/protobuf/ptypes/wrappers"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -21,7 +23,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type Widget_Color int32
 
@@ -36,6 +38,7 @@
 	1: "GREEN",
 	2: "BLUE",
 }
+
 var Widget_Color_value = map[string]int32{
 	"RED":   0,
 	"GREEN": 1,
@@ -47,9 +50,11 @@
 	*p = x
 	return p
 }
+
 func (x Widget_Color) String() string {
 	return proto.EnumName(Widget_Color_name, int32(x))
 }
+
 func (x *Widget_Color) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(Widget_Color_value, data, "Widget_Color")
 	if err != nil {
@@ -58,8 +63,9 @@
 	*x = Widget_Color(value)
 	return nil
 }
+
 func (Widget_Color) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{3, 0}
+	return fileDescriptor_e97c739a0ce14cc6, []int{3, 0}
 }
 
 // Test message for holding primitive types.
@@ -92,16 +98,17 @@
 func (m *Simple) String() string { return proto.CompactTextString(m) }
 func (*Simple) ProtoMessage()    {}
 func (*Simple) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{0}
+	return fileDescriptor_e97c739a0ce14cc6, []int{0}
 }
+
 func (m *Simple) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Simple.Unmarshal(m, b)
 }
 func (m *Simple) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Simple.Marshal(b, m, deterministic)
 }
-func (dst *Simple) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Simple.Merge(dst, src)
+func (m *Simple) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Simple.Merge(m, src)
 }
 func (m *Simple) XXX_Size() int {
 	return xxx_messageInfo_Simple.Size(m)
@@ -262,16 +269,17 @@
 func (m *NonFinites) String() string { return proto.CompactTextString(m) }
 func (*NonFinites) ProtoMessage()    {}
 func (*NonFinites) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{1}
+	return fileDescriptor_e97c739a0ce14cc6, []int{1}
 }
+
 func (m *NonFinites) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_NonFinites.Unmarshal(m, b)
 }
 func (m *NonFinites) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_NonFinites.Marshal(b, m, deterministic)
 }
-func (dst *NonFinites) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_NonFinites.Merge(dst, src)
+func (m *NonFinites) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_NonFinites.Merge(m, src)
 }
 func (m *NonFinites) XXX_Size() int {
 	return xxx_messageInfo_NonFinites.Size(m)
@@ -346,16 +354,17 @@
 func (m *Repeats) String() string { return proto.CompactTextString(m) }
 func (*Repeats) ProtoMessage()    {}
 func (*Repeats) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{2}
+	return fileDescriptor_e97c739a0ce14cc6, []int{2}
 }
+
 func (m *Repeats) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Repeats.Unmarshal(m, b)
 }
 func (m *Repeats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Repeats.Marshal(b, m, deterministic)
 }
-func (dst *Repeats) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Repeats.Merge(dst, src)
+func (m *Repeats) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Repeats.Merge(m, src)
 }
 func (m *Repeats) XXX_Size() int {
 	return xxx_messageInfo_Repeats.Size(m)
@@ -460,16 +469,17 @@
 func (m *Widget) String() string { return proto.CompactTextString(m) }
 func (*Widget) ProtoMessage()    {}
 func (*Widget) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{3}
+	return fileDescriptor_e97c739a0ce14cc6, []int{3}
 }
+
 func (m *Widget) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Widget.Unmarshal(m, b)
 }
 func (m *Widget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Widget.Marshal(b, m, deterministic)
 }
-func (dst *Widget) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Widget.Merge(dst, src)
+func (m *Widget) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Widget.Merge(m, src)
 }
 func (m *Widget) XXX_Size() int {
 	return xxx_messageInfo_Widget.Size(m)
@@ -534,16 +544,17 @@
 func (m *Maps) String() string { return proto.CompactTextString(m) }
 func (*Maps) ProtoMessage()    {}
 func (*Maps) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{4}
+	return fileDescriptor_e97c739a0ce14cc6, []int{4}
 }
+
 func (m *Maps) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Maps.Unmarshal(m, b)
 }
 func (m *Maps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Maps.Marshal(b, m, deterministic)
 }
-func (dst *Maps) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Maps.Merge(dst, src)
+func (m *Maps) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Maps.Merge(m, src)
 }
 func (m *Maps) XXX_Size() int {
 	return xxx_messageInfo_Maps.Size(m)
@@ -585,16 +596,17 @@
 func (m *MsgWithOneof) String() string { return proto.CompactTextString(m) }
 func (*MsgWithOneof) ProtoMessage()    {}
 func (*MsgWithOneof) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{5}
+	return fileDescriptor_e97c739a0ce14cc6, []int{5}
 }
+
 func (m *MsgWithOneof) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MsgWithOneof.Unmarshal(m, b)
 }
 func (m *MsgWithOneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MsgWithOneof.Marshal(b, m, deterministic)
 }
-func (dst *MsgWithOneof) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MsgWithOneof.Merge(dst, src)
+func (m *MsgWithOneof) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MsgWithOneof.Merge(m, src)
 }
 func (m *MsgWithOneof) XXX_Size() int {
 	return xxx_messageInfo_MsgWithOneof.Size(m)
@@ -612,23 +624,31 @@
 type MsgWithOneof_Title struct {
 	Title string `protobuf:"bytes,1,opt,name=title,oneof"`
 }
+
 type MsgWithOneof_Salary struct {
 	Salary int64 `protobuf:"varint,2,opt,name=salary,oneof"`
 }
+
 type MsgWithOneof_Country struct {
 	Country string `protobuf:"bytes,3,opt,name=Country,oneof"`
 }
+
 type MsgWithOneof_HomeAddress struct {
 	HomeAddress string `protobuf:"bytes,4,opt,name=home_address,json=homeAddress,oneof"`
 }
+
 type MsgWithOneof_MsgWithRequired struct {
 	MsgWithRequired *MsgWithRequired `protobuf:"bytes,5,opt,name=msg_with_required,json=msgWithRequired,oneof"`
 }
 
-func (*MsgWithOneof_Title) isMsgWithOneof_Union()           {}
-func (*MsgWithOneof_Salary) isMsgWithOneof_Union()          {}
-func (*MsgWithOneof_Country) isMsgWithOneof_Union()         {}
-func (*MsgWithOneof_HomeAddress) isMsgWithOneof_Union()     {}
+func (*MsgWithOneof_Title) isMsgWithOneof_Union() {}
+
+func (*MsgWithOneof_Salary) isMsgWithOneof_Union() {}
+
+func (*MsgWithOneof_Country) isMsgWithOneof_Union() {}
+
+func (*MsgWithOneof_HomeAddress) isMsgWithOneof_Union() {}
+
 func (*MsgWithOneof_MsgWithRequired) isMsgWithOneof_Union() {}
 
 func (m *MsgWithOneof) GetUnion() isMsgWithOneof_Union {
@@ -673,9 +693,9 @@
 	return nil
 }
 
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*MsgWithOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
-	return _MsgWithOneof_OneofMarshaler, _MsgWithOneof_OneofUnmarshaler, _MsgWithOneof_OneofSizer, []interface{}{
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*MsgWithOneof) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
 		(*MsgWithOneof_Title)(nil),
 		(*MsgWithOneof_Salary)(nil),
 		(*MsgWithOneof_Country)(nil),
@@ -684,109 +704,6 @@
 	}
 }
 
-func _MsgWithOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
-	m := msg.(*MsgWithOneof)
-	// union
-	switch x := m.Union.(type) {
-	case *MsgWithOneof_Title:
-		b.EncodeVarint(1<<3 | proto.WireBytes)
-		b.EncodeStringBytes(x.Title)
-	case *MsgWithOneof_Salary:
-		b.EncodeVarint(2<<3 | proto.WireVarint)
-		b.EncodeVarint(uint64(x.Salary))
-	case *MsgWithOneof_Country:
-		b.EncodeVarint(3<<3 | proto.WireBytes)
-		b.EncodeStringBytes(x.Country)
-	case *MsgWithOneof_HomeAddress:
-		b.EncodeVarint(4<<3 | proto.WireBytes)
-		b.EncodeStringBytes(x.HomeAddress)
-	case *MsgWithOneof_MsgWithRequired:
-		b.EncodeVarint(5<<3 | proto.WireBytes)
-		if err := b.EncodeMessage(x.MsgWithRequired); err != nil {
-			return err
-		}
-	case nil:
-	default:
-		return fmt.Errorf("MsgWithOneof.Union has unexpected type %T", x)
-	}
-	return nil
-}
-
-func _MsgWithOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
-	m := msg.(*MsgWithOneof)
-	switch tag {
-	case 1: // union.title
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeStringBytes()
-		m.Union = &MsgWithOneof_Title{x}
-		return true, err
-	case 2: // union.salary
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.Union = &MsgWithOneof_Salary{int64(x)}
-		return true, err
-	case 3: // union.Country
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeStringBytes()
-		m.Union = &MsgWithOneof_Country{x}
-		return true, err
-	case 4: // union.home_address
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeStringBytes()
-		m.Union = &MsgWithOneof_HomeAddress{x}
-		return true, err
-	case 5: // union.msg_with_required
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		msg := new(MsgWithRequired)
-		err := b.DecodeMessage(msg)
-		m.Union = &MsgWithOneof_MsgWithRequired{msg}
-		return true, err
-	default:
-		return false, nil
-	}
-}
-
-func _MsgWithOneof_OneofSizer(msg proto.Message) (n int) {
-	m := msg.(*MsgWithOneof)
-	// union
-	switch x := m.Union.(type) {
-	case *MsgWithOneof_Title:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.Title)))
-		n += len(x.Title)
-	case *MsgWithOneof_Salary:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(x.Salary))
-	case *MsgWithOneof_Country:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.Country)))
-		n += len(x.Country)
-	case *MsgWithOneof_HomeAddress:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.HomeAddress)))
-		n += len(x.HomeAddress)
-	case *MsgWithOneof_MsgWithRequired:
-		s := proto.Size(x.MsgWithRequired)
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(s))
-		n += s
-	case nil:
-	default:
-		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
-	}
-	return n
-}
-
 type Real struct {
 	Value                        *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
 	XXX_NoUnkeyedLiteral         struct{} `json:"-"`
@@ -799,7 +716,7 @@
 func (m *Real) String() string { return proto.CompactTextString(m) }
 func (*Real) ProtoMessage()    {}
 func (*Real) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{6}
+	return fileDescriptor_e97c739a0ce14cc6, []int{6}
 }
 
 var extRange_Real = []proto.ExtensionRange{
@@ -809,14 +726,15 @@
 func (*Real) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_Real
 }
+
 func (m *Real) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Real.Unmarshal(m, b)
 }
 func (m *Real) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Real.Marshal(b, m, deterministic)
 }
-func (dst *Real) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Real.Merge(dst, src)
+func (m *Real) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Real.Merge(m, src)
 }
 func (m *Real) XXX_Size() int {
 	return xxx_messageInfo_Real.Size(m)
@@ -846,7 +764,7 @@
 func (m *Complex) String() string { return proto.CompactTextString(m) }
 func (*Complex) ProtoMessage()    {}
 func (*Complex) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{7}
+	return fileDescriptor_e97c739a0ce14cc6, []int{7}
 }
 
 var extRange_Complex = []proto.ExtensionRange{
@@ -856,14 +774,15 @@
 func (*Complex) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_Complex
 }
+
 func (m *Complex) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Complex.Unmarshal(m, b)
 }
 func (m *Complex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Complex.Marshal(b, m, deterministic)
 }
-func (dst *Complex) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Complex.Merge(dst, src)
+func (m *Complex) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Complex.Merge(m, src)
 }
 func (m *Complex) XXX_Size() int {
 	return xxx_messageInfo_Complex.Size(m)
@@ -886,7 +805,7 @@
 	ExtensionType: (*Complex)(nil),
 	Field:         123,
 	Name:          "jsonpb.Complex.real_extension",
-	Tag:           "bytes,123,opt,name=real_extension,json=realExtension",
+	Tag:           "bytes,123,opt,name=real_extension",
 	Filename:      "test_objects.proto",
 }
 
@@ -915,16 +834,17 @@
 func (m *KnownTypes) String() string { return proto.CompactTextString(m) }
 func (*KnownTypes) ProtoMessage()    {}
 func (*KnownTypes) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{8}
+	return fileDescriptor_e97c739a0ce14cc6, []int{8}
 }
+
 func (m *KnownTypes) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_KnownTypes.Unmarshal(m, b)
 }
 func (m *KnownTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_KnownTypes.Marshal(b, m, deterministic)
 }
-func (dst *KnownTypes) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_KnownTypes.Merge(dst, src)
+func (m *KnownTypes) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_KnownTypes.Merge(m, src)
 }
 func (m *KnownTypes) XXX_Size() int {
 	return xxx_messageInfo_KnownTypes.Size(m)
@@ -1052,16 +972,17 @@
 func (m *MsgWithRequired) String() string { return proto.CompactTextString(m) }
 func (*MsgWithRequired) ProtoMessage()    {}
 func (*MsgWithRequired) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{9}
+	return fileDescriptor_e97c739a0ce14cc6, []int{9}
 }
+
 func (m *MsgWithRequired) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MsgWithRequired.Unmarshal(m, b)
 }
 func (m *MsgWithRequired) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MsgWithRequired.Marshal(b, m, deterministic)
 }
-func (dst *MsgWithRequired) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MsgWithRequired.Merge(dst, src)
+func (m *MsgWithRequired) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MsgWithRequired.Merge(m, src)
 }
 func (m *MsgWithRequired) XXX_Size() int {
 	return xxx_messageInfo_MsgWithRequired.Size(m)
@@ -1092,16 +1013,17 @@
 func (m *MsgWithIndirectRequired) String() string { return proto.CompactTextString(m) }
 func (*MsgWithIndirectRequired) ProtoMessage()    {}
 func (*MsgWithIndirectRequired) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{10}
+	return fileDescriptor_e97c739a0ce14cc6, []int{10}
 }
+
 func (m *MsgWithIndirectRequired) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MsgWithIndirectRequired.Unmarshal(m, b)
 }
 func (m *MsgWithIndirectRequired) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MsgWithIndirectRequired.Marshal(b, m, deterministic)
 }
-func (dst *MsgWithIndirectRequired) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MsgWithIndirectRequired.Merge(dst, src)
+func (m *MsgWithIndirectRequired) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MsgWithIndirectRequired.Merge(m, src)
 }
 func (m *MsgWithIndirectRequired) XXX_Size() int {
 	return xxx_messageInfo_MsgWithIndirectRequired.Size(m)
@@ -1144,16 +1066,17 @@
 func (m *MsgWithRequiredBytes) String() string { return proto.CompactTextString(m) }
 func (*MsgWithRequiredBytes) ProtoMessage()    {}
 func (*MsgWithRequiredBytes) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{11}
+	return fileDescriptor_e97c739a0ce14cc6, []int{11}
 }
+
 func (m *MsgWithRequiredBytes) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MsgWithRequiredBytes.Unmarshal(m, b)
 }
 func (m *MsgWithRequiredBytes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MsgWithRequiredBytes.Marshal(b, m, deterministic)
 }
-func (dst *MsgWithRequiredBytes) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MsgWithRequiredBytes.Merge(dst, src)
+func (m *MsgWithRequiredBytes) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MsgWithRequiredBytes.Merge(m, src)
 }
 func (m *MsgWithRequiredBytes) XXX_Size() int {
 	return xxx_messageInfo_MsgWithRequiredBytes.Size(m)
@@ -1182,16 +1105,17 @@
 func (m *MsgWithRequiredWKT) String() string { return proto.CompactTextString(m) }
 func (*MsgWithRequiredWKT) ProtoMessage()    {}
 func (*MsgWithRequiredWKT) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{12}
+	return fileDescriptor_e97c739a0ce14cc6, []int{12}
 }
+
 func (m *MsgWithRequiredWKT) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MsgWithRequiredWKT.Unmarshal(m, b)
 }
 func (m *MsgWithRequiredWKT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MsgWithRequiredWKT.Marshal(b, m, deterministic)
 }
-func (dst *MsgWithRequiredWKT) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MsgWithRequiredWKT.Merge(dst, src)
+func (m *MsgWithRequiredWKT) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MsgWithRequiredWKT.Merge(m, src)
 }
 func (m *MsgWithRequiredWKT) XXX_Size() int {
 	return xxx_messageInfo_MsgWithRequiredWKT.Size(m)
@@ -1228,6 +1152,7 @@
 }
 
 func init() {
+	proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value)
 	proto.RegisterType((*Simple)(nil), "jsonpb.Simple")
 	proto.RegisterType((*NonFinites)(nil), "jsonpb.NonFinites")
 	proto.RegisterType((*Repeats)(nil), "jsonpb.Repeats")
@@ -1237,6 +1162,7 @@
 	proto.RegisterMapType((map[int64]string)(nil), "jsonpb.Maps.MInt64StrEntry")
 	proto.RegisterType((*MsgWithOneof)(nil), "jsonpb.MsgWithOneof")
 	proto.RegisterType((*Real)(nil), "jsonpb.Real")
+	proto.RegisterExtension(E_Complex_RealExtension)
 	proto.RegisterType((*Complex)(nil), "jsonpb.Complex")
 	proto.RegisterType((*KnownTypes)(nil), "jsonpb.KnownTypes")
 	proto.RegisterType((*MsgWithRequired)(nil), "jsonpb.MsgWithRequired")
@@ -1244,15 +1170,13 @@
 	proto.RegisterMapType((map[string]*MsgWithRequired)(nil), "jsonpb.MsgWithIndirectRequired.MapFieldEntry")
 	proto.RegisterType((*MsgWithRequiredBytes)(nil), "jsonpb.MsgWithRequiredBytes")
 	proto.RegisterType((*MsgWithRequiredWKT)(nil), "jsonpb.MsgWithRequiredWKT")
-	proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value)
-	proto.RegisterExtension(E_Complex_RealExtension)
 	proto.RegisterExtension(E_Name)
 	proto.RegisterExtension(E_Extm)
 }
 
-func init() { proto.RegisterFile("test_objects.proto", fileDescriptor_test_objects_a4d3e593ea3c686f) }
+func init() { proto.RegisterFile("test_objects.proto", fileDescriptor_e97c739a0ce14cc6) }
 
-var fileDescriptor_test_objects_a4d3e593ea3c686f = []byte{
+var fileDescriptor_e97c739a0ce14cc6 = []byte{
 	// 1460 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xdd, 0x72, 0xdb, 0x44,
 	0x14, 0x8e, 0x24, 0xcb, 0xb6, 0x8e, 0xf3, 0xd7, 0x6d, 0xda, 0x2a, 0xa1, 0x14, 0x8d, 0x5b, 0x8a,
diff --git a/proto/all_test.go b/proto/all_test.go
index d7b671a..1bea4b6 100644
--- a/proto/all_test.go
+++ b/proto/all_test.go
@@ -2256,26 +2256,32 @@
 		label  string
 		proto2 Message
 		proto3 Message
+		want   []byte
 	}{{
 		label:  "Scalar",
 		proto2: &TestUTF8{Scalar: String(invalidUTF8)},
 		proto3: &pb3.TestUTF8{Scalar: invalidUTF8},
+		want:   []byte{0x0a, 0x07, 0xde, 0xad, 0xbe, 0xef, 0x80, 0x00, 0xff},
 	}, {
 		label:  "Vector",
 		proto2: &TestUTF8{Vector: []string{invalidUTF8}},
 		proto3: &pb3.TestUTF8{Vector: []string{invalidUTF8}},
+		want:   []byte{0x12, 0x07, 0xde, 0xad, 0xbe, 0xef, 0x80, 0x00, 0xff},
 	}, {
 		label:  "Oneof",
 		proto2: &TestUTF8{Oneof: &TestUTF8_Field{invalidUTF8}},
 		proto3: &pb3.TestUTF8{Oneof: &pb3.TestUTF8_Field{invalidUTF8}},
+		want:   []byte{0x1a, 0x07, 0xde, 0xad, 0xbe, 0xef, 0x80, 0x00, 0xff},
 	}, {
 		label:  "MapKey",
 		proto2: &TestUTF8{MapKey: map[string]int64{invalidUTF8: 0}},
 		proto3: &pb3.TestUTF8{MapKey: map[string]int64{invalidUTF8: 0}},
+		want:   []byte{0x22, 0x0b, 0x0a, 0x07, 0xde, 0xad, 0xbe, 0xef, 0x80, 0x00, 0xff, 0x10, 0x00},
 	}, {
 		label:  "MapValue",
 		proto2: &TestUTF8{MapValue: map[int64]string{0: invalidUTF8}},
 		proto3: &pb3.TestUTF8{MapValue: map[int64]string{0: invalidUTF8}},
+		want:   []byte{0x2a, 0x0b, 0x08, 0x00, 0x12, 0x07, 0xde, 0xad, 0xbe, 0xef, 0x80, 0x00, 0xff},
 	}}
 
 	for _, tt := range tests {
@@ -2284,22 +2290,59 @@
 		if err != nil {
 			t.Errorf("Marshal(proto2.%s) = %v, want nil", tt.label, err)
 		}
-		tt.proto2.Reset()
-		err = Unmarshal(b, tt.proto2)
-		if err != nil {
+		if !bytes.Equal(b, tt.want) {
+			t.Errorf("Marshal(proto2.%s) = %x, want %x", tt.label, b, tt.want)
+		}
+
+		m := Clone(tt.proto2)
+		m.Reset()
+		if err = Unmarshal(tt.want, m); err != nil {
 			t.Errorf("Unmarshal(proto2.%s) = %v, want nil", tt.label, err)
 		}
+		if !Equal(m, tt.proto2) {
+			t.Errorf("proto2.%s: output mismatch:\ngot  %v\nwant %v", tt.label, m, tt.proto2)
+		}
 
 		// Proto3 should validate UTF-8.
-		_, err = Marshal(tt.proto3)
+		b, err = Marshal(tt.proto3)
 		if err == nil {
 			t.Errorf("Marshal(proto3.%s) = %v, want non-nil", tt.label, err)
 		}
-		tt.proto3.Reset()
-		err = Unmarshal(b, tt.proto3)
+		if !bytes.Equal(b, tt.want) {
+			t.Errorf("Marshal(proto3.%s) = %x, want %x", tt.label, b, tt.want)
+		}
+
+		m = Clone(tt.proto3)
+		m.Reset()
+		err = Unmarshal(tt.want, m)
 		if err == nil {
 			t.Errorf("Unmarshal(proto3.%s) = %v, want non-nil", tt.label, err)
 		}
+		if !Equal(m, tt.proto3) {
+			t.Errorf("proto3.%s: output mismatch:\ngot  %v\nwant %v", tt.label, m, tt.proto2)
+		}
+	}
+}
+
+func TestRequired(t *testing.T) {
+	// The F_BoolRequired field appears after all of the required fields.
+	// It should still be handled even after multiple required field violations.
+	m := &GoTest{F_BoolRequired: Bool(true)}
+	got, err := Marshal(m)
+	if _, ok := err.(*RequiredNotSetError); !ok {
+		t.Errorf("Marshal() = %v, want RequiredNotSetError error", err)
+	}
+	if want := []byte{0x50, 0x01}; !bytes.Equal(got, want) {
+		t.Errorf("Marshal() = %x, want %x", got, want)
+	}
+
+	m = new(GoTest)
+	err = Unmarshal(got, m)
+	if _, ok := err.(*RequiredNotSetError); !ok {
+		t.Errorf("Marshal() = %v, want RequiredNotSetError error", err)
+	}
+	if !m.GetF_BoolRequired() {
+		t.Error("m.F_BoolRequired = false, want true")
 	}
 }
 
diff --git a/proto/clone_test.go b/proto/clone_test.go
index 0d3b127..b04989e 100644
--- a/proto/clone_test.go
+++ b/proto/clone_test.go
@@ -67,34 +67,50 @@
 	if err := proto.SetExtension(cloneTestMessage, pb.E_Ext_More, ext); err != nil {
 		panic("SetExtension: " + err.Error())
 	}
+	if err := proto.SetExtension(cloneTestMessage, pb.E_Ext_Text, proto.String("hello")); err != nil {
+		panic("SetExtension: " + err.Error())
+	}
+	if err := proto.SetExtension(cloneTestMessage, pb.E_Greeting, []string{"one", "two"}); err != nil {
+		panic("SetExtension: " + err.Error())
+	}
 }
 
 func TestClone(t *testing.T) {
+	// Create a clone using a marshal/unmarshal roundtrip.
+	vanilla := new(pb.MyMessage)
+	b, err := proto.Marshal(cloneTestMessage)
+	if err != nil {
+		t.Errorf("unexpected Marshal error: %v", err)
+	}
+	if err := proto.Unmarshal(b, vanilla); err != nil {
+		t.Errorf("unexpected Unarshal error: %v", err)
+	}
+
+	// Create a clone using Clone and verify that it is equal to the original.
 	m := proto.Clone(cloneTestMessage).(*pb.MyMessage)
 	if !proto.Equal(m, cloneTestMessage) {
 		t.Fatalf("Clone(%v) = %v", cloneTestMessage, m)
 	}
 
-	// Verify it was a deep copy.
+	// Mutate the clone, which should not affect the original.
+	x1, err := proto.GetExtension(m, pb.E_Ext_More)
+	if err != nil {
+		t.Errorf("unexpected GetExtension(%v) error: %v", pb.E_Ext_More.Name, err)
+	}
+	x2, err := proto.GetExtension(m, pb.E_Ext_Text)
+	if err != nil {
+		t.Errorf("unexpected GetExtension(%v) error: %v", pb.E_Ext_Text.Name, err)
+	}
+	x3, err := proto.GetExtension(m, pb.E_Greeting)
+	if err != nil {
+		t.Errorf("unexpected GetExtension(%v) error: %v", pb.E_Greeting.Name, err)
+	}
 	*m.Inner.Port++
-	if proto.Equal(m, cloneTestMessage) {
-		t.Error("Mutating clone changed the original")
-	}
-	// Byte fields and repeated fields should be copied.
-	if &m.Pet[0] == &cloneTestMessage.Pet[0] {
-		t.Error("Pet: repeated field not copied")
-	}
-	if &m.Others[0] == &cloneTestMessage.Others[0] {
-		t.Error("Others: repeated field not copied")
-	}
-	if &m.Others[0].Value[0] == &cloneTestMessage.Others[0].Value[0] {
-		t.Error("Others[0].Value: bytes field not copied")
-	}
-	if &m.RepBytes[0] == &cloneTestMessage.RepBytes[0] {
-		t.Error("RepBytes: repeated field not copied")
-	}
-	if &m.RepBytes[0][0] == &cloneTestMessage.RepBytes[0][0] {
-		t.Error("RepBytes[0]: bytes field not copied")
+	*(x1.(*pb.Ext)).Data = "blah blah"
+	*(x2.(*string)) = "goodbye"
+	x3.([]string)[0] = "zero"
+	if !proto.Equal(cloneTestMessage, vanilla) {
+		t.Fatalf("mutation on original detected:\ngot  %v\nwant %v", cloneTestMessage, vanilla)
 	}
 }
 
diff --git a/proto/decode.go b/proto/decode.go
index d9aa3c4..63b0f08 100644
--- a/proto/decode.go
+++ b/proto/decode.go
@@ -186,7 +186,6 @@
 	if b&0x80 == 0 {
 		goto done
 	}
-	// x -= 0x80 << 63 // Always zero.
 
 	return 0, errOverflow
 
diff --git a/proto/deprecated.go b/proto/deprecated.go
new file mode 100644
index 0000000..35b882c
--- /dev/null
+++ b/proto/deprecated.go
@@ -0,0 +1,63 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2018 The Go Authors.  All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+import "errors"
+
+// Deprecated: do not use.
+type Stats struct{ Emalloc, Dmalloc, Encode, Decode, Chit, Cmiss, Size uint64 }
+
+// Deprecated: do not use.
+func GetStats() Stats { return Stats{} }
+
+// Deprecated: do not use.
+func MarshalMessageSet(interface{}) ([]byte, error) {
+	return nil, errors.New("proto: not implemented")
+}
+
+// Deprecated: do not use.
+func UnmarshalMessageSet([]byte, interface{}) error {
+	return errors.New("proto: not implemented")
+}
+
+// Deprecated: do not use.
+func MarshalMessageSetJSON(interface{}) ([]byte, error) {
+	return nil, errors.New("proto: not implemented")
+}
+
+// Deprecated: do not use.
+func UnmarshalMessageSetJSON([]byte, interface{}) error {
+	return errors.New("proto: not implemented")
+}
+
+// Deprecated: do not use.
+func RegisterMessageSetType(Message, int32, string) {}
diff --git a/proto/encode.go b/proto/encode.go
index 4c35d33..3abfed2 100644
--- a/proto/encode.go
+++ b/proto/encode.go
@@ -37,24 +37,9 @@
 
 import (
 	"errors"
-	"fmt"
 	"reflect"
 )
 
-// RequiredNotSetError is an error type returned by either Marshal or Unmarshal.
-// Marshal reports this when a required field is not initialized.
-// Unmarshal reports this when a required field is missing from the wire data.
-type RequiredNotSetError struct {
-	field string
-}
-
-func (e *RequiredNotSetError) Error() string {
-	if e.field == "" {
-		return fmt.Sprintf("proto: required field not set")
-	}
-	return fmt.Sprintf("proto: required field %q not set", e.field)
-}
-
 var (
 	// errRepeatedHasNil is the error returned if Marshal is called with
 	// a struct with a repeated field containing a nil element.
diff --git a/proto/equal.go b/proto/equal.go
index d4db5a1..f9b6e41 100644
--- a/proto/equal.go
+++ b/proto/equal.go
@@ -246,7 +246,8 @@
 			return false
 		}
 
-		m1, m2 := e1.value, e2.value
+		m1 := extensionAsLegacyType(e1.value)
+		m2 := extensionAsLegacyType(e2.value)
 
 		if m1 == nil && m2 == nil {
 			// Both have only encoded form.
diff --git a/proto/extensions.go b/proto/extensions.go
index 816a3b9..fa88add 100644
--- a/proto/extensions.go
+++ b/proto/extensions.go
@@ -185,9 +185,25 @@
 	// extension will have only enc set. When such an extension is
 	// accessed using GetExtension (or GetExtensions) desc and value
 	// will be set.
-	desc  *ExtensionDesc
+	desc *ExtensionDesc
+
+	// value is a concrete value for the extension field. Let the type of
+	// desc.ExtensionType be the "API type" and the type of Extension.value
+	// be the "storage type". The API type and storage type are the same except:
+	//	* For scalars (except []byte), the API type uses *T,
+	//	while the storage type uses T.
+	//	* For repeated fields, the API type uses []T, while the storage type
+	//	uses *[]T.
+	//
+	// The reason for the divergence is so that the storage type more naturally
+	// matches what is expected of when retrieving the values through the
+	// protobuf reflection APIs.
+	//
+	// The value may only be populated if desc is also populated.
 	value interface{}
-	enc   []byte
+
+	// enc is the raw bytes for the extension field.
+	enc []byte
 }
 
 // SetRawExtension is for testing only.
@@ -334,7 +350,7 @@
 			// descriptors with the same field number.
 			return nil, errors.New("proto: descriptor conflict")
 		}
-		return e.value, nil
+		return extensionAsLegacyType(e.value), nil
 	}
 
 	if extension.ExtensionType == nil {
@@ -349,11 +365,11 @@
 
 	// Remember the decoded version and drop the encoded version.
 	// That way it is safe to mutate what we return.
-	e.value = v
+	e.value = extensionAsStorageType(v)
 	e.desc = extension
 	e.enc = nil
 	emap[extension.Field] = e
-	return e.value, nil
+	return extensionAsLegacyType(e.value), nil
 }
 
 // defaultExtensionValue returns the default value for extension.
@@ -488,7 +504,7 @@
 	}
 	typ := reflect.TypeOf(extension.ExtensionType)
 	if typ != reflect.TypeOf(value) {
-		return errors.New("proto: bad extension value type")
+		return fmt.Errorf("proto: bad extension value type. got: %T, want: %T", value, extension.ExtensionType)
 	}
 	// nil extension values need to be caught early, because the
 	// encoder can't distinguish an ErrNil due to a nil extension
@@ -500,7 +516,7 @@
 	}
 
 	extmap := epb.extensionsWrite()
-	extmap[extension.Field] = Extension{desc: extension, value: value}
+	extmap[extension.Field] = Extension{desc: extension, value: extensionAsStorageType(value)}
 	return nil
 }
 
@@ -541,3 +557,51 @@
 func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc {
 	return extensionMaps[reflect.TypeOf(pb).Elem()]
 }
+
+// extensionAsLegacyType converts an value in the storage type as the API type.
+// See Extension.value.
+func extensionAsLegacyType(v interface{}) interface{} {
+	switch rv := reflect.ValueOf(v); rv.Kind() {
+	case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String:
+		// Represent primitive types as a pointer to the value.
+		rv2 := reflect.New(rv.Type())
+		rv2.Elem().Set(rv)
+		v = rv2.Interface()
+	case reflect.Ptr:
+		// Represent slice types as the value itself.
+		switch rv.Type().Elem().Kind() {
+		case reflect.Slice:
+			if rv.IsNil() {
+				v = reflect.Zero(rv.Type().Elem()).Interface()
+			} else {
+				v = rv.Elem().Interface()
+			}
+		}
+	}
+	return v
+}
+
+// extensionAsStorageType converts an value in the API type as the storage type.
+// See Extension.value.
+func extensionAsStorageType(v interface{}) interface{} {
+	switch rv := reflect.ValueOf(v); rv.Kind() {
+	case reflect.Ptr:
+		// Represent slice types as the value itself.
+		switch rv.Type().Elem().Kind() {
+		case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String:
+			if rv.IsNil() {
+				v = reflect.Zero(rv.Type().Elem()).Interface()
+			} else {
+				v = rv.Elem().Interface()
+			}
+		}
+	case reflect.Slice:
+		// Represent slice types as a pointer to the value.
+		if rv.Type().Elem().Kind() != reflect.Uint8 {
+			rv2 := reflect.New(rv.Type())
+			rv2.Elem().Set(rv)
+			v = rv2.Interface()
+		}
+	}
+	return v
+}
diff --git a/proto/lib.go b/proto/lib.go
index 0e2191b..fdd328b 100644
--- a/proto/lib.go
+++ b/proto/lib.go
@@ -265,7 +265,6 @@
 
 import (
 	"encoding/json"
-	"errors"
 	"fmt"
 	"log"
 	"reflect"
@@ -274,7 +273,66 @@
 	"sync"
 )
 
-var errInvalidUTF8 = errors.New("proto: invalid UTF-8 string")
+// RequiredNotSetError is an error type returned by either Marshal or Unmarshal.
+// Marshal reports this when a required field is not initialized.
+// Unmarshal reports this when a required field is missing from the wire data.
+type RequiredNotSetError struct{ field string }
+
+func (e *RequiredNotSetError) Error() string {
+	if e.field == "" {
+		return fmt.Sprintf("proto: required field not set")
+	}
+	return fmt.Sprintf("proto: required field %q not set", e.field)
+}
+func (e *RequiredNotSetError) RequiredNotSet() bool {
+	return true
+}
+
+type invalidUTF8Error struct{ field string }
+
+func (e *invalidUTF8Error) Error() string {
+	if e.field == "" {
+		return "proto: invalid UTF-8 detected"
+	}
+	return fmt.Sprintf("proto: field %q contains invalid UTF-8", e.field)
+}
+func (e *invalidUTF8Error) InvalidUTF8() bool {
+	return true
+}
+
+// errInvalidUTF8 is a sentinel error to identify fields with invalid UTF-8.
+// This error should not be exposed to the external API as such errors should
+// be recreated with the field information.
+var errInvalidUTF8 = &invalidUTF8Error{}
+
+// isNonFatal reports whether the error is either a RequiredNotSet error
+// or a InvalidUTF8 error.
+func isNonFatal(err error) bool {
+	if re, ok := err.(interface{ RequiredNotSet() bool }); ok && re.RequiredNotSet() {
+		return true
+	}
+	if re, ok := err.(interface{ InvalidUTF8() bool }); ok && re.InvalidUTF8() {
+		return true
+	}
+	return false
+}
+
+type nonFatal struct{ E error }
+
+// Merge merges err into nf and reports whether it was successful.
+// Otherwise it returns false for any fatal non-nil errors.
+func (nf *nonFatal) Merge(err error) (ok bool) {
+	if err == nil {
+		return true // not an error
+	}
+	if !isNonFatal(err) {
+		return false // fatal error
+	}
+	if nf.E == nil {
+		nf.E = err // store first instance of non-fatal error
+	}
+	return true
+}
 
 // Message is implemented by generated protocol buffer messages.
 type Message interface {
@@ -283,26 +341,6 @@
 	ProtoMessage()
 }
 
-// Stats records allocation details about the protocol buffer encoders
-// and decoders.  Useful for tuning the library itself.
-type Stats struct {
-	Emalloc uint64 // mallocs in encode
-	Dmalloc uint64 // mallocs in decode
-	Encode  uint64 // number of encodes
-	Decode  uint64 // number of decodes
-	Chit    uint64 // number of cache hits
-	Cmiss   uint64 // number of cache misses
-	Size    uint64 // number of sizes
-}
-
-// Set to true to enable stats collection.
-const collectStats = false
-
-var stats Stats
-
-// GetStats returns a copy of the global Stats structure.
-func GetStats() Stats { return stats }
-
 // A Buffer is a buffer manager for marshaling and unmarshaling
 // protocol buffers.  It may be reused between invocations to
 // reduce memory usage.  It is not necessary to use a Buffer;
@@ -902,13 +940,19 @@
 	return false
 }
 
-// ProtoPackageIsVersion2 is referenced from generated protocol buffer files
-// to assert that that code is compatible with this version of the proto package.
-const ProtoPackageIsVersion2 = true
+const (
+	// ProtoPackageIsVersion3 is referenced from generated protocol buffer files
+	// to assert that that code is compatible with this version of the proto package.
+	ProtoPackageIsVersion3 = true
 
-// ProtoPackageIsVersion1 is referenced from generated protocol buffer files
-// to assert that that code is compatible with this version of the proto package.
-const ProtoPackageIsVersion1 = true
+	// ProtoPackageIsVersion2 is referenced from generated protocol buffer files
+	// to assert that that code is compatible with this version of the proto package.
+	ProtoPackageIsVersion2 = true
+
+	// ProtoPackageIsVersion1 is referenced from generated protocol buffer files
+	// to assert that that code is compatible with this version of the proto package.
+	ProtoPackageIsVersion1 = true
+)
 
 // InternalMessageInfo is a type used internally by generated .pb.go files.
 // This type is not intended to be used by non-generated code.
diff --git a/proto/message_set.go b/proto/message_set.go
index 3b6ca41..f48a756 100644
--- a/proto/message_set.go
+++ b/proto/message_set.go
@@ -36,13 +36,7 @@
  */
 
 import (
-	"bytes"
-	"encoding/json"
 	"errors"
-	"fmt"
-	"reflect"
-	"sort"
-	"sync"
 )
 
 // errNoMessageTypeID occurs when a protocol buffer does not have a message type ID.
@@ -145,46 +139,9 @@
 	return buf[i+1:]
 }
 
-// MarshalMessageSet encodes the extension map represented by m in the message set wire format.
-// It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option.
-func MarshalMessageSet(exts interface{}) ([]byte, error) {
-	return marshalMessageSet(exts, false)
-}
-
-// marshaMessageSet implements above function, with the opt to turn on / off deterministic during Marshal.
-func marshalMessageSet(exts interface{}, deterministic bool) ([]byte, error) {
-	switch exts := exts.(type) {
-	case *XXX_InternalExtensions:
-		var u marshalInfo
-		siz := u.sizeMessageSet(exts)
-		b := make([]byte, 0, siz)
-		return u.appendMessageSet(b, exts, deterministic)
-
-	case map[int32]Extension:
-		// This is an old-style extension map.
-		// Wrap it in a new-style XXX_InternalExtensions.
-		ie := XXX_InternalExtensions{
-			p: &struct {
-				mu           sync.Mutex
-				extensionMap map[int32]Extension
-			}{
-				extensionMap: exts,
-			},
-		}
-
-		var u marshalInfo
-		siz := u.sizeMessageSet(&ie)
-		b := make([]byte, 0, siz)
-		return u.appendMessageSet(b, &ie, deterministic)
-
-	default:
-		return nil, errors.New("proto: not an extension map")
-	}
-}
-
-// UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format.
+// unmarshalMessageSet decodes the extension map encoded in buf in the message set wire format.
 // It is called by Unmarshal methods on protocol buffer messages with the message_set_wire_format option.
-func UnmarshalMessageSet(buf []byte, exts interface{}) error {
+func unmarshalMessageSet(buf []byte, exts interface{}) error {
 	var m map[int32]Extension
 	switch exts := exts.(type) {
 	case *XXX_InternalExtensions:
@@ -222,93 +179,3 @@
 	}
 	return nil
 }
-
-// MarshalMessageSetJSON encodes the extension map represented by m in JSON format.
-// It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option.
-func MarshalMessageSetJSON(exts interface{}) ([]byte, error) {
-	var m map[int32]Extension
-	switch exts := exts.(type) {
-	case *XXX_InternalExtensions:
-		var mu sync.Locker
-		m, mu = exts.extensionsRead()
-		if m != nil {
-			// Keep the extensions map locked until we're done marshaling to prevent
-			// races between marshaling and unmarshaling the lazily-{en,de}coded
-			// values.
-			mu.Lock()
-			defer mu.Unlock()
-		}
-	case map[int32]Extension:
-		m = exts
-	default:
-		return nil, errors.New("proto: not an extension map")
-	}
-	var b bytes.Buffer
-	b.WriteByte('{')
-
-	// Process the map in key order for deterministic output.
-	ids := make([]int32, 0, len(m))
-	for id := range m {
-		ids = append(ids, id)
-	}
-	sort.Sort(int32Slice(ids)) // int32Slice defined in text.go
-
-	for i, id := range ids {
-		ext := m[id]
-		msd, ok := messageSetMap[id]
-		if !ok {
-			// Unknown type; we can't render it, so skip it.
-			continue
-		}
-
-		if i > 0 && b.Len() > 1 {
-			b.WriteByte(',')
-		}
-
-		fmt.Fprintf(&b, `"[%s]":`, msd.name)
-
-		x := ext.value
-		if x == nil {
-			x = reflect.New(msd.t.Elem()).Interface()
-			if err := Unmarshal(ext.enc, x.(Message)); err != nil {
-				return nil, err
-			}
-		}
-		d, err := json.Marshal(x)
-		if err != nil {
-			return nil, err
-		}
-		b.Write(d)
-	}
-	b.WriteByte('}')
-	return b.Bytes(), nil
-}
-
-// UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format.
-// It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option.
-func UnmarshalMessageSetJSON(buf []byte, exts interface{}) error {
-	// Common-case fast path.
-	if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) {
-		return nil
-	}
-
-	// This is fairly tricky, and it's not clear that it is needed.
-	return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented")
-}
-
-// A global registry of types that can be used in a MessageSet.
-
-var messageSetMap = make(map[int32]messageSetDesc)
-
-type messageSetDesc struct {
-	t    reflect.Type // pointer to struct
-	name string
-}
-
-// RegisterMessageSetType is called from the generated code.
-func RegisterMessageSetType(m Message, fieldNum int32, name string) {
-	messageSetMap[fieldNum] = messageSetDesc{
-		t:    reflect.TypeOf(m),
-		name: name,
-	}
-}
diff --git a/proto/message_set_test.go b/proto/message_set_test.go
index 2c170c5..1bd11aa 100644
--- a/proto/message_set_test.go
+++ b/proto/message_set_test.go
@@ -29,49 +29,60 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-package proto
+package proto_test
 
 import (
 	"bytes"
+	"fmt"
 	"testing"
+
+	"github.com/golang/protobuf/proto"
+	. "github.com/golang/protobuf/proto/test_proto"
 )
 
 func TestUnmarshalMessageSetWithDuplicate(t *testing.T) {
-	// Check that a repeated message set entry will be concatenated.
-	in := &messageSet{
-		Item: []*_MessageSet_Item{
-			{TypeId: Int32(12345), Message: []byte("hoo")},
-			{TypeId: Int32(12345), Message: []byte("hah")},
-		},
-	}
-	b, err := Marshal(in)
-	if err != nil {
-		t.Fatalf("Marshal: %v", err)
-	}
-	t.Logf("Marshaled bytes: %q", b)
+	/*
+		Message{
+			Tag{1, StartGroup},
+			Message{
+				Tag{2, Varint}, Uvarint(12345),
+				Tag{3, Bytes}, Bytes("hoo"),
+			},
+			Tag{1, EndGroup},
+			Tag{1, StartGroup},
+			Message{
+				Tag{2, Varint}, Uvarint(12345),
+				Tag{3, Bytes}, Bytes("hah"),
+			},
+			Tag{1, EndGroup},
+		}
+	*/
+	var in []byte
+	fmt.Sscanf("0b10b9601a03686f6f0c0b10b9601a036861680c", "%x", &in)
 
-	var extensions XXX_InternalExtensions
-	if err := UnmarshalMessageSet(b, &extensions); err != nil {
-		t.Fatalf("UnmarshalMessageSet: %v", err)
-	}
-	ext, ok := extensions.p.extensionMap[12345]
-	if !ok {
-		t.Fatalf("Didn't retrieve extension 12345; map is %v", extensions.p.extensionMap)
-	}
-	// Skip wire type/field number and length varints.
-	got := skipVarint(skipVarint(ext.enc))
-	if want := []byte("hoohah"); !bytes.Equal(got, want) {
-		t.Errorf("Combined extension is %q, want %q", got, want)
-	}
-}
+	/*
+		Message{
+			Tag{1, StartGroup},
+			Message{
+				Tag{2, Varint}, Uvarint(12345),
+				Tag{3, Bytes}, Bytes("hoohah"),
+			},
+			Tag{1, EndGroup},
+		}
+	*/
+	var want []byte
+	fmt.Sscanf("0b10b9601a06686f6f6861680c", "%x", &want)
 
-func TestMarshalMessageSetJSON_UnknownType(t *testing.T) {
-	extMap := map[int32]Extension{12345: Extension{}}
-	got, err := MarshalMessageSetJSON(extMap)
-	if err != nil {
-		t.Fatalf("MarshalMessageSetJSON: %v", err)
+	var m MyMessageSet
+	if err := proto.Unmarshal(in, &m); err != nil {
+		t.Fatalf("unexpected Unmarshal error: %v", err)
 	}
-	if want := []byte("{}"); !bytes.Equal(got, want) {
-		t.Errorf("MarshalMessageSetJSON(%v) = %q, want %q", extMap, got, want)
+	got, err := proto.Marshal(&m)
+	if err != nil {
+		t.Fatalf("unexpected Marshal error: %v", err)
+	}
+
+	if !bytes.Equal(got, want) {
+		t.Errorf("output mismatch:\ngot  %x\nwant %x", got, want)
 	}
 }
diff --git a/proto/pointer_reflect.go b/proto/pointer_reflect.go
index b6cad90..94fa919 100644
--- a/proto/pointer_reflect.go
+++ b/proto/pointer_reflect.go
@@ -79,10 +79,13 @@
 
 // toAddrPointer converts an interface to a pointer that points to
 // the interface data.
-func toAddrPointer(i *interface{}, isptr bool) pointer {
+func toAddrPointer(i *interface{}, isptr, deref bool) pointer {
 	v := reflect.ValueOf(*i)
 	u := reflect.New(v.Type())
 	u.Elem().Set(v)
+	if deref {
+		u = u.Elem()
+	}
 	return pointer{v: u}
 }
 
diff --git a/proto/pointer_unsafe.go b/proto/pointer_unsafe.go
index d55a335..dbfffe0 100644
--- a/proto/pointer_unsafe.go
+++ b/proto/pointer_unsafe.go
@@ -85,16 +85,21 @@
 
 // toAddrPointer converts an interface to a pointer that points to
 // the interface data.
-func toAddrPointer(i *interface{}, isptr bool) pointer {
+func toAddrPointer(i *interface{}, isptr, deref bool) (p pointer) {
 	// Super-tricky - read or get the address of data word of interface value.
 	if isptr {
 		// The interface is of pointer type, thus it is a direct interface.
 		// The data word is the pointer data itself. We take its address.
-		return pointer{p: unsafe.Pointer(uintptr(unsafe.Pointer(i)) + ptrSize)}
+		p = pointer{p: unsafe.Pointer(uintptr(unsafe.Pointer(i)) + ptrSize)}
+	} else {
+		// The interface is not of pointer type. The data word is the pointer
+		// to the data.
+		p = pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]}
 	}
-	// The interface is not of pointer type. The data word is the pointer
-	// to the data.
-	return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]}
+	if deref {
+		p.p = *(*unsafe.Pointer)(p.p)
+	}
+	return p
 }
 
 // valToPointer converts v to a pointer. v must be of pointer type.
diff --git a/proto/properties.go b/proto/properties.go
index 1f272c0..79668ff 100644
--- a/proto/properties.go
+++ b/proto/properties.go
@@ -148,9 +148,9 @@
 	stype reflect.Type      // set for struct types only
 	sprop *StructProperties // set for struct types only
 
-	mtype    reflect.Type // set for map types only
-	mkeyprop *Properties  // set for map types only
-	mvalprop *Properties  // set for map types only
+	mtype      reflect.Type // set for map types only
+	MapKeyProp *Properties  // set for map types only
+	MapValProp *Properties  // set for map types only
 }
 
 // String formats the properties in the protobuf struct field tag style.
@@ -275,16 +275,16 @@
 
 	case reflect.Map:
 		p.mtype = t1
-		p.mkeyprop = &Properties{}
-		p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp)
-		p.mvalprop = &Properties{}
+		p.MapKeyProp = &Properties{}
+		p.MapKeyProp.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp)
+		p.MapValProp = &Properties{}
 		vtype := p.mtype.Elem()
 		if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice {
 			// The value type is not a message (*T) or bytes ([]byte),
 			// so we need encoders for the pointer to this type.
 			vtype = reflect.PtrTo(vtype)
 		}
-		p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp)
+		p.MapValProp.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp)
 	}
 
 	if p.stype != nil {
@@ -334,9 +334,6 @@
 	sprop, ok := propertiesMap[t]
 	propertiesMu.RUnlock()
 	if ok {
-		if collectStats {
-			stats.Chit++
-		}
 		return sprop
 	}
 
@@ -346,17 +343,20 @@
 	return sprop
 }
 
+type (
+	oneofFuncsIface interface {
+		XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{})
+	}
+	oneofWrappersIface interface {
+		XXX_OneofWrappers() []interface{}
+	}
+)
+
 // getPropertiesLocked requires that propertiesMu is held.
 func getPropertiesLocked(t reflect.Type) *StructProperties {
 	if prop, ok := propertiesMap[t]; ok {
-		if collectStats {
-			stats.Chit++
-		}
 		return prop
 	}
-	if collectStats {
-		stats.Cmiss++
-	}
 
 	prop := new(StructProperties)
 	// in case of recursive protos, fill this in now.
@@ -391,13 +391,14 @@
 	// Re-order prop.order.
 	sort.Sort(prop)
 
-	type oneofMessage interface {
-		XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{})
+	var oots []interface{}
+	switch m := reflect.Zero(reflect.PtrTo(t)).Interface().(type) {
+	case oneofFuncsIface:
+		_, _, _, oots = m.XXX_OneofFuncs()
+	case oneofWrappersIface:
+		oots = m.XXX_OneofWrappers()
 	}
-	if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok {
-		var oots []interface{}
-		_, _, _, oots = om.XXX_OneofFuncs()
-
+	if len(oots) > 0 {
 		// Interpret oneof metadata.
 		prop.OneofTypes = make(map[string]*OneofProperties)
 		for _, oot := range oots {
diff --git a/proto/proto3_proto/proto3.pb.go b/proto/proto3_proto/proto3.pb.go
index 7a7d4e9..9a754c8 100644
--- a/proto/proto3_proto/proto3.pb.go
+++ b/proto/proto3_proto/proto3.pb.go
@@ -3,11 +3,13 @@
 
 package proto3_proto
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import test_proto "github.com/golang/protobuf/proto/test_proto"
-import any "github.com/golang/protobuf/ptypes/any"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	test_proto "github.com/golang/protobuf/proto/test_proto"
+	any "github.com/golang/protobuf/ptypes/any"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -18,7 +20,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type Message_Humour int32
 
@@ -35,6 +37,7 @@
 	2: "SLAPSTICK",
 	3: "BILL_BAILEY",
 }
+
 var Message_Humour_value = map[string]int32{
 	"UNKNOWN":     0,
 	"PUNS":        1,
@@ -45,8 +48,9 @@
 func (x Message_Humour) String() string {
 	return proto.EnumName(Message_Humour_name, int32(x))
 }
+
 func (Message_Humour) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{0, 0}
+	return fileDescriptor_1c50d9b824d4ac38, []int{0, 0}
 }
 
 type Message struct {
@@ -78,16 +82,17 @@
 func (m *Message) String() string { return proto.CompactTextString(m) }
 func (*Message) ProtoMessage()    {}
 func (*Message) Descriptor() ([]byte, []int) {
-	return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{0}
+	return fileDescriptor_1c50d9b824d4ac38, []int{0}
 }
+
 func (m *Message) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Message.Unmarshal(m, b)
 }
 func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Message.Marshal(b, m, deterministic)
 }
-func (dst *Message) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Message.Merge(dst, src)
+func (m *Message) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Message.Merge(m, src)
 }
 func (m *Message) XXX_Size() int {
 	return xxx_messageInfo_Message.Size(m)
@@ -243,16 +248,17 @@
 func (m *Nested) String() string { return proto.CompactTextString(m) }
 func (*Nested) ProtoMessage()    {}
 func (*Nested) Descriptor() ([]byte, []int) {
-	return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{1}
+	return fileDescriptor_1c50d9b824d4ac38, []int{1}
 }
+
 func (m *Nested) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Nested.Unmarshal(m, b)
 }
 func (m *Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Nested.Marshal(b, m, deterministic)
 }
-func (dst *Nested) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Nested.Merge(dst, src)
+func (m *Nested) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Nested.Merge(m, src)
 }
 func (m *Nested) XXX_Size() int {
 	return xxx_messageInfo_Nested.Size(m)
@@ -288,16 +294,17 @@
 func (m *MessageWithMap) String() string { return proto.CompactTextString(m) }
 func (*MessageWithMap) ProtoMessage()    {}
 func (*MessageWithMap) Descriptor() ([]byte, []int) {
-	return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{2}
+	return fileDescriptor_1c50d9b824d4ac38, []int{2}
 }
+
 func (m *MessageWithMap) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MessageWithMap.Unmarshal(m, b)
 }
 func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic)
 }
-func (dst *MessageWithMap) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MessageWithMap.Merge(dst, src)
+func (m *MessageWithMap) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MessageWithMap.Merge(m, src)
 }
 func (m *MessageWithMap) XXX_Size() int {
 	return xxx_messageInfo_MessageWithMap.Size(m)
@@ -326,16 +333,17 @@
 func (m *IntMap) String() string { return proto.CompactTextString(m) }
 func (*IntMap) ProtoMessage()    {}
 func (*IntMap) Descriptor() ([]byte, []int) {
-	return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{3}
+	return fileDescriptor_1c50d9b824d4ac38, []int{3}
 }
+
 func (m *IntMap) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_IntMap.Unmarshal(m, b)
 }
 func (m *IntMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_IntMap.Marshal(b, m, deterministic)
 }
-func (dst *IntMap) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_IntMap.Merge(dst, src)
+func (m *IntMap) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_IntMap.Merge(m, src)
 }
 func (m *IntMap) XXX_Size() int {
 	return xxx_messageInfo_IntMap.Size(m)
@@ -364,16 +372,17 @@
 func (m *IntMaps) String() string { return proto.CompactTextString(m) }
 func (*IntMaps) ProtoMessage()    {}
 func (*IntMaps) Descriptor() ([]byte, []int) {
-	return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{4}
+	return fileDescriptor_1c50d9b824d4ac38, []int{4}
 }
+
 func (m *IntMaps) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_IntMaps.Unmarshal(m, b)
 }
 func (m *IntMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_IntMaps.Marshal(b, m, deterministic)
 }
-func (dst *IntMaps) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_IntMaps.Merge(dst, src)
+func (m *IntMaps) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_IntMaps.Merge(m, src)
 }
 func (m *IntMaps) XXX_Size() int {
 	return xxx_messageInfo_IntMaps.Size(m)
@@ -408,16 +417,17 @@
 func (m *TestUTF8) String() string { return proto.CompactTextString(m) }
 func (*TestUTF8) ProtoMessage()    {}
 func (*TestUTF8) Descriptor() ([]byte, []int) {
-	return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{5}
+	return fileDescriptor_1c50d9b824d4ac38, []int{5}
 }
+
 func (m *TestUTF8) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_TestUTF8.Unmarshal(m, b)
 }
 func (m *TestUTF8) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_TestUTF8.Marshal(b, m, deterministic)
 }
-func (dst *TestUTF8) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_TestUTF8.Merge(dst, src)
+func (m *TestUTF8) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_TestUTF8.Merge(m, src)
 }
 func (m *TestUTF8) XXX_Size() int {
 	return xxx_messageInfo_TestUTF8.Size(m)
@@ -428,6 +438,20 @@
 
 var xxx_messageInfo_TestUTF8 proto.InternalMessageInfo
 
+func (m *TestUTF8) GetScalar() string {
+	if m != nil {
+		return m.Scalar
+	}
+	return ""
+}
+
+func (m *TestUTF8) GetVector() []string {
+	if m != nil {
+		return m.Vector
+	}
+	return nil
+}
+
 type isTestUTF8_Oneof interface {
 	isTestUTF8_Oneof()
 }
@@ -445,20 +469,6 @@
 	return nil
 }
 
-func (m *TestUTF8) GetScalar() string {
-	if m != nil {
-		return m.Scalar
-	}
-	return ""
-}
-
-func (m *TestUTF8) GetVector() []string {
-	if m != nil {
-		return m.Vector
-	}
-	return nil
-}
-
 func (m *TestUTF8) GetField() string {
 	if x, ok := m.GetOneof().(*TestUTF8_Field); ok {
 		return x.Field
@@ -480,58 +490,15 @@
 	return nil
 }
 
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*TestUTF8) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
-	return _TestUTF8_OneofMarshaler, _TestUTF8_OneofUnmarshaler, _TestUTF8_OneofSizer, []interface{}{
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*TestUTF8) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
 		(*TestUTF8_Field)(nil),
 	}
 }
 
-func _TestUTF8_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
-	m := msg.(*TestUTF8)
-	// oneof
-	switch x := m.Oneof.(type) {
-	case *TestUTF8_Field:
-		b.EncodeVarint(3<<3 | proto.WireBytes)
-		b.EncodeStringBytes(x.Field)
-	case nil:
-	default:
-		return fmt.Errorf("TestUTF8.Oneof has unexpected type %T", x)
-	}
-	return nil
-}
-
-func _TestUTF8_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
-	m := msg.(*TestUTF8)
-	switch tag {
-	case 3: // oneof.field
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeStringBytes()
-		m.Oneof = &TestUTF8_Field{x}
-		return true, err
-	default:
-		return false, nil
-	}
-}
-
-func _TestUTF8_OneofSizer(msg proto.Message) (n int) {
-	m := msg.(*TestUTF8)
-	// oneof
-	switch x := m.Oneof.(type) {
-	case *TestUTF8_Field:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.Field)))
-		n += len(x.Field)
-	case nil:
-	default:
-		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
-	}
-	return n
-}
-
 func init() {
+	proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value)
 	proto.RegisterType((*Message)(nil), "proto3_proto.Message")
 	proto.RegisterMapType((map[string]*test_proto.SubDefaults)(nil), "proto3_proto.Message.Proto2ValueEntry")
 	proto.RegisterMapType((map[string]string)(nil), "proto3_proto.Message.StringMapEntry")
@@ -545,12 +512,11 @@
 	proto.RegisterType((*TestUTF8)(nil), "proto3_proto.TestUTF8")
 	proto.RegisterMapType((map[string]int64)(nil), "proto3_proto.TestUTF8.MapKeyEntry")
 	proto.RegisterMapType((map[int64]string)(nil), "proto3_proto.TestUTF8.MapValueEntry")
-	proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value)
 }
 
-func init() { proto.RegisterFile("proto3_proto/proto3.proto", fileDescriptor_proto3_78ae00cd7e6e5e35) }
+func init() { proto.RegisterFile("proto3_proto/proto3.proto", fileDescriptor_1c50d9b824d4ac38) }
 
-var fileDescriptor_proto3_78ae00cd7e6e5e35 = []byte{
+var fileDescriptor_1c50d9b824d4ac38 = []byte{
 	// 896 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x6f, 0x6f, 0xdb, 0xb6,
 	0x13, 0xae, 0x2c, 0xff, 0x91, 0xcf, 0x76, 0xea, 0x1f, 0x7f, 0x6e, 0xc7, 0x7a, 0x1b, 0xa0, 0x79,
diff --git a/proto/size2_test.go b/proto/size2_test.go
index 7846b06..0b8eb85 100644
--- a/proto/size2_test.go
+++ b/proto/size2_test.go
@@ -32,6 +32,7 @@
 package proto
 
 import (
+	"math"
 	"testing"
 )
 
@@ -51,8 +52,8 @@
 		{128, 2},
 		{16383, 2},
 		{16384, 3},
-		{1<<63 - 1, 9},
-		{1 << 63, 10},
+		{math.MaxInt64, 9},
+		{math.MaxInt64 + 1, 10},
 	}
 	for _, tc := range testCases {
 		size := SizeVarint(tc.n)
diff --git a/proto/table_marshal.go b/proto/table_marshal.go
index 9eda845..5cb11fa 100644
--- a/proto/table_marshal.go
+++ b/proto/table_marshal.go
@@ -87,6 +87,7 @@
 	sizer     sizer
 	marshaler marshaler
 	isptr     bool // elem is pointer typed, thus interface of this type is a direct interface (extension only)
+	deref     bool // dereference the pointer before operating on it; implies isptr
 }
 
 var (
@@ -231,7 +232,7 @@
 		return b, err
 	}
 
-	var err, errreq error
+	var err, errLater error
 	// The old marshaler encodes extensions at beginning.
 	if u.extensions.IsValid() {
 		e := ptr.offset(u.extensions).toExtensions()
@@ -252,11 +253,13 @@
 		}
 	}
 	for _, f := range u.fields {
-		if f.required && errreq == nil {
+		if f.required {
 			if ptr.offset(f.field).getPointer().isNil() {
 				// Required field is not set.
 				// We record the error but keep going, to give a complete marshaling.
-				errreq = &RequiredNotSetError{f.name}
+				if errLater == nil {
+					errLater = &RequiredNotSetError{f.name}
+				}
 				continue
 			}
 		}
@@ -269,8 +272,8 @@
 			if err1, ok := err.(*RequiredNotSetError); ok {
 				// Required field in submessage is not set.
 				// We record the error but keep going, to give a complete marshaling.
-				if errreq == nil {
-					errreq = &RequiredNotSetError{f.name + "." + err1.field}
+				if errLater == nil {
+					errLater = &RequiredNotSetError{f.name + "." + err1.field}
 				}
 				continue
 			}
@@ -278,8 +281,11 @@
 				err = errors.New("proto: repeated field " + f.name + " has nil element")
 			}
 			if err == errInvalidUTF8 {
-				fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name
-				err = fmt.Errorf("proto: string field %q contains invalid UTF-8", fullName)
+				if errLater == nil {
+					fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name
+					errLater = &invalidUTF8Error{fullName}
+				}
+				continue
 			}
 			return b, err
 		}
@@ -288,7 +294,7 @@
 		s := *ptr.offset(u.unrecognized).toBytes()
 		b = append(b, s...)
 	}
-	return b, errreq
+	return b, errLater
 }
 
 // computeMarshalInfo initializes the marshal info.
@@ -315,8 +321,11 @@
 
 	// get oneof implementers
 	var oneofImplementers []interface{}
-	if m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok {
+	switch m := reflect.Zero(reflect.PtrTo(t)).Interface().(type) {
+	case oneofFuncsIface:
 		_, _, _, oneofImplementers = m.XXX_OneofFuncs()
+	case oneofWrappersIface:
+		oneofImplementers = m.XXX_OneofWrappers()
 	}
 
 	n := t.NumField()
@@ -402,13 +411,22 @@
 		panic("tag is not an integer")
 	}
 	wt := wiretype(tags[0])
+	if t.Kind() == reflect.Ptr && t.Elem().Kind() != reflect.Struct {
+		t = t.Elem()
+	}
 	sizer, marshaler := typeMarshaler(t, tags, false, false)
+	var deref bool
+	if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 {
+		t = reflect.PtrTo(t)
+		deref = true
+	}
 	e = &marshalElemInfo{
 		wiretag:   uint64(tag)<<3 | wt,
 		tagsize:   SizeVarint(uint64(tag) << 3),
 		sizer:     sizer,
 		marshaler: marshaler,
 		isptr:     t.Kind() == reflect.Ptr,
+		deref:     deref,
 	}
 
 	// update cache
@@ -443,7 +461,7 @@
 
 func (fi *marshalFieldInfo) computeOneofFieldInfo(f *reflect.StructField, oneofImplementers []interface{}) {
 	fi.field = toField(f)
-	fi.wiretag = 1<<31 - 1 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire.
+	fi.wiretag = math.MaxInt32 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire.
 	fi.isPointer = true
 	fi.sizer, fi.marshaler = makeOneOfMarshaler(fi, f)
 	fi.oneofElems = make(map[reflect.Type]*marshalElemInfo)
@@ -471,10 +489,6 @@
 	}
 }
 
-type oneofMessage interface {
-	XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{})
-}
-
 // wiretype returns the wire encoding of the type.
 func wiretype(encoding string) uint64 {
 	switch encoding {
@@ -2038,52 +2052,68 @@
 	return b, nil
 }
 func appendUTF8StringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+	var invalidUTF8 bool
 	v := *ptr.toString()
 	if !utf8.ValidString(v) {
-		return nil, errInvalidUTF8
+		invalidUTF8 = true
 	}
 	b = appendVarint(b, wiretag)
 	b = appendVarint(b, uint64(len(v)))
 	b = append(b, v...)
+	if invalidUTF8 {
+		return b, errInvalidUTF8
+	}
 	return b, nil
 }
 func appendUTF8StringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+	var invalidUTF8 bool
 	v := *ptr.toString()
 	if v == "" {
 		return b, nil
 	}
 	if !utf8.ValidString(v) {
-		return nil, errInvalidUTF8
+		invalidUTF8 = true
 	}
 	b = appendVarint(b, wiretag)
 	b = appendVarint(b, uint64(len(v)))
 	b = append(b, v...)
+	if invalidUTF8 {
+		return b, errInvalidUTF8
+	}
 	return b, nil
 }
 func appendUTF8StringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+	var invalidUTF8 bool
 	p := *ptr.toStringPtr()
 	if p == nil {
 		return b, nil
 	}
 	v := *p
 	if !utf8.ValidString(v) {
-		return nil, errInvalidUTF8
+		invalidUTF8 = true
 	}
 	b = appendVarint(b, wiretag)
 	b = appendVarint(b, uint64(len(v)))
 	b = append(b, v...)
+	if invalidUTF8 {
+		return b, errInvalidUTF8
+	}
 	return b, nil
 }
 func appendUTF8StringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+	var invalidUTF8 bool
 	s := *ptr.toStringSlice()
 	for _, v := range s {
 		if !utf8.ValidString(v) {
-			return nil, errInvalidUTF8
+			invalidUTF8 = true
 		}
 		b = appendVarint(b, wiretag)
 		b = appendVarint(b, uint64(len(v)))
 		b = append(b, v...)
 	}
+	if invalidUTF8 {
+		return b, errInvalidUTF8
+	}
 	return b, nil
 }
 func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
@@ -2162,7 +2192,8 @@
 		},
 		func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
 			s := ptr.getPointerSlice()
-			var err, errreq error
+			var err error
+			var nerr nonFatal
 			for _, v := range s {
 				if v.isNil() {
 					return b, errRepeatedHasNil
@@ -2170,22 +2201,14 @@
 				b = appendVarint(b, wiretag) // start group
 				b, err = u.marshal(b, v, deterministic)
 				b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group
-				if err != nil {
-					if _, ok := err.(*RequiredNotSetError); ok {
-						// Required field in submessage is not set.
-						// We record the error but keep going, to give a complete marshaling.
-						if errreq == nil {
-							errreq = err
-						}
-						continue
-					}
+				if !nerr.Merge(err) {
 					if err == ErrNil {
 						err = errRepeatedHasNil
 					}
 					return b, err
 				}
 			}
-			return b, errreq
+			return b, nerr.E
 		}
 }
 
@@ -2229,7 +2252,8 @@
 		},
 		func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
 			s := ptr.getPointerSlice()
-			var err, errreq error
+			var err error
+			var nerr nonFatal
 			for _, v := range s {
 				if v.isNil() {
 					return b, errRepeatedHasNil
@@ -2239,22 +2263,14 @@
 				b = appendVarint(b, uint64(siz))
 				b, err = u.marshal(b, v, deterministic)
 
-				if err != nil {
-					if _, ok := err.(*RequiredNotSetError); ok {
-						// Required field in submessage is not set.
-						// We record the error but keep going, to give a complete marshaling.
-						if errreq == nil {
-							errreq = err
-						}
-						continue
-					}
+				if !nerr.Merge(err) {
 					if err == ErrNil {
 						err = errRepeatedHasNil
 					}
 					return b, err
 				}
 			}
-			return b, errreq
+			return b, nerr.E
 		}
 }
 
@@ -2278,14 +2294,33 @@
 	// value.
 	// Key cannot be pointer-typed.
 	valIsPtr := valType.Kind() == reflect.Ptr
+
+	// If value is a message with nested maps, calling
+	// valSizer in marshal may be quadratic. We should use
+	// cached version in marshal (but not in size).
+	// If value is not message type, we don't have size cache,
+	// but it cannot be nested either. Just use valSizer.
+	valCachedSizer := valSizer
+	if valIsPtr && valType.Elem().Kind() == reflect.Struct {
+		u := getMarshalInfo(valType.Elem())
+		valCachedSizer = func(ptr pointer, tagsize int) int {
+			// Same as message sizer, but use cache.
+			p := ptr.getPointer()
+			if p.isNil() {
+				return 0
+			}
+			siz := u.cachedsize(p)
+			return siz + SizeVarint(uint64(siz)) + tagsize
+		}
+	}
 	return func(ptr pointer, tagsize int) int {
 			m := ptr.asPointerTo(t).Elem() // the map
 			n := 0
 			for _, k := range m.MapKeys() {
 				ki := k.Interface()
 				vi := m.MapIndex(k).Interface()
-				kaddr := toAddrPointer(&ki, false)             // pointer to key
-				vaddr := toAddrPointer(&vi, valIsPtr)          // pointer to value
+				kaddr := toAddrPointer(&ki, false, false)      // pointer to key
+				vaddr := toAddrPointer(&vi, valIsPtr, false)   // pointer to value
 				siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
 				n += siz + SizeVarint(uint64(siz)) + tagsize
 			}
@@ -2298,24 +2333,26 @@
 			if len(keys) > 1 && deterministic {
 				sort.Sort(mapKeys(keys))
 			}
+
+			var nerr nonFatal
 			for _, k := range keys {
 				ki := k.Interface()
 				vi := m.MapIndex(k).Interface()
-				kaddr := toAddrPointer(&ki, false)    // pointer to key
-				vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value
+				kaddr := toAddrPointer(&ki, false, false)    // pointer to key
+				vaddr := toAddrPointer(&vi, valIsPtr, false) // pointer to value
 				b = appendVarint(b, tag)
-				siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
+				siz := keySizer(kaddr, 1) + valCachedSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
 				b = appendVarint(b, uint64(siz))
 				b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic)
-				if err != nil {
+				if !nerr.Merge(err) {
 					return b, err
 				}
 				b, err = valMarshaler(b, vaddr, valWireTag, deterministic)
-				if err != nil && err != ErrNil { // allow nil value in map
+				if err != ErrNil && !nerr.Merge(err) { // allow nil value in map
 					return b, err
 				}
 			}
-			return b, nil
+			return b, nerr.E
 		}
 }
 
@@ -2371,7 +2408,7 @@
 		// the last time this function was called.
 		ei := u.getExtElemInfo(e.desc)
 		v := e.value
-		p := toAddrPointer(&v, ei.isptr)
+		p := toAddrPointer(&v, ei.isptr, ei.deref)
 		n += ei.sizer(p, ei.tagsize)
 	}
 	mu.Unlock()
@@ -2388,6 +2425,7 @@
 	defer mu.Unlock()
 
 	var err error
+	var nerr nonFatal
 
 	// Fast-path for common cases: zero or one extensions.
 	// Don't bother sorting the keys.
@@ -2405,13 +2443,13 @@
 
 			ei := u.getExtElemInfo(e.desc)
 			v := e.value
-			p := toAddrPointer(&v, ei.isptr)
+			p := toAddrPointer(&v, ei.isptr, ei.deref)
 			b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
-			if err != nil {
+			if !nerr.Merge(err) {
 				return b, err
 			}
 		}
-		return b, nil
+		return b, nerr.E
 	}
 
 	// Sort the keys to provide a deterministic encoding.
@@ -2436,13 +2474,13 @@
 
 		ei := u.getExtElemInfo(e.desc)
 		v := e.value
-		p := toAddrPointer(&v, ei.isptr)
+		p := toAddrPointer(&v, ei.isptr, ei.deref)
 		b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
-		if err != nil {
+		if !nerr.Merge(err) {
 			return b, err
 		}
 	}
-	return b, nil
+	return b, nerr.E
 }
 
 // message set format is:
@@ -2481,7 +2519,7 @@
 
 		ei := u.getExtElemInfo(e.desc)
 		v := e.value
-		p := toAddrPointer(&v, ei.isptr)
+		p := toAddrPointer(&v, ei.isptr, ei.deref)
 		n += ei.sizer(p, 1) // message, tag = 3 (size=1)
 	}
 	mu.Unlock()
@@ -2499,6 +2537,7 @@
 	defer mu.Unlock()
 
 	var err error
+	var nerr nonFatal
 
 	// Fast-path for common cases: zero or one extensions.
 	// Don't bother sorting the keys.
@@ -2523,14 +2562,14 @@
 
 			ei := u.getExtElemInfo(e.desc)
 			v := e.value
-			p := toAddrPointer(&v, ei.isptr)
+			p := toAddrPointer(&v, ei.isptr, ei.deref)
 			b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
-			if err != nil {
+			if !nerr.Merge(err) {
 				return b, err
 			}
 			b = append(b, 1<<3|WireEndGroup)
 		}
-		return b, nil
+		return b, nerr.E
 	}
 
 	// Sort the keys to provide a deterministic encoding.
@@ -2561,14 +2600,14 @@
 
 		ei := u.getExtElemInfo(e.desc)
 		v := e.value
-		p := toAddrPointer(&v, ei.isptr)
+		p := toAddrPointer(&v, ei.isptr, ei.deref)
 		b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
 		b = append(b, 1<<3|WireEndGroup)
-		if err != nil {
+		if !nerr.Merge(err) {
 			return b, err
 		}
 	}
-	return b, nil
+	return b, nerr.E
 }
 
 // sizeV1Extensions computes the size of encoded data for a V1-API extension field.
@@ -2591,7 +2630,7 @@
 
 		ei := u.getExtElemInfo(e.desc)
 		v := e.value
-		p := toAddrPointer(&v, ei.isptr)
+		p := toAddrPointer(&v, ei.isptr, ei.deref)
 		n += ei.sizer(p, ei.tagsize)
 	}
 	return n
@@ -2611,6 +2650,7 @@
 	sort.Ints(keys)
 
 	var err error
+	var nerr nonFatal
 	for _, k := range keys {
 		e := m[int32(k)]
 		if e.value == nil || e.desc == nil {
@@ -2625,13 +2665,13 @@
 
 		ei := u.getExtElemInfo(e.desc)
 		v := e.value
-		p := toAddrPointer(&v, ei.isptr)
+		p := toAddrPointer(&v, ei.isptr, ei.deref)
 		b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
-		if err != nil {
+		if !nerr.Merge(err) {
 			return b, err
 		}
 	}
-	return b, nil
+	return b, nerr.E
 }
 
 // newMarshaler is the interface representing objects that can marshal themselves.
diff --git a/proto/table_unmarshal.go b/proto/table_unmarshal.go
index 90ec6c2..acee2fc 100644
--- a/proto/table_unmarshal.go
+++ b/proto/table_unmarshal.go
@@ -136,10 +136,10 @@
 		u.computeUnmarshalInfo()
 	}
 	if u.isMessageSet {
-		return UnmarshalMessageSet(b, m.offset(u.extensions).toExtensions())
+		return unmarshalMessageSet(b, m.offset(u.extensions).toExtensions())
 	}
-	var reqMask uint64            // bitmask of required fields we've seen.
-	var rnse *RequiredNotSetError // an instance of a RequiredNotSetError returned by a submessage.
+	var reqMask uint64 // bitmask of required fields we've seen.
+	var errLater error
 	for len(b) > 0 {
 		// Read tag and wire type.
 		// Special case 1 and 2 byte varints.
@@ -178,14 +178,19 @@
 			if r, ok := err.(*RequiredNotSetError); ok {
 				// Remember this error, but keep parsing. We need to produce
 				// a full parse even if a required field is missing.
-				rnse = r
+				if errLater == nil {
+					errLater = r
+				}
 				reqMask |= f.reqMask
 				continue
 			}
 			if err != errInternalBadWireType {
 				if err == errInvalidUTF8 {
-					fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name
-					err = fmt.Errorf("proto: string field %q contains invalid UTF-8", fullName)
+					if errLater == nil {
+						fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name
+						errLater = &invalidUTF8Error{fullName}
+					}
+					continue
 				}
 				return err
 			}
@@ -245,20 +250,16 @@
 			emap[int32(tag)] = e
 		}
 	}
-	if rnse != nil {
-		// A required field of a submessage/group is missing. Return that error.
-		return rnse
-	}
-	if reqMask != u.reqMask {
+	if reqMask != u.reqMask && errLater == nil {
 		// A required field of this message is missing.
 		for _, n := range u.reqFields {
 			if reqMask&1 == 0 {
-				return &RequiredNotSetError{n}
+				errLater = &RequiredNotSetError{n}
 			}
 			reqMask >>= 1
 		}
 	}
-	return nil
+	return errLater
 }
 
 // computeUnmarshalInfo fills in u with information for use
@@ -361,46 +362,48 @@
 	}
 
 	// Find any types associated with oneof fields.
-	// TODO: XXX_OneofFuncs returns more info than we need.  Get rid of some of it?
-	fn := reflect.Zero(reflect.PtrTo(t)).MethodByName("XXX_OneofFuncs")
-	if fn.IsValid() {
-		res := fn.Call(nil)[3] // last return value from XXX_OneofFuncs: []interface{}
-		for i := res.Len() - 1; i >= 0; i-- {
-			v := res.Index(i)                             // interface{}
-			tptr := reflect.ValueOf(v.Interface()).Type() // *Msg_X
-			typ := tptr.Elem()                            // Msg_X
+	var oneofImplementers []interface{}
+	switch m := reflect.Zero(reflect.PtrTo(t)).Interface().(type) {
+	case oneofFuncsIface:
+		_, _, _, oneofImplementers = m.XXX_OneofFuncs()
+	case oneofWrappersIface:
+		oneofImplementers = m.XXX_OneofWrappers()
+	}
+	for _, v := range oneofImplementers {
+		tptr := reflect.TypeOf(v) // *Msg_X
+		typ := tptr.Elem()        // Msg_X
 
-			f := typ.Field(0) // oneof implementers have one field
-			baseUnmarshal := fieldUnmarshaler(&f)
-			tags := strings.Split(f.Tag.Get("protobuf"), ",")
-			fieldNum, err := strconv.Atoi(tags[1])
-			if err != nil {
-				panic("protobuf tag field not an integer: " + tags[1])
-			}
-			var name string
-			for _, tag := range tags {
-				if strings.HasPrefix(tag, "name=") {
-					name = strings.TrimPrefix(tag, "name=")
-					break
-				}
-			}
-
-			// Find the oneof field that this struct implements.
-			// Might take O(n^2) to process all of the oneofs, but who cares.
-			for _, of := range oneofFields {
-				if tptr.Implements(of.ityp) {
-					// We have found the corresponding interface for this struct.
-					// That lets us know where this struct should be stored
-					// when we encounter it during unmarshaling.
-					unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal)
-					u.setTag(fieldNum, of.field, unmarshal, 0, name)
-				}
+		f := typ.Field(0) // oneof implementers have one field
+		baseUnmarshal := fieldUnmarshaler(&f)
+		tags := strings.Split(f.Tag.Get("protobuf"), ",")
+		fieldNum, err := strconv.Atoi(tags[1])
+		if err != nil {
+			panic("protobuf tag field not an integer: " + tags[1])
+		}
+		var name string
+		for _, tag := range tags {
+			if strings.HasPrefix(tag, "name=") {
+				name = strings.TrimPrefix(tag, "name=")
+				break
 			}
 		}
+
+		// Find the oneof field that this struct implements.
+		// Might take O(n^2) to process all of the oneofs, but who cares.
+		for _, of := range oneofFields {
+			if tptr.Implements(of.ityp) {
+				// We have found the corresponding interface for this struct.
+				// That lets us know where this struct should be stored
+				// when we encounter it during unmarshaling.
+				unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal)
+				u.setTag(fieldNum, of.field, unmarshal, 0, name)
+			}
+		}
+
 	}
 
 	// Get extension ranges, if any.
-	fn = reflect.Zero(reflect.PtrTo(t)).MethodByName("ExtensionRangeArray")
+	fn := reflect.Zero(reflect.PtrTo(t)).MethodByName("ExtensionRangeArray")
 	if fn.IsValid() {
 		if !u.extensions.IsValid() && !u.oldExtensions.IsValid() {
 			panic("a message with extensions, but no extensions field in " + t.Name())
@@ -1529,10 +1532,10 @@
 		return nil, io.ErrUnexpectedEOF
 	}
 	v := string(b[:x])
-	if !utf8.ValidString(v) {
-		return nil, errInvalidUTF8
-	}
 	*f.toString() = v
+	if !utf8.ValidString(v) {
+		return b[x:], errInvalidUTF8
+	}
 	return b[x:], nil
 }
 
@@ -1549,10 +1552,10 @@
 		return nil, io.ErrUnexpectedEOF
 	}
 	v := string(b[:x])
-	if !utf8.ValidString(v) {
-		return nil, errInvalidUTF8
-	}
 	*f.toStringPtr() = &v
+	if !utf8.ValidString(v) {
+		return b[x:], errInvalidUTF8
+	}
 	return b[x:], nil
 }
 
@@ -1569,11 +1572,11 @@
 		return nil, io.ErrUnexpectedEOF
 	}
 	v := string(b[:x])
-	if !utf8.ValidString(v) {
-		return nil, errInvalidUTF8
-	}
 	s := f.toStringSlice()
 	*s = append(*s, v)
+	if !utf8.ValidString(v) {
+		return b[x:], errInvalidUTF8
+	}
 	return b[x:], nil
 }
 
@@ -1755,6 +1758,7 @@
 		// Maps will be somewhat slow. Oh well.
 
 		// Read key and value from data.
+		var nerr nonFatal
 		k := reflect.New(kt)
 		v := reflect.New(vt)
 		for len(b) > 0 {
@@ -1775,7 +1779,7 @@
 				err = errInternalBadWireType // skip unknown tag
 			}
 
-			if err == nil {
+			if nerr.Merge(err) {
 				continue
 			}
 			if err != errInternalBadWireType {
@@ -1798,7 +1802,7 @@
 		// Insert into map.
 		m.SetMapIndex(k.Elem(), v.Elem())
 
-		return r, nil
+		return r, nerr.E
 	}
 }
 
@@ -1824,15 +1828,16 @@
 		// Unmarshal data into holder.
 		// We unmarshal into the first field of the holder object.
 		var err error
+		var nerr nonFatal
 		b, err = unmarshal(b, valToPointer(v).offset(field0), w)
-		if err != nil {
+		if !nerr.Merge(err) {
 			return nil, err
 		}
 
 		// Write pointer to holder into target field.
 		f.asPointerTo(ityp).Elem().Set(v)
 
-		return b, nil
+		return b, nerr.E
 	}
 }
 
@@ -1945,7 +1950,7 @@
 // If there is an error, it returns 0,0.
 func decodeVarint(b []byte) (uint64, int) {
 	var x, y uint64
-	if len(b) <= 0 {
+	if len(b) == 0 {
 		goto bad
 	}
 	x = uint64(b[0])
diff --git a/proto/test_proto/test.pb.go b/proto/test_proto/test.pb.go
index 570227b..624e834 100644
--- a/proto/test_proto/test.pb.go
+++ b/proto/test_proto/test.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: test_proto/test.proto
 
-package test_proto // import "github.com/golang/protobuf/proto/test_proto"
+package test_proto
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type FOO int32
 
@@ -27,6 +29,7 @@
 var FOO_name = map[int32]string{
 	1: "FOO1",
 }
+
 var FOO_value = map[string]int32{
 	"FOO1": 1,
 }
@@ -36,9 +39,11 @@
 	*p = x
 	return p
 }
+
 func (x FOO) String() string {
 	return proto.EnumName(FOO_name, int32(x))
 }
+
 func (x *FOO) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO")
 	if err != nil {
@@ -47,8 +52,9 @@
 	*x = FOO(value)
 	return nil
 }
+
 func (FOO) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{0}
+	return fileDescriptor_8ca34d01332f1402, []int{0}
 }
 
 // An enum, for completeness.
@@ -89,6 +95,7 @@
 	11: "TABLE",
 	12: "FUNCTION",
 }
+
 var GoTest_KIND_value = map[string]int32{
 	"VOID":        0,
 	"BOOL":        1,
@@ -110,9 +117,11 @@
 	*p = x
 	return p
 }
+
 func (x GoTest_KIND) String() string {
 	return proto.EnumName(GoTest_KIND_name, int32(x))
 }
+
 func (x *GoTest_KIND) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND")
 	if err != nil {
@@ -121,8 +130,9 @@
 	*x = GoTest_KIND(value)
 	return nil
 }
+
 func (GoTest_KIND) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{2, 0}
+	return fileDescriptor_8ca34d01332f1402, []int{2, 0}
 }
 
 type MyMessage_Color int32
@@ -138,6 +148,7 @@
 	1: "GREEN",
 	2: "BLUE",
 }
+
 var MyMessage_Color_value = map[string]int32{
 	"RED":   0,
 	"GREEN": 1,
@@ -149,9 +160,11 @@
 	*p = x
 	return p
 }
+
 func (x MyMessage_Color) String() string {
 	return proto.EnumName(MyMessage_Color_name, int32(x))
 }
+
 func (x *MyMessage_Color) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color")
 	if err != nil {
@@ -160,8 +173,9 @@
 	*x = MyMessage_Color(value)
 	return nil
 }
+
 func (MyMessage_Color) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{13, 0}
+	return fileDescriptor_8ca34d01332f1402, []int{13, 0}
 }
 
 type DefaultsMessage_DefaultsEnum int32
@@ -177,6 +191,7 @@
 	1: "ONE",
 	2: "TWO",
 }
+
 var DefaultsMessage_DefaultsEnum_value = map[string]int32{
 	"ZERO": 0,
 	"ONE":  1,
@@ -188,9 +203,11 @@
 	*p = x
 	return p
 }
+
 func (x DefaultsMessage_DefaultsEnum) String() string {
 	return proto.EnumName(DefaultsMessage_DefaultsEnum_name, int32(x))
 }
+
 func (x *DefaultsMessage_DefaultsEnum) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(DefaultsMessage_DefaultsEnum_value, data, "DefaultsMessage_DefaultsEnum")
 	if err != nil {
@@ -199,8 +216,9 @@
 	*x = DefaultsMessage_DefaultsEnum(value)
 	return nil
 }
+
 func (DefaultsMessage_DefaultsEnum) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{16, 0}
+	return fileDescriptor_8ca34d01332f1402, []int{16, 0}
 }
 
 type Defaults_Color int32
@@ -216,6 +234,7 @@
 	1: "GREEN",
 	2: "BLUE",
 }
+
 var Defaults_Color_value = map[string]int32{
 	"RED":   0,
 	"GREEN": 1,
@@ -227,9 +246,11 @@
 	*p = x
 	return p
 }
+
 func (x Defaults_Color) String() string {
 	return proto.EnumName(Defaults_Color_name, int32(x))
 }
+
 func (x *Defaults_Color) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color")
 	if err != nil {
@@ -238,8 +259,9 @@
 	*x = Defaults_Color(value)
 	return nil
 }
+
 func (Defaults_Color) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{21, 0}
+	return fileDescriptor_8ca34d01332f1402, []int{21, 0}
 }
 
 type RepeatedEnum_Color int32
@@ -251,6 +273,7 @@
 var RepeatedEnum_Color_name = map[int32]string{
 	1: "RED",
 }
+
 var RepeatedEnum_Color_value = map[string]int32{
 	"RED": 1,
 }
@@ -260,9 +283,11 @@
 	*p = x
 	return p
 }
+
 func (x RepeatedEnum_Color) String() string {
 	return proto.EnumName(RepeatedEnum_Color_name, int32(x))
 }
+
 func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color")
 	if err != nil {
@@ -271,8 +296,9 @@
 	*x = RepeatedEnum_Color(value)
 	return nil
 }
+
 func (RepeatedEnum_Color) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{23, 0}
+	return fileDescriptor_8ca34d01332f1402, []int{23, 0}
 }
 
 type GoEnum struct {
@@ -286,16 +312,17 @@
 func (m *GoEnum) String() string { return proto.CompactTextString(m) }
 func (*GoEnum) ProtoMessage()    {}
 func (*GoEnum) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{0}
+	return fileDescriptor_8ca34d01332f1402, []int{0}
 }
+
 func (m *GoEnum) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_GoEnum.Unmarshal(m, b)
 }
 func (m *GoEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_GoEnum.Marshal(b, m, deterministic)
 }
-func (dst *GoEnum) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GoEnum.Merge(dst, src)
+func (m *GoEnum) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GoEnum.Merge(m, src)
 }
 func (m *GoEnum) XXX_Size() int {
 	return xxx_messageInfo_GoEnum.Size(m)
@@ -325,16 +352,17 @@
 func (m *GoTestField) String() string { return proto.CompactTextString(m) }
 func (*GoTestField) ProtoMessage()    {}
 func (*GoTestField) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{1}
+	return fileDescriptor_8ca34d01332f1402, []int{1}
 }
+
 func (m *GoTestField) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_GoTestField.Unmarshal(m, b)
 }
 func (m *GoTestField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_GoTestField.Marshal(b, m, deterministic)
 }
-func (dst *GoTestField) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GoTestField.Merge(dst, src)
+func (m *GoTestField) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GoTestField.Merge(m, src)
 }
 func (m *GoTestField) XXX_Size() int {
 	return xxx_messageInfo_GoTestField.Size(m)
@@ -458,16 +486,17 @@
 func (m *GoTest) String() string { return proto.CompactTextString(m) }
 func (*GoTest) ProtoMessage()    {}
 func (*GoTest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{2}
+	return fileDescriptor_8ca34d01332f1402, []int{2}
 }
+
 func (m *GoTest) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_GoTest.Unmarshal(m, b)
 }
 func (m *GoTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_GoTest.Marshal(b, m, deterministic)
 }
-func (dst *GoTest) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GoTest.Merge(dst, src)
+func (m *GoTest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GoTest.Merge(m, src)
 }
 func (m *GoTest) XXX_Size() int {
 	return xxx_messageInfo_GoTest.Size(m)
@@ -1082,16 +1111,17 @@
 func (m *GoTest_RequiredGroup) String() string { return proto.CompactTextString(m) }
 func (*GoTest_RequiredGroup) ProtoMessage()    {}
 func (*GoTest_RequiredGroup) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{2, 0}
+	return fileDescriptor_8ca34d01332f1402, []int{2, 0}
 }
+
 func (m *GoTest_RequiredGroup) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_GoTest_RequiredGroup.Unmarshal(m, b)
 }
 func (m *GoTest_RequiredGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_GoTest_RequiredGroup.Marshal(b, m, deterministic)
 }
-func (dst *GoTest_RequiredGroup) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GoTest_RequiredGroup.Merge(dst, src)
+func (m *GoTest_RequiredGroup) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GoTest_RequiredGroup.Merge(m, src)
 }
 func (m *GoTest_RequiredGroup) XXX_Size() int {
 	return xxx_messageInfo_GoTest_RequiredGroup.Size(m)
@@ -1120,16 +1150,17 @@
 func (m *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(m) }
 func (*GoTest_RepeatedGroup) ProtoMessage()    {}
 func (*GoTest_RepeatedGroup) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{2, 1}
+	return fileDescriptor_8ca34d01332f1402, []int{2, 1}
 }
+
 func (m *GoTest_RepeatedGroup) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_GoTest_RepeatedGroup.Unmarshal(m, b)
 }
 func (m *GoTest_RepeatedGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_GoTest_RepeatedGroup.Marshal(b, m, deterministic)
 }
-func (dst *GoTest_RepeatedGroup) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GoTest_RepeatedGroup.Merge(dst, src)
+func (m *GoTest_RepeatedGroup) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GoTest_RepeatedGroup.Merge(m, src)
 }
 func (m *GoTest_RepeatedGroup) XXX_Size() int {
 	return xxx_messageInfo_GoTest_RepeatedGroup.Size(m)
@@ -1158,16 +1189,17 @@
 func (m *GoTest_OptionalGroup) String() string { return proto.CompactTextString(m) }
 func (*GoTest_OptionalGroup) ProtoMessage()    {}
 func (*GoTest_OptionalGroup) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{2, 2}
+	return fileDescriptor_8ca34d01332f1402, []int{2, 2}
 }
+
 func (m *GoTest_OptionalGroup) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_GoTest_OptionalGroup.Unmarshal(m, b)
 }
 func (m *GoTest_OptionalGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_GoTest_OptionalGroup.Marshal(b, m, deterministic)
 }
-func (dst *GoTest_OptionalGroup) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GoTest_OptionalGroup.Merge(dst, src)
+func (m *GoTest_OptionalGroup) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GoTest_OptionalGroup.Merge(m, src)
 }
 func (m *GoTest_OptionalGroup) XXX_Size() int {
 	return xxx_messageInfo_GoTest_OptionalGroup.Size(m)
@@ -1197,16 +1229,17 @@
 func (m *GoTestRequiredGroupField) String() string { return proto.CompactTextString(m) }
 func (*GoTestRequiredGroupField) ProtoMessage()    {}
 func (*GoTestRequiredGroupField) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{3}
+	return fileDescriptor_8ca34d01332f1402, []int{3}
 }
+
 func (m *GoTestRequiredGroupField) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_GoTestRequiredGroupField.Unmarshal(m, b)
 }
 func (m *GoTestRequiredGroupField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_GoTestRequiredGroupField.Marshal(b, m, deterministic)
 }
-func (dst *GoTestRequiredGroupField) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GoTestRequiredGroupField.Merge(dst, src)
+func (m *GoTestRequiredGroupField) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GoTestRequiredGroupField.Merge(m, src)
 }
 func (m *GoTestRequiredGroupField) XXX_Size() int {
 	return xxx_messageInfo_GoTestRequiredGroupField.Size(m)
@@ -1235,16 +1268,17 @@
 func (m *GoTestRequiredGroupField_Group) String() string { return proto.CompactTextString(m) }
 func (*GoTestRequiredGroupField_Group) ProtoMessage()    {}
 func (*GoTestRequiredGroupField_Group) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{3, 0}
+	return fileDescriptor_8ca34d01332f1402, []int{3, 0}
 }
+
 func (m *GoTestRequiredGroupField_Group) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_GoTestRequiredGroupField_Group.Unmarshal(m, b)
 }
 func (m *GoTestRequiredGroupField_Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_GoTestRequiredGroupField_Group.Marshal(b, m, deterministic)
 }
-func (dst *GoTestRequiredGroupField_Group) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GoTestRequiredGroupField_Group.Merge(dst, src)
+func (m *GoTestRequiredGroupField_Group) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GoTestRequiredGroupField_Group.Merge(m, src)
 }
 func (m *GoTestRequiredGroupField_Group) XXX_Size() int {
 	return xxx_messageInfo_GoTestRequiredGroupField_Group.Size(m)
@@ -1280,16 +1314,17 @@
 func (m *GoSkipTest) String() string { return proto.CompactTextString(m) }
 func (*GoSkipTest) ProtoMessage()    {}
 func (*GoSkipTest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{4}
+	return fileDescriptor_8ca34d01332f1402, []int{4}
 }
+
 func (m *GoSkipTest) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_GoSkipTest.Unmarshal(m, b)
 }
 func (m *GoSkipTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_GoSkipTest.Marshal(b, m, deterministic)
 }
-func (dst *GoSkipTest) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GoSkipTest.Merge(dst, src)
+func (m *GoSkipTest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GoSkipTest.Merge(m, src)
 }
 func (m *GoSkipTest) XXX_Size() int {
 	return xxx_messageInfo_GoSkipTest.Size(m)
@@ -1347,16 +1382,17 @@
 func (m *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(m) }
 func (*GoSkipTest_SkipGroup) ProtoMessage()    {}
 func (*GoSkipTest_SkipGroup) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{4, 0}
+	return fileDescriptor_8ca34d01332f1402, []int{4, 0}
 }
+
 func (m *GoSkipTest_SkipGroup) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_GoSkipTest_SkipGroup.Unmarshal(m, b)
 }
 func (m *GoSkipTest_SkipGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_GoSkipTest_SkipGroup.Marshal(b, m, deterministic)
 }
-func (dst *GoSkipTest_SkipGroup) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GoSkipTest_SkipGroup.Merge(dst, src)
+func (m *GoSkipTest_SkipGroup) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GoSkipTest_SkipGroup.Merge(m, src)
 }
 func (m *GoSkipTest_SkipGroup) XXX_Size() int {
 	return xxx_messageInfo_GoSkipTest_SkipGroup.Size(m)
@@ -1394,16 +1430,17 @@
 func (m *NonPackedTest) String() string { return proto.CompactTextString(m) }
 func (*NonPackedTest) ProtoMessage()    {}
 func (*NonPackedTest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{5}
+	return fileDescriptor_8ca34d01332f1402, []int{5}
 }
+
 func (m *NonPackedTest) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_NonPackedTest.Unmarshal(m, b)
 }
 func (m *NonPackedTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_NonPackedTest.Marshal(b, m, deterministic)
 }
-func (dst *NonPackedTest) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_NonPackedTest.Merge(dst, src)
+func (m *NonPackedTest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_NonPackedTest.Merge(m, src)
 }
 func (m *NonPackedTest) XXX_Size() int {
 	return xxx_messageInfo_NonPackedTest.Size(m)
@@ -1432,16 +1469,17 @@
 func (m *PackedTest) String() string { return proto.CompactTextString(m) }
 func (*PackedTest) ProtoMessage()    {}
 func (*PackedTest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{6}
+	return fileDescriptor_8ca34d01332f1402, []int{6}
 }
+
 func (m *PackedTest) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_PackedTest.Unmarshal(m, b)
 }
 func (m *PackedTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_PackedTest.Marshal(b, m, deterministic)
 }
-func (dst *PackedTest) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_PackedTest.Merge(dst, src)
+func (m *PackedTest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PackedTest.Merge(m, src)
 }
 func (m *PackedTest) XXX_Size() int {
 	return xxx_messageInfo_PackedTest.Size(m)
@@ -1471,16 +1509,17 @@
 func (m *MaxTag) String() string { return proto.CompactTextString(m) }
 func (*MaxTag) ProtoMessage()    {}
 func (*MaxTag) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{7}
+	return fileDescriptor_8ca34d01332f1402, []int{7}
 }
+
 func (m *MaxTag) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MaxTag.Unmarshal(m, b)
 }
 func (m *MaxTag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MaxTag.Marshal(b, m, deterministic)
 }
-func (dst *MaxTag) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MaxTag.Merge(dst, src)
+func (m *MaxTag) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MaxTag.Merge(m, src)
 }
 func (m *MaxTag) XXX_Size() int {
 	return xxx_messageInfo_MaxTag.Size(m)
@@ -1510,16 +1549,17 @@
 func (m *OldMessage) String() string { return proto.CompactTextString(m) }
 func (*OldMessage) ProtoMessage()    {}
 func (*OldMessage) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{8}
+	return fileDescriptor_8ca34d01332f1402, []int{8}
 }
+
 func (m *OldMessage) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_OldMessage.Unmarshal(m, b)
 }
 func (m *OldMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_OldMessage.Marshal(b, m, deterministic)
 }
-func (dst *OldMessage) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_OldMessage.Merge(dst, src)
+func (m *OldMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OldMessage.Merge(m, src)
 }
 func (m *OldMessage) XXX_Size() int {
 	return xxx_messageInfo_OldMessage.Size(m)
@@ -1555,16 +1595,17 @@
 func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) }
 func (*OldMessage_Nested) ProtoMessage()    {}
 func (*OldMessage_Nested) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{8, 0}
+	return fileDescriptor_8ca34d01332f1402, []int{8, 0}
 }
+
 func (m *OldMessage_Nested) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_OldMessage_Nested.Unmarshal(m, b)
 }
 func (m *OldMessage_Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_OldMessage_Nested.Marshal(b, m, deterministic)
 }
-func (dst *OldMessage_Nested) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_OldMessage_Nested.Merge(dst, src)
+func (m *OldMessage_Nested) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OldMessage_Nested.Merge(m, src)
 }
 func (m *OldMessage_Nested) XXX_Size() int {
 	return xxx_messageInfo_OldMessage_Nested.Size(m)
@@ -1597,16 +1638,17 @@
 func (m *NewMessage) String() string { return proto.CompactTextString(m) }
 func (*NewMessage) ProtoMessage()    {}
 func (*NewMessage) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{9}
+	return fileDescriptor_8ca34d01332f1402, []int{9}
 }
+
 func (m *NewMessage) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_NewMessage.Unmarshal(m, b)
 }
 func (m *NewMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_NewMessage.Marshal(b, m, deterministic)
 }
-func (dst *NewMessage) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_NewMessage.Merge(dst, src)
+func (m *NewMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_NewMessage.Merge(m, src)
 }
 func (m *NewMessage) XXX_Size() int {
 	return xxx_messageInfo_NewMessage.Size(m)
@@ -1643,16 +1685,17 @@
 func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) }
 func (*NewMessage_Nested) ProtoMessage()    {}
 func (*NewMessage_Nested) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{9, 0}
+	return fileDescriptor_8ca34d01332f1402, []int{9, 0}
 }
+
 func (m *NewMessage_Nested) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_NewMessage_Nested.Unmarshal(m, b)
 }
 func (m *NewMessage_Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_NewMessage_Nested.Marshal(b, m, deterministic)
 }
-func (dst *NewMessage_Nested) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_NewMessage_Nested.Merge(dst, src)
+func (m *NewMessage_Nested) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_NewMessage_Nested.Merge(m, src)
 }
 func (m *NewMessage_Nested) XXX_Size() int {
 	return xxx_messageInfo_NewMessage_Nested.Size(m)
@@ -1690,16 +1733,17 @@
 func (m *InnerMessage) String() string { return proto.CompactTextString(m) }
 func (*InnerMessage) ProtoMessage()    {}
 func (*InnerMessage) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{10}
+	return fileDescriptor_8ca34d01332f1402, []int{10}
 }
+
 func (m *InnerMessage) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_InnerMessage.Unmarshal(m, b)
 }
 func (m *InnerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_InnerMessage.Marshal(b, m, deterministic)
 }
-func (dst *InnerMessage) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_InnerMessage.Merge(dst, src)
+func (m *InnerMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_InnerMessage.Merge(m, src)
 }
 func (m *InnerMessage) XXX_Size() int {
 	return xxx_messageInfo_InnerMessage.Size(m)
@@ -1748,7 +1792,7 @@
 func (m *OtherMessage) String() string { return proto.CompactTextString(m) }
 func (*OtherMessage) ProtoMessage()    {}
 func (*OtherMessage) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{11}
+	return fileDescriptor_8ca34d01332f1402, []int{11}
 }
 
 var extRange_OtherMessage = []proto.ExtensionRange{
@@ -1758,14 +1802,15 @@
 func (*OtherMessage) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_OtherMessage
 }
+
 func (m *OtherMessage) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_OtherMessage.Unmarshal(m, b)
 }
 func (m *OtherMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_OtherMessage.Marshal(b, m, deterministic)
 }
-func (dst *OtherMessage) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_OtherMessage.Merge(dst, src)
+func (m *OtherMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OtherMessage.Merge(m, src)
 }
 func (m *OtherMessage) XXX_Size() int {
 	return xxx_messageInfo_OtherMessage.Size(m)
@@ -1815,16 +1860,17 @@
 func (m *RequiredInnerMessage) String() string { return proto.CompactTextString(m) }
 func (*RequiredInnerMessage) ProtoMessage()    {}
 func (*RequiredInnerMessage) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{12}
+	return fileDescriptor_8ca34d01332f1402, []int{12}
 }
+
 func (m *RequiredInnerMessage) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_RequiredInnerMessage.Unmarshal(m, b)
 }
 func (m *RequiredInnerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_RequiredInnerMessage.Marshal(b, m, deterministic)
 }
-func (dst *RequiredInnerMessage) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_RequiredInnerMessage.Merge(dst, src)
+func (m *RequiredInnerMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_RequiredInnerMessage.Merge(m, src)
 }
 func (m *RequiredInnerMessage) XXX_Size() int {
 	return xxx_messageInfo_RequiredInnerMessage.Size(m)
@@ -1866,7 +1912,7 @@
 func (m *MyMessage) String() string { return proto.CompactTextString(m) }
 func (*MyMessage) ProtoMessage()    {}
 func (*MyMessage) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{13}
+	return fileDescriptor_8ca34d01332f1402, []int{13}
 }
 
 var extRange_MyMessage = []proto.ExtensionRange{
@@ -1876,14 +1922,15 @@
 func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_MyMessage
 }
+
 func (m *MyMessage) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MyMessage.Unmarshal(m, b)
 }
 func (m *MyMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MyMessage.Marshal(b, m, deterministic)
 }
-func (dst *MyMessage) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MyMessage.Merge(dst, src)
+func (m *MyMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MyMessage.Merge(m, src)
 }
 func (m *MyMessage) XXX_Size() int {
 	return xxx_messageInfo_MyMessage.Size(m)
@@ -1989,16 +2036,17 @@
 func (m *MyMessage_SomeGroup) String() string { return proto.CompactTextString(m) }
 func (*MyMessage_SomeGroup) ProtoMessage()    {}
 func (*MyMessage_SomeGroup) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{13, 0}
+	return fileDescriptor_8ca34d01332f1402, []int{13, 0}
 }
+
 func (m *MyMessage_SomeGroup) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MyMessage_SomeGroup.Unmarshal(m, b)
 }
 func (m *MyMessage_SomeGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MyMessage_SomeGroup.Marshal(b, m, deterministic)
 }
-func (dst *MyMessage_SomeGroup) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MyMessage_SomeGroup.Merge(dst, src)
+func (m *MyMessage_SomeGroup) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MyMessage_SomeGroup.Merge(m, src)
 }
 func (m *MyMessage_SomeGroup) XXX_Size() int {
 	return xxx_messageInfo_MyMessage_SomeGroup.Size(m)
@@ -2028,16 +2076,17 @@
 func (m *Ext) String() string { return proto.CompactTextString(m) }
 func (*Ext) ProtoMessage()    {}
 func (*Ext) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{14}
+	return fileDescriptor_8ca34d01332f1402, []int{14}
 }
+
 func (m *Ext) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Ext.Unmarshal(m, b)
 }
 func (m *Ext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Ext.Marshal(b, m, deterministic)
 }
-func (dst *Ext) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Ext.Merge(dst, src)
+func (m *Ext) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Ext.Merge(m, src)
 }
 func (m *Ext) XXX_Size() int {
 	return xxx_messageInfo_Ext.Size(m)
@@ -2102,16 +2151,17 @@
 func (m *ComplexExtension) String() string { return proto.CompactTextString(m) }
 func (*ComplexExtension) ProtoMessage()    {}
 func (*ComplexExtension) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{15}
+	return fileDescriptor_8ca34d01332f1402, []int{15}
 }
+
 func (m *ComplexExtension) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_ComplexExtension.Unmarshal(m, b)
 }
 func (m *ComplexExtension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_ComplexExtension.Marshal(b, m, deterministic)
 }
-func (dst *ComplexExtension) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ComplexExtension.Merge(dst, src)
+func (m *ComplexExtension) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ComplexExtension.Merge(m, src)
 }
 func (m *ComplexExtension) XXX_Size() int {
 	return xxx_messageInfo_ComplexExtension.Size(m)
@@ -2154,7 +2204,7 @@
 func (m *DefaultsMessage) String() string { return proto.CompactTextString(m) }
 func (*DefaultsMessage) ProtoMessage()    {}
 func (*DefaultsMessage) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{16}
+	return fileDescriptor_8ca34d01332f1402, []int{16}
 }
 
 var extRange_DefaultsMessage = []proto.ExtensionRange{
@@ -2164,14 +2214,15 @@
 func (*DefaultsMessage) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_DefaultsMessage
 }
+
 func (m *DefaultsMessage) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_DefaultsMessage.Unmarshal(m, b)
 }
 func (m *DefaultsMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_DefaultsMessage.Marshal(b, m, deterministic)
 }
-func (dst *DefaultsMessage) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_DefaultsMessage.Merge(dst, src)
+func (m *DefaultsMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_DefaultsMessage.Merge(m, src)
 }
 func (m *DefaultsMessage) XXX_Size() int {
 	return xxx_messageInfo_DefaultsMessage.Size(m)
@@ -2193,14 +2244,7 @@
 func (m *MyMessageSet) String() string { return proto.CompactTextString(m) }
 func (*MyMessageSet) ProtoMessage()    {}
 func (*MyMessageSet) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{17}
-}
-
-func (m *MyMessageSet) MarshalJSON() ([]byte, error) {
-	return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions)
-}
-func (m *MyMessageSet) UnmarshalJSON(buf []byte) error {
-	return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)
+	return fileDescriptor_8ca34d01332f1402, []int{17}
 }
 
 var extRange_MyMessageSet = []proto.ExtensionRange{
@@ -2210,14 +2254,15 @@
 func (*MyMessageSet) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_MyMessageSet
 }
+
 func (m *MyMessageSet) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MyMessageSet.Unmarshal(m, b)
 }
 func (m *MyMessageSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MyMessageSet.Marshal(b, m, deterministic)
 }
-func (dst *MyMessageSet) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MyMessageSet.Merge(dst, src)
+func (m *MyMessageSet) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MyMessageSet.Merge(m, src)
 }
 func (m *MyMessageSet) XXX_Size() int {
 	return xxx_messageInfo_MyMessageSet.Size(m)
@@ -2238,16 +2283,17 @@
 func (m *Empty) String() string { return proto.CompactTextString(m) }
 func (*Empty) ProtoMessage()    {}
 func (*Empty) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{18}
+	return fileDescriptor_8ca34d01332f1402, []int{18}
 }
+
 func (m *Empty) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Empty.Unmarshal(m, b)
 }
 func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Empty.Marshal(b, m, deterministic)
 }
-func (dst *Empty) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Empty.Merge(dst, src)
+func (m *Empty) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Empty.Merge(m, src)
 }
 func (m *Empty) XXX_Size() int {
 	return xxx_messageInfo_Empty.Size(m)
@@ -2269,16 +2315,17 @@
 func (m *MessageList) String() string { return proto.CompactTextString(m) }
 func (*MessageList) ProtoMessage()    {}
 func (*MessageList) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{19}
+	return fileDescriptor_8ca34d01332f1402, []int{19}
 }
+
 func (m *MessageList) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MessageList.Unmarshal(m, b)
 }
 func (m *MessageList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MessageList.Marshal(b, m, deterministic)
 }
-func (dst *MessageList) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MessageList.Merge(dst, src)
+func (m *MessageList) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MessageList.Merge(m, src)
 }
 func (m *MessageList) XXX_Size() int {
 	return xxx_messageInfo_MessageList.Size(m)
@@ -2308,16 +2355,17 @@
 func (m *MessageList_Message) String() string { return proto.CompactTextString(m) }
 func (*MessageList_Message) ProtoMessage()    {}
 func (*MessageList_Message) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{19, 0}
+	return fileDescriptor_8ca34d01332f1402, []int{19, 0}
 }
+
 func (m *MessageList_Message) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MessageList_Message.Unmarshal(m, b)
 }
 func (m *MessageList_Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MessageList_Message.Marshal(b, m, deterministic)
 }
-func (dst *MessageList_Message) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MessageList_Message.Merge(dst, src)
+func (m *MessageList_Message) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MessageList_Message.Merge(m, src)
 }
 func (m *MessageList_Message) XXX_Size() int {
 	return xxx_messageInfo_MessageList_Message.Size(m)
@@ -2354,16 +2402,17 @@
 func (m *Strings) String() string { return proto.CompactTextString(m) }
 func (*Strings) ProtoMessage()    {}
 func (*Strings) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{20}
+	return fileDescriptor_8ca34d01332f1402, []int{20}
 }
+
 func (m *Strings) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Strings.Unmarshal(m, b)
 }
 func (m *Strings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Strings.Marshal(b, m, deterministic)
 }
-func (dst *Strings) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Strings.Merge(dst, src)
+func (m *Strings) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Strings.Merge(m, src)
 }
 func (m *Strings) XXX_Size() int {
 	return xxx_messageInfo_Strings.Size(m)
@@ -2422,16 +2471,17 @@
 func (m *Defaults) String() string { return proto.CompactTextString(m) }
 func (*Defaults) ProtoMessage()    {}
 func (*Defaults) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{21}
+	return fileDescriptor_8ca34d01332f1402, []int{21}
 }
+
 func (m *Defaults) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Defaults.Unmarshal(m, b)
 }
 func (m *Defaults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Defaults.Marshal(b, m, deterministic)
 }
-func (dst *Defaults) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Defaults.Merge(dst, src)
+func (m *Defaults) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Defaults.Merge(m, src)
 }
 func (m *Defaults) XXX_Size() int {
 	return xxx_messageInfo_Defaults.Size(m)
@@ -2607,16 +2657,17 @@
 func (m *SubDefaults) String() string { return proto.CompactTextString(m) }
 func (*SubDefaults) ProtoMessage()    {}
 func (*SubDefaults) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{22}
+	return fileDescriptor_8ca34d01332f1402, []int{22}
 }
+
 func (m *SubDefaults) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_SubDefaults.Unmarshal(m, b)
 }
 func (m *SubDefaults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_SubDefaults.Marshal(b, m, deterministic)
 }
-func (dst *SubDefaults) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SubDefaults.Merge(dst, src)
+func (m *SubDefaults) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SubDefaults.Merge(m, src)
 }
 func (m *SubDefaults) XXX_Size() int {
 	return xxx_messageInfo_SubDefaults.Size(m)
@@ -2647,16 +2698,17 @@
 func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) }
 func (*RepeatedEnum) ProtoMessage()    {}
 func (*RepeatedEnum) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{23}
+	return fileDescriptor_8ca34d01332f1402, []int{23}
 }
+
 func (m *RepeatedEnum) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_RepeatedEnum.Unmarshal(m, b)
 }
 func (m *RepeatedEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_RepeatedEnum.Marshal(b, m, deterministic)
 }
-func (dst *RepeatedEnum) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_RepeatedEnum.Merge(dst, src)
+func (m *RepeatedEnum) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_RepeatedEnum.Merge(m, src)
 }
 func (m *RepeatedEnum) XXX_Size() int {
 	return xxx_messageInfo_RepeatedEnum.Size(m)
@@ -2691,16 +2743,17 @@
 func (m *MoreRepeated) String() string { return proto.CompactTextString(m) }
 func (*MoreRepeated) ProtoMessage()    {}
 func (*MoreRepeated) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{24}
+	return fileDescriptor_8ca34d01332f1402, []int{24}
 }
+
 func (m *MoreRepeated) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MoreRepeated.Unmarshal(m, b)
 }
 func (m *MoreRepeated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MoreRepeated.Marshal(b, m, deterministic)
 }
-func (dst *MoreRepeated) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MoreRepeated.Merge(dst, src)
+func (m *MoreRepeated) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MoreRepeated.Merge(m, src)
 }
 func (m *MoreRepeated) XXX_Size() int {
 	return xxx_messageInfo_MoreRepeated.Size(m)
@@ -2771,16 +2824,17 @@
 func (m *GroupOld) String() string { return proto.CompactTextString(m) }
 func (*GroupOld) ProtoMessage()    {}
 func (*GroupOld) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{25}
+	return fileDescriptor_8ca34d01332f1402, []int{25}
 }
+
 func (m *GroupOld) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_GroupOld.Unmarshal(m, b)
 }
 func (m *GroupOld) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_GroupOld.Marshal(b, m, deterministic)
 }
-func (dst *GroupOld) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GroupOld.Merge(dst, src)
+func (m *GroupOld) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GroupOld.Merge(m, src)
 }
 func (m *GroupOld) XXX_Size() int {
 	return xxx_messageInfo_GroupOld.Size(m)
@@ -2809,16 +2863,17 @@
 func (m *GroupOld_G) String() string { return proto.CompactTextString(m) }
 func (*GroupOld_G) ProtoMessage()    {}
 func (*GroupOld_G) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{25, 0}
+	return fileDescriptor_8ca34d01332f1402, []int{25, 0}
 }
+
 func (m *GroupOld_G) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_GroupOld_G.Unmarshal(m, b)
 }
 func (m *GroupOld_G) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_GroupOld_G.Marshal(b, m, deterministic)
 }
-func (dst *GroupOld_G) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GroupOld_G.Merge(dst, src)
+func (m *GroupOld_G) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GroupOld_G.Merge(m, src)
 }
 func (m *GroupOld_G) XXX_Size() int {
 	return xxx_messageInfo_GroupOld_G.Size(m)
@@ -2847,16 +2902,17 @@
 func (m *GroupNew) String() string { return proto.CompactTextString(m) }
 func (*GroupNew) ProtoMessage()    {}
 func (*GroupNew) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{26}
+	return fileDescriptor_8ca34d01332f1402, []int{26}
 }
+
 func (m *GroupNew) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_GroupNew.Unmarshal(m, b)
 }
 func (m *GroupNew) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_GroupNew.Marshal(b, m, deterministic)
 }
-func (dst *GroupNew) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GroupNew.Merge(dst, src)
+func (m *GroupNew) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GroupNew.Merge(m, src)
 }
 func (m *GroupNew) XXX_Size() int {
 	return xxx_messageInfo_GroupNew.Size(m)
@@ -2886,16 +2942,17 @@
 func (m *GroupNew_G) String() string { return proto.CompactTextString(m) }
 func (*GroupNew_G) ProtoMessage()    {}
 func (*GroupNew_G) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{26, 0}
+	return fileDescriptor_8ca34d01332f1402, []int{26, 0}
 }
+
 func (m *GroupNew_G) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_GroupNew_G.Unmarshal(m, b)
 }
 func (m *GroupNew_G) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_GroupNew_G.Marshal(b, m, deterministic)
 }
-func (dst *GroupNew_G) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GroupNew_G.Merge(dst, src)
+func (m *GroupNew_G) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GroupNew_G.Merge(m, src)
 }
 func (m *GroupNew_G) XXX_Size() int {
 	return xxx_messageInfo_GroupNew_G.Size(m)
@@ -2932,16 +2989,17 @@
 func (m *FloatingPoint) String() string { return proto.CompactTextString(m) }
 func (*FloatingPoint) ProtoMessage()    {}
 func (*FloatingPoint) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{27}
+	return fileDescriptor_8ca34d01332f1402, []int{27}
 }
+
 func (m *FloatingPoint) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_FloatingPoint.Unmarshal(m, b)
 }
 func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic)
 }
-func (dst *FloatingPoint) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_FloatingPoint.Merge(dst, src)
+func (m *FloatingPoint) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_FloatingPoint.Merge(m, src)
 }
 func (m *FloatingPoint) XXX_Size() int {
 	return xxx_messageInfo_FloatingPoint.Size(m)
@@ -2980,16 +3038,17 @@
 func (m *MessageWithMap) String() string { return proto.CompactTextString(m) }
 func (*MessageWithMap) ProtoMessage()    {}
 func (*MessageWithMap) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{28}
+	return fileDescriptor_8ca34d01332f1402, []int{28}
 }
+
 func (m *MessageWithMap) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MessageWithMap.Unmarshal(m, b)
 }
 func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic)
 }
-func (dst *MessageWithMap) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MessageWithMap.Merge(dst, src)
+func (m *MessageWithMap) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MessageWithMap.Merge(m, src)
 }
 func (m *MessageWithMap) XXX_Size() int {
 	return xxx_messageInfo_MessageWithMap.Size(m)
@@ -3060,16 +3119,17 @@
 func (m *Oneof) String() string { return proto.CompactTextString(m) }
 func (*Oneof) ProtoMessage()    {}
 func (*Oneof) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{29}
+	return fileDescriptor_8ca34d01332f1402, []int{29}
 }
+
 func (m *Oneof) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Oneof.Unmarshal(m, b)
 }
 func (m *Oneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Oneof.Marshal(b, m, deterministic)
 }
-func (dst *Oneof) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Oneof.Merge(dst, src)
+func (m *Oneof) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Oneof.Merge(m, src)
 }
 func (m *Oneof) XXX_Size() int {
 	return xxx_messageInfo_Oneof.Size(m)
@@ -3083,83 +3143,108 @@
 type isOneof_Union interface {
 	isOneof_Union()
 }
-type isOneof_Tormato interface {
-	isOneof_Tormato()
-}
 
 type Oneof_F_Bool struct {
 	F_Bool bool `protobuf:"varint,1,opt,name=F_Bool,json=FBool,oneof"`
 }
+
 type Oneof_F_Int32 struct {
 	F_Int32 int32 `protobuf:"varint,2,opt,name=F_Int32,json=FInt32,oneof"`
 }
+
 type Oneof_F_Int64 struct {
 	F_Int64 int64 `protobuf:"varint,3,opt,name=F_Int64,json=FInt64,oneof"`
 }
+
 type Oneof_F_Fixed32 struct {
 	F_Fixed32 uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=FFixed32,oneof"`
 }
+
 type Oneof_F_Fixed64 struct {
 	F_Fixed64 uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=FFixed64,oneof"`
 }
+
 type Oneof_F_Uint32 struct {
 	F_Uint32 uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=FUint32,oneof"`
 }
+
 type Oneof_F_Uint64 struct {
 	F_Uint64 uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=FUint64,oneof"`
 }
+
 type Oneof_F_Float struct {
 	F_Float float32 `protobuf:"fixed32,8,opt,name=F_Float,json=FFloat,oneof"`
 }
+
 type Oneof_F_Double struct {
 	F_Double float64 `protobuf:"fixed64,9,opt,name=F_Double,json=FDouble,oneof"`
 }
+
 type Oneof_F_String struct {
 	F_String string `protobuf:"bytes,10,opt,name=F_String,json=FString,oneof"`
 }
+
 type Oneof_F_Bytes struct {
 	F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=FBytes,oneof"`
 }
+
 type Oneof_F_Sint32 struct {
 	F_Sint32 int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=FSint32,oneof"`
 }
+
 type Oneof_F_Sint64 struct {
 	F_Sint64 int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=FSint64,oneof"`
 }
+
 type Oneof_F_Enum struct {
 	F_Enum MyMessage_Color `protobuf:"varint,14,opt,name=F_Enum,json=FEnum,enum=test_proto.MyMessage_Color,oneof"`
 }
+
 type Oneof_F_Message struct {
 	F_Message *GoTestField `protobuf:"bytes,15,opt,name=F_Message,json=FMessage,oneof"`
 }
+
 type Oneof_FGroup struct {
 	FGroup *Oneof_F_Group `protobuf:"group,16,opt,name=F_Group,json=fGroup,oneof"`
 }
+
 type Oneof_F_Largest_Tag struct {
 	F_Largest_Tag int32 `protobuf:"varint,536870911,opt,name=F_Largest_Tag,json=FLargestTag,oneof"`
 }
-type Oneof_Value struct {
-	Value int32 `protobuf:"varint,100,opt,name=value,oneof"`
-}
 
-func (*Oneof_F_Bool) isOneof_Union()        {}
-func (*Oneof_F_Int32) isOneof_Union()       {}
-func (*Oneof_F_Int64) isOneof_Union()       {}
-func (*Oneof_F_Fixed32) isOneof_Union()     {}
-func (*Oneof_F_Fixed64) isOneof_Union()     {}
-func (*Oneof_F_Uint32) isOneof_Union()      {}
-func (*Oneof_F_Uint64) isOneof_Union()      {}
-func (*Oneof_F_Float) isOneof_Union()       {}
-func (*Oneof_F_Double) isOneof_Union()      {}
-func (*Oneof_F_String) isOneof_Union()      {}
-func (*Oneof_F_Bytes) isOneof_Union()       {}
-func (*Oneof_F_Sint32) isOneof_Union()      {}
-func (*Oneof_F_Sint64) isOneof_Union()      {}
-func (*Oneof_F_Enum) isOneof_Union()        {}
-func (*Oneof_F_Message) isOneof_Union()     {}
-func (*Oneof_FGroup) isOneof_Union()        {}
+func (*Oneof_F_Bool) isOneof_Union() {}
+
+func (*Oneof_F_Int32) isOneof_Union() {}
+
+func (*Oneof_F_Int64) isOneof_Union() {}
+
+func (*Oneof_F_Fixed32) isOneof_Union() {}
+
+func (*Oneof_F_Fixed64) isOneof_Union() {}
+
+func (*Oneof_F_Uint32) isOneof_Union() {}
+
+func (*Oneof_F_Uint64) isOneof_Union() {}
+
+func (*Oneof_F_Float) isOneof_Union() {}
+
+func (*Oneof_F_Double) isOneof_Union() {}
+
+func (*Oneof_F_String) isOneof_Union() {}
+
+func (*Oneof_F_Bytes) isOneof_Union() {}
+
+func (*Oneof_F_Sint32) isOneof_Union() {}
+
+func (*Oneof_F_Sint64) isOneof_Union() {}
+
+func (*Oneof_F_Enum) isOneof_Union() {}
+
+func (*Oneof_F_Message) isOneof_Union() {}
+
+func (*Oneof_FGroup) isOneof_Union() {}
+
 func (*Oneof_F_Largest_Tag) isOneof_Union() {}
-func (*Oneof_Value) isOneof_Tormato()       {}
 
 func (m *Oneof) GetUnion() isOneof_Union {
 	if m != nil {
@@ -3167,12 +3252,6 @@
 	}
 	return nil
 }
-func (m *Oneof) GetTormato() isOneof_Tormato {
-	if m != nil {
-		return m.Tormato
-	}
-	return nil
-}
 
 func (m *Oneof) GetF_Bool() bool {
 	if x, ok := m.GetUnion().(*Oneof_F_Bool); ok {
@@ -3293,6 +3372,23 @@
 	return 0
 }
 
+type isOneof_Tormato interface {
+	isOneof_Tormato()
+}
+
+type Oneof_Value struct {
+	Value int32 `protobuf:"varint,100,opt,name=value,oneof"`
+}
+
+func (*Oneof_Value) isOneof_Tormato() {}
+
+func (m *Oneof) GetTormato() isOneof_Tormato {
+	if m != nil {
+		return m.Tormato
+	}
+	return nil
+}
+
 func (m *Oneof) GetValue() int32 {
 	if x, ok := m.GetTormato().(*Oneof_Value); ok {
 		return x.Value
@@ -3300,9 +3396,9 @@
 	return 0
 }
 
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*Oneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
-	return _Oneof_OneofMarshaler, _Oneof_OneofUnmarshaler, _Oneof_OneofSizer, []interface{}{
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*Oneof) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
 		(*Oneof_F_Bool)(nil),
 		(*Oneof_F_Int32)(nil),
 		(*Oneof_F_Int64)(nil),
@@ -3324,298 +3420,6 @@
 	}
 }
 
-func _Oneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
-	m := msg.(*Oneof)
-	// union
-	switch x := m.Union.(type) {
-	case *Oneof_F_Bool:
-		t := uint64(0)
-		if x.F_Bool {
-			t = 1
-		}
-		b.EncodeVarint(1<<3 | proto.WireVarint)
-		b.EncodeVarint(t)
-	case *Oneof_F_Int32:
-		b.EncodeVarint(2<<3 | proto.WireVarint)
-		b.EncodeVarint(uint64(x.F_Int32))
-	case *Oneof_F_Int64:
-		b.EncodeVarint(3<<3 | proto.WireVarint)
-		b.EncodeVarint(uint64(x.F_Int64))
-	case *Oneof_F_Fixed32:
-		b.EncodeVarint(4<<3 | proto.WireFixed32)
-		b.EncodeFixed32(uint64(x.F_Fixed32))
-	case *Oneof_F_Fixed64:
-		b.EncodeVarint(5<<3 | proto.WireFixed64)
-		b.EncodeFixed64(uint64(x.F_Fixed64))
-	case *Oneof_F_Uint32:
-		b.EncodeVarint(6<<3 | proto.WireVarint)
-		b.EncodeVarint(uint64(x.F_Uint32))
-	case *Oneof_F_Uint64:
-		b.EncodeVarint(7<<3 | proto.WireVarint)
-		b.EncodeVarint(uint64(x.F_Uint64))
-	case *Oneof_F_Float:
-		b.EncodeVarint(8<<3 | proto.WireFixed32)
-		b.EncodeFixed32(uint64(math.Float32bits(x.F_Float)))
-	case *Oneof_F_Double:
-		b.EncodeVarint(9<<3 | proto.WireFixed64)
-		b.EncodeFixed64(math.Float64bits(x.F_Double))
-	case *Oneof_F_String:
-		b.EncodeVarint(10<<3 | proto.WireBytes)
-		b.EncodeStringBytes(x.F_String)
-	case *Oneof_F_Bytes:
-		b.EncodeVarint(11<<3 | proto.WireBytes)
-		b.EncodeRawBytes(x.F_Bytes)
-	case *Oneof_F_Sint32:
-		b.EncodeVarint(12<<3 | proto.WireVarint)
-		b.EncodeZigzag32(uint64(x.F_Sint32))
-	case *Oneof_F_Sint64:
-		b.EncodeVarint(13<<3 | proto.WireVarint)
-		b.EncodeZigzag64(uint64(x.F_Sint64))
-	case *Oneof_F_Enum:
-		b.EncodeVarint(14<<3 | proto.WireVarint)
-		b.EncodeVarint(uint64(x.F_Enum))
-	case *Oneof_F_Message:
-		b.EncodeVarint(15<<3 | proto.WireBytes)
-		if err := b.EncodeMessage(x.F_Message); err != nil {
-			return err
-		}
-	case *Oneof_FGroup:
-		b.EncodeVarint(16<<3 | proto.WireStartGroup)
-		if err := b.Marshal(x.FGroup); err != nil {
-			return err
-		}
-		b.EncodeVarint(16<<3 | proto.WireEndGroup)
-	case *Oneof_F_Largest_Tag:
-		b.EncodeVarint(536870911<<3 | proto.WireVarint)
-		b.EncodeVarint(uint64(x.F_Largest_Tag))
-	case nil:
-	default:
-		return fmt.Errorf("Oneof.Union has unexpected type %T", x)
-	}
-	// tormato
-	switch x := m.Tormato.(type) {
-	case *Oneof_Value:
-		b.EncodeVarint(100<<3 | proto.WireVarint)
-		b.EncodeVarint(uint64(x.Value))
-	case nil:
-	default:
-		return fmt.Errorf("Oneof.Tormato has unexpected type %T", x)
-	}
-	return nil
-}
-
-func _Oneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
-	m := msg.(*Oneof)
-	switch tag {
-	case 1: // union.F_Bool
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.Union = &Oneof_F_Bool{x != 0}
-		return true, err
-	case 2: // union.F_Int32
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.Union = &Oneof_F_Int32{int32(x)}
-		return true, err
-	case 3: // union.F_Int64
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.Union = &Oneof_F_Int64{int64(x)}
-		return true, err
-	case 4: // union.F_Fixed32
-		if wire != proto.WireFixed32 {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeFixed32()
-		m.Union = &Oneof_F_Fixed32{uint32(x)}
-		return true, err
-	case 5: // union.F_Fixed64
-		if wire != proto.WireFixed64 {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeFixed64()
-		m.Union = &Oneof_F_Fixed64{x}
-		return true, err
-	case 6: // union.F_Uint32
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.Union = &Oneof_F_Uint32{uint32(x)}
-		return true, err
-	case 7: // union.F_Uint64
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.Union = &Oneof_F_Uint64{x}
-		return true, err
-	case 8: // union.F_Float
-		if wire != proto.WireFixed32 {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeFixed32()
-		m.Union = &Oneof_F_Float{math.Float32frombits(uint32(x))}
-		return true, err
-	case 9: // union.F_Double
-		if wire != proto.WireFixed64 {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeFixed64()
-		m.Union = &Oneof_F_Double{math.Float64frombits(x)}
-		return true, err
-	case 10: // union.F_String
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeStringBytes()
-		m.Union = &Oneof_F_String{x}
-		return true, err
-	case 11: // union.F_Bytes
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeRawBytes(true)
-		m.Union = &Oneof_F_Bytes{x}
-		return true, err
-	case 12: // union.F_Sint32
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeZigzag32()
-		m.Union = &Oneof_F_Sint32{int32(x)}
-		return true, err
-	case 13: // union.F_Sint64
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeZigzag64()
-		m.Union = &Oneof_F_Sint64{int64(x)}
-		return true, err
-	case 14: // union.F_Enum
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.Union = &Oneof_F_Enum{MyMessage_Color(x)}
-		return true, err
-	case 15: // union.F_Message
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		msg := new(GoTestField)
-		err := b.DecodeMessage(msg)
-		m.Union = &Oneof_F_Message{msg}
-		return true, err
-	case 16: // union.f_group
-		if wire != proto.WireStartGroup {
-			return true, proto.ErrInternalBadWireType
-		}
-		msg := new(Oneof_F_Group)
-		err := b.DecodeGroup(msg)
-		m.Union = &Oneof_FGroup{msg}
-		return true, err
-	case 536870911: // union.F_Largest_Tag
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.Union = &Oneof_F_Largest_Tag{int32(x)}
-		return true, err
-	case 100: // tormato.value
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.Tormato = &Oneof_Value{int32(x)}
-		return true, err
-	default:
-		return false, nil
-	}
-}
-
-func _Oneof_OneofSizer(msg proto.Message) (n int) {
-	m := msg.(*Oneof)
-	// union
-	switch x := m.Union.(type) {
-	case *Oneof_F_Bool:
-		n += 1 // tag and wire
-		n += 1
-	case *Oneof_F_Int32:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(x.F_Int32))
-	case *Oneof_F_Int64:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(x.F_Int64))
-	case *Oneof_F_Fixed32:
-		n += 1 // tag and wire
-		n += 4
-	case *Oneof_F_Fixed64:
-		n += 1 // tag and wire
-		n += 8
-	case *Oneof_F_Uint32:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(x.F_Uint32))
-	case *Oneof_F_Uint64:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(x.F_Uint64))
-	case *Oneof_F_Float:
-		n += 1 // tag and wire
-		n += 4
-	case *Oneof_F_Double:
-		n += 1 // tag and wire
-		n += 8
-	case *Oneof_F_String:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.F_String)))
-		n += len(x.F_String)
-	case *Oneof_F_Bytes:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.F_Bytes)))
-		n += len(x.F_Bytes)
-	case *Oneof_F_Sint32:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64((uint32(x.F_Sint32) << 1) ^ uint32((int32(x.F_Sint32) >> 31))))
-	case *Oneof_F_Sint64:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(uint64(x.F_Sint64<<1) ^ uint64((int64(x.F_Sint64) >> 63))))
-	case *Oneof_F_Enum:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(x.F_Enum))
-	case *Oneof_F_Message:
-		s := proto.Size(x.F_Message)
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(s))
-		n += s
-	case *Oneof_FGroup:
-		n += 2 // tag and wire
-		n += proto.Size(x.FGroup)
-		n += 2 // tag and wire
-	case *Oneof_F_Largest_Tag:
-		n += 10 // tag and wire
-		n += proto.SizeVarint(uint64(x.F_Largest_Tag))
-	case nil:
-	default:
-		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
-	}
-	// tormato
-	switch x := m.Tormato.(type) {
-	case *Oneof_Value:
-		n += 2 // tag and wire
-		n += proto.SizeVarint(uint64(x.Value))
-	case nil:
-	default:
-		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
-	}
-	return n
-}
-
 type Oneof_F_Group struct {
 	X                    *int32   `protobuf:"varint,17,opt,name=x" json:"x,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -3627,16 +3431,17 @@
 func (m *Oneof_F_Group) String() string { return proto.CompactTextString(m) }
 func (*Oneof_F_Group) ProtoMessage()    {}
 func (*Oneof_F_Group) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{29, 0}
+	return fileDescriptor_8ca34d01332f1402, []int{29, 0}
 }
+
 func (m *Oneof_F_Group) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Oneof_F_Group.Unmarshal(m, b)
 }
 func (m *Oneof_F_Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Oneof_F_Group.Marshal(b, m, deterministic)
 }
-func (dst *Oneof_F_Group) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Oneof_F_Group.Merge(dst, src)
+func (m *Oneof_F_Group) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Oneof_F_Group.Merge(m, src)
 }
 func (m *Oneof_F_Group) XXX_Size() int {
 	return xxx_messageInfo_Oneof_F_Group.Size(m)
@@ -3675,16 +3480,17 @@
 func (m *Communique) String() string { return proto.CompactTextString(m) }
 func (*Communique) ProtoMessage()    {}
 func (*Communique) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{30}
+	return fileDescriptor_8ca34d01332f1402, []int{30}
 }
+
 func (m *Communique) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Communique.Unmarshal(m, b)
 }
 func (m *Communique) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Communique.Marshal(b, m, deterministic)
 }
-func (dst *Communique) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Communique.Merge(dst, src)
+func (m *Communique) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Communique.Merge(m, src)
 }
 func (m *Communique) XXX_Size() int {
 	return xxx_messageInfo_Communique.Size(m)
@@ -3695,6 +3501,13 @@
 
 var xxx_messageInfo_Communique proto.InternalMessageInfo
 
+func (m *Communique) GetMakeMeCry() bool {
+	if m != nil && m.MakeMeCry != nil {
+		return *m.MakeMeCry
+	}
+	return false
+}
+
 type isCommunique_Union interface {
 	isCommunique_Union()
 }
@@ -3702,28 +3515,38 @@
 type Communique_Number struct {
 	Number int32 `protobuf:"varint,5,opt,name=number,oneof"`
 }
+
 type Communique_Name struct {
 	Name string `protobuf:"bytes,6,opt,name=name,oneof"`
 }
+
 type Communique_Data struct {
 	Data []byte `protobuf:"bytes,7,opt,name=data,oneof"`
 }
+
 type Communique_TempC struct {
 	TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"`
 }
+
 type Communique_Col struct {
 	Col MyMessage_Color `protobuf:"varint,9,opt,name=col,enum=test_proto.MyMessage_Color,oneof"`
 }
+
 type Communique_Msg struct {
 	Msg *Strings `protobuf:"bytes,10,opt,name=msg,oneof"`
 }
 
 func (*Communique_Number) isCommunique_Union() {}
-func (*Communique_Name) isCommunique_Union()   {}
-func (*Communique_Data) isCommunique_Union()   {}
-func (*Communique_TempC) isCommunique_Union()  {}
-func (*Communique_Col) isCommunique_Union()    {}
-func (*Communique_Msg) isCommunique_Union()    {}
+
+func (*Communique_Name) isCommunique_Union() {}
+
+func (*Communique_Data) isCommunique_Union() {}
+
+func (*Communique_TempC) isCommunique_Union() {}
+
+func (*Communique_Col) isCommunique_Union() {}
+
+func (*Communique_Msg) isCommunique_Union() {}
 
 func (m *Communique) GetUnion() isCommunique_Union {
 	if m != nil {
@@ -3732,13 +3555,6 @@
 	return nil
 }
 
-func (m *Communique) GetMakeMeCry() bool {
-	if m != nil && m.MakeMeCry != nil {
-		return *m.MakeMeCry
-	}
-	return false
-}
-
 func (m *Communique) GetNumber() int32 {
 	if x, ok := m.GetUnion().(*Communique_Number); ok {
 		return x.Number
@@ -3781,9 +3597,9 @@
 	return nil
 }
 
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
-	return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*Communique) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
 		(*Communique_Number)(nil),
 		(*Communique_Name)(nil),
 		(*Communique_Data)(nil),
@@ -3793,121 +3609,6 @@
 	}
 }
 
-func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
-	m := msg.(*Communique)
-	// union
-	switch x := m.Union.(type) {
-	case *Communique_Number:
-		b.EncodeVarint(5<<3 | proto.WireVarint)
-		b.EncodeVarint(uint64(x.Number))
-	case *Communique_Name:
-		b.EncodeVarint(6<<3 | proto.WireBytes)
-		b.EncodeStringBytes(x.Name)
-	case *Communique_Data:
-		b.EncodeVarint(7<<3 | proto.WireBytes)
-		b.EncodeRawBytes(x.Data)
-	case *Communique_TempC:
-		b.EncodeVarint(8<<3 | proto.WireFixed64)
-		b.EncodeFixed64(math.Float64bits(x.TempC))
-	case *Communique_Col:
-		b.EncodeVarint(9<<3 | proto.WireVarint)
-		b.EncodeVarint(uint64(x.Col))
-	case *Communique_Msg:
-		b.EncodeVarint(10<<3 | proto.WireBytes)
-		if err := b.EncodeMessage(x.Msg); err != nil {
-			return err
-		}
-	case nil:
-	default:
-		return fmt.Errorf("Communique.Union has unexpected type %T", x)
-	}
-	return nil
-}
-
-func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
-	m := msg.(*Communique)
-	switch tag {
-	case 5: // union.number
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.Union = &Communique_Number{int32(x)}
-		return true, err
-	case 6: // union.name
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeStringBytes()
-		m.Union = &Communique_Name{x}
-		return true, err
-	case 7: // union.data
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeRawBytes(true)
-		m.Union = &Communique_Data{x}
-		return true, err
-	case 8: // union.temp_c
-		if wire != proto.WireFixed64 {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeFixed64()
-		m.Union = &Communique_TempC{math.Float64frombits(x)}
-		return true, err
-	case 9: // union.col
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.Union = &Communique_Col{MyMessage_Color(x)}
-		return true, err
-	case 10: // union.msg
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		msg := new(Strings)
-		err := b.DecodeMessage(msg)
-		m.Union = &Communique_Msg{msg}
-		return true, err
-	default:
-		return false, nil
-	}
-}
-
-func _Communique_OneofSizer(msg proto.Message) (n int) {
-	m := msg.(*Communique)
-	// union
-	switch x := m.Union.(type) {
-	case *Communique_Number:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(x.Number))
-	case *Communique_Name:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.Name)))
-		n += len(x.Name)
-	case *Communique_Data:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.Data)))
-		n += len(x.Data)
-	case *Communique_TempC:
-		n += 1 // tag and wire
-		n += 8
-	case *Communique_Col:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(x.Col))
-	case *Communique_Msg:
-		s := proto.Size(x.Msg)
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(s))
-		n += s
-	case nil:
-	default:
-		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
-	}
-	return n
-}
-
 type TestUTF8 struct {
 	Scalar *string  `protobuf:"bytes,1,opt,name=scalar" json:"scalar,omitempty"`
 	Vector []string `protobuf:"bytes,2,rep,name=vector" json:"vector,omitempty"`
@@ -3925,16 +3626,17 @@
 func (m *TestUTF8) String() string { return proto.CompactTextString(m) }
 func (*TestUTF8) ProtoMessage()    {}
 func (*TestUTF8) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_ee9f66cbbebc227c, []int{31}
+	return fileDescriptor_8ca34d01332f1402, []int{31}
 }
+
 func (m *TestUTF8) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_TestUTF8.Unmarshal(m, b)
 }
 func (m *TestUTF8) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_TestUTF8.Marshal(b, m, deterministic)
 }
-func (dst *TestUTF8) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_TestUTF8.Merge(dst, src)
+func (m *TestUTF8) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_TestUTF8.Merge(m, src)
 }
 func (m *TestUTF8) XXX_Size() int {
 	return xxx_messageInfo_TestUTF8.Size(m)
@@ -3945,6 +3647,20 @@
 
 var xxx_messageInfo_TestUTF8 proto.InternalMessageInfo
 
+func (m *TestUTF8) GetScalar() string {
+	if m != nil && m.Scalar != nil {
+		return *m.Scalar
+	}
+	return ""
+}
+
+func (m *TestUTF8) GetVector() []string {
+	if m != nil {
+		return m.Vector
+	}
+	return nil
+}
+
 type isTestUTF8_Oneof interface {
 	isTestUTF8_Oneof()
 }
@@ -3962,20 +3678,6 @@
 	return nil
 }
 
-func (m *TestUTF8) GetScalar() string {
-	if m != nil && m.Scalar != nil {
-		return *m.Scalar
-	}
-	return ""
-}
-
-func (m *TestUTF8) GetVector() []string {
-	if m != nil {
-		return m.Vector
-	}
-	return nil
-}
-
 func (m *TestUTF8) GetField() string {
 	if x, ok := m.GetOneof().(*TestUTF8_Field); ok {
 		return x.Field
@@ -3997,57 +3699,13 @@
 	return nil
 }
 
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*TestUTF8) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
-	return _TestUTF8_OneofMarshaler, _TestUTF8_OneofUnmarshaler, _TestUTF8_OneofSizer, []interface{}{
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*TestUTF8) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
 		(*TestUTF8_Field)(nil),
 	}
 }
 
-func _TestUTF8_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
-	m := msg.(*TestUTF8)
-	// oneof
-	switch x := m.Oneof.(type) {
-	case *TestUTF8_Field:
-		b.EncodeVarint(3<<3 | proto.WireBytes)
-		b.EncodeStringBytes(x.Field)
-	case nil:
-	default:
-		return fmt.Errorf("TestUTF8.Oneof has unexpected type %T", x)
-	}
-	return nil
-}
-
-func _TestUTF8_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
-	m := msg.(*TestUTF8)
-	switch tag {
-	case 3: // oneof.field
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeStringBytes()
-		m.Oneof = &TestUTF8_Field{x}
-		return true, err
-	default:
-		return false, nil
-	}
-}
-
-func _TestUTF8_OneofSizer(msg proto.Message) (n int) {
-	m := msg.(*TestUTF8)
-	// oneof
-	switch x := m.Oneof.(type) {
-	case *TestUTF8_Field:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.Field)))
-		n += len(x.Field)
-	case nil:
-	default:
-		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
-	}
-	return n
-}
-
 var E_Greeting = &proto.ExtensionDesc{
 	ExtendedType:  (*MyMessage)(nil),
 	ExtensionType: ([]string)(nil),
@@ -4071,7 +3729,7 @@
 	ExtensionType: ([]*ComplexExtension)(nil),
 	Field:         201,
 	Name:          "test_proto.r_complex",
-	Tag:           "bytes,201,rep,name=r_complex,json=rComplex",
+	Tag:           "bytes,201,rep,name=r_complex",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4080,7 +3738,7 @@
 	ExtensionType: (*float64)(nil),
 	Field:         101,
 	Name:          "test_proto.no_default_double",
-	Tag:           "fixed64,101,opt,name=no_default_double,json=noDefaultDouble",
+	Tag:           "fixed64,101,opt,name=no_default_double",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4089,7 +3747,7 @@
 	ExtensionType: (*float32)(nil),
 	Field:         102,
 	Name:          "test_proto.no_default_float",
-	Tag:           "fixed32,102,opt,name=no_default_float,json=noDefaultFloat",
+	Tag:           "fixed32,102,opt,name=no_default_float",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4098,7 +3756,7 @@
 	ExtensionType: (*int32)(nil),
 	Field:         103,
 	Name:          "test_proto.no_default_int32",
-	Tag:           "varint,103,opt,name=no_default_int32,json=noDefaultInt32",
+	Tag:           "varint,103,opt,name=no_default_int32",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4107,7 +3765,7 @@
 	ExtensionType: (*int64)(nil),
 	Field:         104,
 	Name:          "test_proto.no_default_int64",
-	Tag:           "varint,104,opt,name=no_default_int64,json=noDefaultInt64",
+	Tag:           "varint,104,opt,name=no_default_int64",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4116,7 +3774,7 @@
 	ExtensionType: (*uint32)(nil),
 	Field:         105,
 	Name:          "test_proto.no_default_uint32",
-	Tag:           "varint,105,opt,name=no_default_uint32,json=noDefaultUint32",
+	Tag:           "varint,105,opt,name=no_default_uint32",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4125,7 +3783,7 @@
 	ExtensionType: (*uint64)(nil),
 	Field:         106,
 	Name:          "test_proto.no_default_uint64",
-	Tag:           "varint,106,opt,name=no_default_uint64,json=noDefaultUint64",
+	Tag:           "varint,106,opt,name=no_default_uint64",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4134,7 +3792,7 @@
 	ExtensionType: (*int32)(nil),
 	Field:         107,
 	Name:          "test_proto.no_default_sint32",
-	Tag:           "zigzag32,107,opt,name=no_default_sint32,json=noDefaultSint32",
+	Tag:           "zigzag32,107,opt,name=no_default_sint32",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4143,7 +3801,7 @@
 	ExtensionType: (*int64)(nil),
 	Field:         108,
 	Name:          "test_proto.no_default_sint64",
-	Tag:           "zigzag64,108,opt,name=no_default_sint64,json=noDefaultSint64",
+	Tag:           "zigzag64,108,opt,name=no_default_sint64",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4152,7 +3810,7 @@
 	ExtensionType: (*uint32)(nil),
 	Field:         109,
 	Name:          "test_proto.no_default_fixed32",
-	Tag:           "fixed32,109,opt,name=no_default_fixed32,json=noDefaultFixed32",
+	Tag:           "fixed32,109,opt,name=no_default_fixed32",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4161,7 +3819,7 @@
 	ExtensionType: (*uint64)(nil),
 	Field:         110,
 	Name:          "test_proto.no_default_fixed64",
-	Tag:           "fixed64,110,opt,name=no_default_fixed64,json=noDefaultFixed64",
+	Tag:           "fixed64,110,opt,name=no_default_fixed64",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4170,7 +3828,7 @@
 	ExtensionType: (*int32)(nil),
 	Field:         111,
 	Name:          "test_proto.no_default_sfixed32",
-	Tag:           "fixed32,111,opt,name=no_default_sfixed32,json=noDefaultSfixed32",
+	Tag:           "fixed32,111,opt,name=no_default_sfixed32",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4179,7 +3837,7 @@
 	ExtensionType: (*int64)(nil),
 	Field:         112,
 	Name:          "test_proto.no_default_sfixed64",
-	Tag:           "fixed64,112,opt,name=no_default_sfixed64,json=noDefaultSfixed64",
+	Tag:           "fixed64,112,opt,name=no_default_sfixed64",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4188,7 +3846,7 @@
 	ExtensionType: (*bool)(nil),
 	Field:         113,
 	Name:          "test_proto.no_default_bool",
-	Tag:           "varint,113,opt,name=no_default_bool,json=noDefaultBool",
+	Tag:           "varint,113,opt,name=no_default_bool",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4197,7 +3855,7 @@
 	ExtensionType: (*string)(nil),
 	Field:         114,
 	Name:          "test_proto.no_default_string",
-	Tag:           "bytes,114,opt,name=no_default_string,json=noDefaultString",
+	Tag:           "bytes,114,opt,name=no_default_string",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4206,7 +3864,7 @@
 	ExtensionType: ([]byte)(nil),
 	Field:         115,
 	Name:          "test_proto.no_default_bytes",
-	Tag:           "bytes,115,opt,name=no_default_bytes,json=noDefaultBytes",
+	Tag:           "bytes,115,opt,name=no_default_bytes",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4215,7 +3873,7 @@
 	ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil),
 	Field:         116,
 	Name:          "test_proto.no_default_enum",
-	Tag:           "varint,116,opt,name=no_default_enum,json=noDefaultEnum,enum=test_proto.DefaultsMessage_DefaultsEnum",
+	Tag:           "varint,116,opt,name=no_default_enum,enum=test_proto.DefaultsMessage_DefaultsEnum",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4224,7 +3882,7 @@
 	ExtensionType: (*float64)(nil),
 	Field:         201,
 	Name:          "test_proto.default_double",
-	Tag:           "fixed64,201,opt,name=default_double,json=defaultDouble,def=3.1415",
+	Tag:           "fixed64,201,opt,name=default_double,def=3.1415",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4233,7 +3891,7 @@
 	ExtensionType: (*float32)(nil),
 	Field:         202,
 	Name:          "test_proto.default_float",
-	Tag:           "fixed32,202,opt,name=default_float,json=defaultFloat,def=3.14",
+	Tag:           "fixed32,202,opt,name=default_float,def=3.14",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4242,7 +3900,7 @@
 	ExtensionType: (*int32)(nil),
 	Field:         203,
 	Name:          "test_proto.default_int32",
-	Tag:           "varint,203,opt,name=default_int32,json=defaultInt32,def=42",
+	Tag:           "varint,203,opt,name=default_int32,def=42",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4251,7 +3909,7 @@
 	ExtensionType: (*int64)(nil),
 	Field:         204,
 	Name:          "test_proto.default_int64",
-	Tag:           "varint,204,opt,name=default_int64,json=defaultInt64,def=43",
+	Tag:           "varint,204,opt,name=default_int64,def=43",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4260,7 +3918,7 @@
 	ExtensionType: (*uint32)(nil),
 	Field:         205,
 	Name:          "test_proto.default_uint32",
-	Tag:           "varint,205,opt,name=default_uint32,json=defaultUint32,def=44",
+	Tag:           "varint,205,opt,name=default_uint32,def=44",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4269,7 +3927,7 @@
 	ExtensionType: (*uint64)(nil),
 	Field:         206,
 	Name:          "test_proto.default_uint64",
-	Tag:           "varint,206,opt,name=default_uint64,json=defaultUint64,def=45",
+	Tag:           "varint,206,opt,name=default_uint64,def=45",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4278,7 +3936,7 @@
 	ExtensionType: (*int32)(nil),
 	Field:         207,
 	Name:          "test_proto.default_sint32",
-	Tag:           "zigzag32,207,opt,name=default_sint32,json=defaultSint32,def=46",
+	Tag:           "zigzag32,207,opt,name=default_sint32,def=46",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4287,7 +3945,7 @@
 	ExtensionType: (*int64)(nil),
 	Field:         208,
 	Name:          "test_proto.default_sint64",
-	Tag:           "zigzag64,208,opt,name=default_sint64,json=defaultSint64,def=47",
+	Tag:           "zigzag64,208,opt,name=default_sint64,def=47",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4296,7 +3954,7 @@
 	ExtensionType: (*uint32)(nil),
 	Field:         209,
 	Name:          "test_proto.default_fixed32",
-	Tag:           "fixed32,209,opt,name=default_fixed32,json=defaultFixed32,def=48",
+	Tag:           "fixed32,209,opt,name=default_fixed32,def=48",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4305,7 +3963,7 @@
 	ExtensionType: (*uint64)(nil),
 	Field:         210,
 	Name:          "test_proto.default_fixed64",
-	Tag:           "fixed64,210,opt,name=default_fixed64,json=defaultFixed64,def=49",
+	Tag:           "fixed64,210,opt,name=default_fixed64,def=49",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4314,7 +3972,7 @@
 	ExtensionType: (*int32)(nil),
 	Field:         211,
 	Name:          "test_proto.default_sfixed32",
-	Tag:           "fixed32,211,opt,name=default_sfixed32,json=defaultSfixed32,def=50",
+	Tag:           "fixed32,211,opt,name=default_sfixed32,def=50",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4323,7 +3981,7 @@
 	ExtensionType: (*int64)(nil),
 	Field:         212,
 	Name:          "test_proto.default_sfixed64",
-	Tag:           "fixed64,212,opt,name=default_sfixed64,json=defaultSfixed64,def=51",
+	Tag:           "fixed64,212,opt,name=default_sfixed64,def=51",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4332,7 +3990,7 @@
 	ExtensionType: (*bool)(nil),
 	Field:         213,
 	Name:          "test_proto.default_bool",
-	Tag:           "varint,213,opt,name=default_bool,json=defaultBool,def=1",
+	Tag:           "varint,213,opt,name=default_bool,def=1",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4341,7 +3999,7 @@
 	ExtensionType: (*string)(nil),
 	Field:         214,
 	Name:          "test_proto.default_string",
-	Tag:           "bytes,214,opt,name=default_string,json=defaultString,def=Hello, string,def=foo",
+	Tag:           "bytes,214,opt,name=default_string,def=Hello, string,def=foo",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4350,7 +4008,7 @@
 	ExtensionType: ([]byte)(nil),
 	Field:         215,
 	Name:          "test_proto.default_bytes",
-	Tag:           "bytes,215,opt,name=default_bytes,json=defaultBytes,def=Hello, bytes",
+	Tag:           "bytes,215,opt,name=default_bytes,def=Hello, bytes",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4359,7 +4017,7 @@
 	ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil),
 	Field:         216,
 	Name:          "test_proto.default_enum",
-	Tag:           "varint,216,opt,name=default_enum,json=defaultEnum,enum=test_proto.DefaultsMessage_DefaultsEnum,def=1",
+	Tag:           "varint,216,opt,name=default_enum,enum=test_proto.DefaultsMessage_DefaultsEnum,def=1",
 	Filename:      "test_proto/test.proto",
 }
 
@@ -4814,6 +4472,12 @@
 }
 
 func init() {
+	proto.RegisterEnum("test_proto.FOO", FOO_name, FOO_value)
+	proto.RegisterEnum("test_proto.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value)
+	proto.RegisterEnum("test_proto.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value)
+	proto.RegisterEnum("test_proto.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value)
+	proto.RegisterEnum("test_proto.Defaults_Color", Defaults_Color_name, Defaults_Color_value)
+	proto.RegisterEnum("test_proto.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value)
 	proto.RegisterType((*GoEnum)(nil), "test_proto.GoEnum")
 	proto.RegisterType((*GoTestField)(nil), "test_proto.GoTestField")
 	proto.RegisterType((*GoTest)(nil), "test_proto.GoTest")
@@ -4836,6 +4500,9 @@
 	proto.RegisterType((*RequiredInnerMessage)(nil), "test_proto.RequiredInnerMessage")
 	proto.RegisterType((*MyMessage)(nil), "test_proto.MyMessage")
 	proto.RegisterType((*MyMessage_SomeGroup)(nil), "test_proto.MyMessage.SomeGroup")
+	proto.RegisterExtension(E_Ext_More)
+	proto.RegisterExtension(E_Ext_Text)
+	proto.RegisterExtension(E_Ext_Number)
 	proto.RegisterType((*Ext)(nil), "test_proto.Ext")
 	proto.RegisterMapType((map[int32]int32)(nil), "test_proto.Ext.MapFieldEntry")
 	proto.RegisterType((*ComplexExtension)(nil), "test_proto.ComplexExtension")
@@ -4865,15 +4532,6 @@
 	proto.RegisterType((*TestUTF8)(nil), "test_proto.TestUTF8")
 	proto.RegisterMapType((map[string]int64)(nil), "test_proto.TestUTF8.MapKeyEntry")
 	proto.RegisterMapType((map[int64]string)(nil), "test_proto.TestUTF8.MapValueEntry")
-	proto.RegisterEnum("test_proto.FOO", FOO_name, FOO_value)
-	proto.RegisterEnum("test_proto.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value)
-	proto.RegisterEnum("test_proto.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value)
-	proto.RegisterEnum("test_proto.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value)
-	proto.RegisterEnum("test_proto.Defaults_Color", Defaults_Color_name, Defaults_Color_value)
-	proto.RegisterEnum("test_proto.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value)
-	proto.RegisterExtension(E_Ext_More)
-	proto.RegisterExtension(E_Ext_Text)
-	proto.RegisterExtension(E_Ext_Number)
 	proto.RegisterExtension(E_Greeting)
 	proto.RegisterExtension(E_Complex)
 	proto.RegisterExtension(E_RComplex)
@@ -4961,9 +4619,9 @@
 	proto.RegisterExtension(E_X250)
 }
 
-func init() { proto.RegisterFile("test_proto/test.proto", fileDescriptor_test_ee9f66cbbebc227c) }
+func init() { proto.RegisterFile("test_proto/test.proto", fileDescriptor_8ca34d01332f1402) }
 
-var fileDescriptor_test_ee9f66cbbebc227c = []byte{
+var fileDescriptor_8ca34d01332f1402 = []byte{
 	// 4795 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x5b, 0xd9, 0x73, 0x1b, 0x47,
 	0x7a, 0xd7, 0x0c, 0xee, 0x0f, 0x20, 0x31, 0x6c, 0xc9, 0x12, 0x44, 0x59, 0xd2, 0x08, 0x6b, 0xaf,
diff --git a/proto/text.go b/proto/text.go
index 2205fda..1aaee72 100644
--- a/proto/text.go
+++ b/proto/text.go
@@ -353,7 +353,7 @@
 						return err
 					}
 				}
-				if err := tm.writeAny(w, key, props.mkeyprop); err != nil {
+				if err := tm.writeAny(w, key, props.MapKeyProp); err != nil {
 					return err
 				}
 				if err := w.WriteByte('\n'); err != nil {
@@ -370,7 +370,7 @@
 							return err
 						}
 					}
-					if err := tm.writeAny(w, val, props.mvalprop); err != nil {
+					if err := tm.writeAny(w, val, props.MapValProp); err != nil {
 						return err
 					}
 					if err := w.WriteByte('\n'); err != nil {
diff --git a/proto/text_parser.go b/proto/text_parser.go
index 0685bae..bb55a3a 100644
--- a/proto/text_parser.go
+++ b/proto/text_parser.go
@@ -630,17 +630,17 @@
 					if err := p.consumeToken(":"); err != nil {
 						return err
 					}
-					if err := p.readAny(key, props.mkeyprop); err != nil {
+					if err := p.readAny(key, props.MapKeyProp); err != nil {
 						return err
 					}
 					if err := p.consumeOptionalSeparator(); err != nil {
 						return err
 					}
 				case "value":
-					if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil {
+					if err := p.checkForColon(props.MapValProp, dst.Type().Elem()); err != nil {
 						return err
 					}
-					if err := p.readAny(val, props.mvalprop); err != nil {
+					if err := p.readAny(val, props.MapValProp); err != nil {
 						return err
 					}
 					if err := p.consumeOptionalSeparator(); err != nil {
diff --git a/protoc-gen-go/descriptor/descriptor.pb.go b/protoc-gen-go/descriptor/descriptor.pb.go
index e855b1f..1ded05b 100644
--- a/protoc-gen-go/descriptor/descriptor.pb.go
+++ b/protoc-gen-go/descriptor/descriptor.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: google/protobuf/descriptor.proto
 
-package descriptor // import "github.com/golang/protobuf/protoc-gen-go/descriptor"
+package descriptor
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type FieldDescriptorProto_Type int32
 
@@ -72,6 +74,7 @@
 	17: "TYPE_SINT32",
 	18: "TYPE_SINT64",
 }
+
 var FieldDescriptorProto_Type_value = map[string]int32{
 	"TYPE_DOUBLE":   1,
 	"TYPE_FLOAT":    2,
@@ -98,9 +101,11 @@
 	*p = x
 	return p
 }
+
 func (x FieldDescriptorProto_Type) String() string {
 	return proto.EnumName(FieldDescriptorProto_Type_name, int32(x))
 }
+
 func (x *FieldDescriptorProto_Type) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Type_value, data, "FieldDescriptorProto_Type")
 	if err != nil {
@@ -109,8 +114,9 @@
 	*x = FieldDescriptorProto_Type(value)
 	return nil
 }
+
 func (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{4, 0}
+	return fileDescriptor_e5baabe45344a177, []int{4, 0}
 }
 
 type FieldDescriptorProto_Label int32
@@ -127,6 +133,7 @@
 	2: "LABEL_REQUIRED",
 	3: "LABEL_REPEATED",
 }
+
 var FieldDescriptorProto_Label_value = map[string]int32{
 	"LABEL_OPTIONAL": 1,
 	"LABEL_REQUIRED": 2,
@@ -138,9 +145,11 @@
 	*p = x
 	return p
 }
+
 func (x FieldDescriptorProto_Label) String() string {
 	return proto.EnumName(FieldDescriptorProto_Label_name, int32(x))
 }
+
 func (x *FieldDescriptorProto_Label) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Label_value, data, "FieldDescriptorProto_Label")
 	if err != nil {
@@ -149,8 +158,9 @@
 	*x = FieldDescriptorProto_Label(value)
 	return nil
 }
+
 func (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{4, 1}
+	return fileDescriptor_e5baabe45344a177, []int{4, 1}
 }
 
 // Generated classes can be optimized for speed or code size.
@@ -168,6 +178,7 @@
 	2: "CODE_SIZE",
 	3: "LITE_RUNTIME",
 }
+
 var FileOptions_OptimizeMode_value = map[string]int32{
 	"SPEED":        1,
 	"CODE_SIZE":    2,
@@ -179,9 +190,11 @@
 	*p = x
 	return p
 }
+
 func (x FileOptions_OptimizeMode) String() string {
 	return proto.EnumName(FileOptions_OptimizeMode_name, int32(x))
 }
+
 func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(FileOptions_OptimizeMode_value, data, "FileOptions_OptimizeMode")
 	if err != nil {
@@ -190,8 +203,9 @@
 	*x = FileOptions_OptimizeMode(value)
 	return nil
 }
+
 func (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{10, 0}
+	return fileDescriptor_e5baabe45344a177, []int{10, 0}
 }
 
 type FieldOptions_CType int32
@@ -208,6 +222,7 @@
 	1: "CORD",
 	2: "STRING_PIECE",
 }
+
 var FieldOptions_CType_value = map[string]int32{
 	"STRING":       0,
 	"CORD":         1,
@@ -219,9 +234,11 @@
 	*p = x
 	return p
 }
+
 func (x FieldOptions_CType) String() string {
 	return proto.EnumName(FieldOptions_CType_name, int32(x))
 }
+
 func (x *FieldOptions_CType) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(FieldOptions_CType_value, data, "FieldOptions_CType")
 	if err != nil {
@@ -230,8 +247,9 @@
 	*x = FieldOptions_CType(value)
 	return nil
 }
+
 func (FieldOptions_CType) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{12, 0}
+	return fileDescriptor_e5baabe45344a177, []int{12, 0}
 }
 
 type FieldOptions_JSType int32
@@ -250,6 +268,7 @@
 	1: "JS_STRING",
 	2: "JS_NUMBER",
 }
+
 var FieldOptions_JSType_value = map[string]int32{
 	"JS_NORMAL": 0,
 	"JS_STRING": 1,
@@ -261,9 +280,11 @@
 	*p = x
 	return p
 }
+
 func (x FieldOptions_JSType) String() string {
 	return proto.EnumName(FieldOptions_JSType_name, int32(x))
 }
+
 func (x *FieldOptions_JSType) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(FieldOptions_JSType_value, data, "FieldOptions_JSType")
 	if err != nil {
@@ -272,8 +293,9 @@
 	*x = FieldOptions_JSType(value)
 	return nil
 }
+
 func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{12, 1}
+	return fileDescriptor_e5baabe45344a177, []int{12, 1}
 }
 
 // Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
@@ -292,6 +314,7 @@
 	1: "NO_SIDE_EFFECTS",
 	2: "IDEMPOTENT",
 }
+
 var MethodOptions_IdempotencyLevel_value = map[string]int32{
 	"IDEMPOTENCY_UNKNOWN": 0,
 	"NO_SIDE_EFFECTS":     1,
@@ -303,9 +326,11 @@
 	*p = x
 	return p
 }
+
 func (x MethodOptions_IdempotencyLevel) String() string {
 	return proto.EnumName(MethodOptions_IdempotencyLevel_name, int32(x))
 }
+
 func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(MethodOptions_IdempotencyLevel_value, data, "MethodOptions_IdempotencyLevel")
 	if err != nil {
@@ -314,8 +339,9 @@
 	*x = MethodOptions_IdempotencyLevel(value)
 	return nil
 }
+
 func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{17, 0}
+	return fileDescriptor_e5baabe45344a177, []int{17, 0}
 }
 
 // The protocol compiler can output a FileDescriptorSet containing the .proto
@@ -331,16 +357,17 @@
 func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) }
 func (*FileDescriptorSet) ProtoMessage()    {}
 func (*FileDescriptorSet) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{0}
+	return fileDescriptor_e5baabe45344a177, []int{0}
 }
+
 func (m *FileDescriptorSet) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_FileDescriptorSet.Unmarshal(m, b)
 }
 func (m *FileDescriptorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_FileDescriptorSet.Marshal(b, m, deterministic)
 }
-func (dst *FileDescriptorSet) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_FileDescriptorSet.Merge(dst, src)
+func (m *FileDescriptorSet) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_FileDescriptorSet.Merge(m, src)
 }
 func (m *FileDescriptorSet) XXX_Size() int {
 	return xxx_messageInfo_FileDescriptorSet.Size(m)
@@ -392,16 +419,17 @@
 func (m *FileDescriptorProto) String() string { return proto.CompactTextString(m) }
 func (*FileDescriptorProto) ProtoMessage()    {}
 func (*FileDescriptorProto) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{1}
+	return fileDescriptor_e5baabe45344a177, []int{1}
 }
+
 func (m *FileDescriptorProto) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_FileDescriptorProto.Unmarshal(m, b)
 }
 func (m *FileDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_FileDescriptorProto.Marshal(b, m, deterministic)
 }
-func (dst *FileDescriptorProto) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_FileDescriptorProto.Merge(dst, src)
+func (m *FileDescriptorProto) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_FileDescriptorProto.Merge(m, src)
 }
 func (m *FileDescriptorProto) XXX_Size() int {
 	return xxx_messageInfo_FileDescriptorProto.Size(m)
@@ -519,16 +547,17 @@
 func (m *DescriptorProto) String() string { return proto.CompactTextString(m) }
 func (*DescriptorProto) ProtoMessage()    {}
 func (*DescriptorProto) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{2}
+	return fileDescriptor_e5baabe45344a177, []int{2}
 }
+
 func (m *DescriptorProto) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_DescriptorProto.Unmarshal(m, b)
 }
 func (m *DescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_DescriptorProto.Marshal(b, m, deterministic)
 }
-func (dst *DescriptorProto) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_DescriptorProto.Merge(dst, src)
+func (m *DescriptorProto) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_DescriptorProto.Merge(m, src)
 }
 func (m *DescriptorProto) XXX_Size() int {
 	return xxx_messageInfo_DescriptorProto.Size(m)
@@ -622,16 +651,17 @@
 func (m *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(m) }
 func (*DescriptorProto_ExtensionRange) ProtoMessage()    {}
 func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{2, 0}
+	return fileDescriptor_e5baabe45344a177, []int{2, 0}
 }
+
 func (m *DescriptorProto_ExtensionRange) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_DescriptorProto_ExtensionRange.Unmarshal(m, b)
 }
 func (m *DescriptorProto_ExtensionRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_DescriptorProto_ExtensionRange.Marshal(b, m, deterministic)
 }
-func (dst *DescriptorProto_ExtensionRange) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_DescriptorProto_ExtensionRange.Merge(dst, src)
+func (m *DescriptorProto_ExtensionRange) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_DescriptorProto_ExtensionRange.Merge(m, src)
 }
 func (m *DescriptorProto_ExtensionRange) XXX_Size() int {
 	return xxx_messageInfo_DescriptorProto_ExtensionRange.Size(m)
@@ -678,16 +708,17 @@
 func (m *DescriptorProto_ReservedRange) String() string { return proto.CompactTextString(m) }
 func (*DescriptorProto_ReservedRange) ProtoMessage()    {}
 func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{2, 1}
+	return fileDescriptor_e5baabe45344a177, []int{2, 1}
 }
+
 func (m *DescriptorProto_ReservedRange) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_DescriptorProto_ReservedRange.Unmarshal(m, b)
 }
 func (m *DescriptorProto_ReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_DescriptorProto_ReservedRange.Marshal(b, m, deterministic)
 }
-func (dst *DescriptorProto_ReservedRange) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_DescriptorProto_ReservedRange.Merge(dst, src)
+func (m *DescriptorProto_ReservedRange) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_DescriptorProto_ReservedRange.Merge(m, src)
 }
 func (m *DescriptorProto_ReservedRange) XXX_Size() int {
 	return xxx_messageInfo_DescriptorProto_ReservedRange.Size(m)
@@ -725,7 +756,7 @@
 func (m *ExtensionRangeOptions) String() string { return proto.CompactTextString(m) }
 func (*ExtensionRangeOptions) ProtoMessage()    {}
 func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{3}
+	return fileDescriptor_e5baabe45344a177, []int{3}
 }
 
 var extRange_ExtensionRangeOptions = []proto.ExtensionRange{
@@ -735,14 +766,15 @@
 func (*ExtensionRangeOptions) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_ExtensionRangeOptions
 }
+
 func (m *ExtensionRangeOptions) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_ExtensionRangeOptions.Unmarshal(m, b)
 }
 func (m *ExtensionRangeOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_ExtensionRangeOptions.Marshal(b, m, deterministic)
 }
-func (dst *ExtensionRangeOptions) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ExtensionRangeOptions.Merge(dst, src)
+func (m *ExtensionRangeOptions) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ExtensionRangeOptions.Merge(m, src)
 }
 func (m *ExtensionRangeOptions) XXX_Size() int {
 	return xxx_messageInfo_ExtensionRangeOptions.Size(m)
@@ -801,16 +833,17 @@
 func (m *FieldDescriptorProto) String() string { return proto.CompactTextString(m) }
 func (*FieldDescriptorProto) ProtoMessage()    {}
 func (*FieldDescriptorProto) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{4}
+	return fileDescriptor_e5baabe45344a177, []int{4}
 }
+
 func (m *FieldDescriptorProto) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_FieldDescriptorProto.Unmarshal(m, b)
 }
 func (m *FieldDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_FieldDescriptorProto.Marshal(b, m, deterministic)
 }
-func (dst *FieldDescriptorProto) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_FieldDescriptorProto.Merge(dst, src)
+func (m *FieldDescriptorProto) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_FieldDescriptorProto.Merge(m, src)
 }
 func (m *FieldDescriptorProto) XXX_Size() int {
 	return xxx_messageInfo_FieldDescriptorProto.Size(m)
@@ -904,16 +937,17 @@
 func (m *OneofDescriptorProto) String() string { return proto.CompactTextString(m) }
 func (*OneofDescriptorProto) ProtoMessage()    {}
 func (*OneofDescriptorProto) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{5}
+	return fileDescriptor_e5baabe45344a177, []int{5}
 }
+
 func (m *OneofDescriptorProto) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_OneofDescriptorProto.Unmarshal(m, b)
 }
 func (m *OneofDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_OneofDescriptorProto.Marshal(b, m, deterministic)
 }
-func (dst *OneofDescriptorProto) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_OneofDescriptorProto.Merge(dst, src)
+func (m *OneofDescriptorProto) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OneofDescriptorProto.Merge(m, src)
 }
 func (m *OneofDescriptorProto) XXX_Size() int {
 	return xxx_messageInfo_OneofDescriptorProto.Size(m)
@@ -959,16 +993,17 @@
 func (m *EnumDescriptorProto) String() string { return proto.CompactTextString(m) }
 func (*EnumDescriptorProto) ProtoMessage()    {}
 func (*EnumDescriptorProto) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{6}
+	return fileDescriptor_e5baabe45344a177, []int{6}
 }
+
 func (m *EnumDescriptorProto) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_EnumDescriptorProto.Unmarshal(m, b)
 }
 func (m *EnumDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_EnumDescriptorProto.Marshal(b, m, deterministic)
 }
-func (dst *EnumDescriptorProto) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_EnumDescriptorProto.Merge(dst, src)
+func (m *EnumDescriptorProto) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_EnumDescriptorProto.Merge(m, src)
 }
 func (m *EnumDescriptorProto) XXX_Size() int {
 	return xxx_messageInfo_EnumDescriptorProto.Size(m)
@@ -1032,16 +1067,17 @@
 func (m *EnumDescriptorProto_EnumReservedRange) String() string { return proto.CompactTextString(m) }
 func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage()    {}
 func (*EnumDescriptorProto_EnumReservedRange) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{6, 0}
+	return fileDescriptor_e5baabe45344a177, []int{6, 0}
 }
+
 func (m *EnumDescriptorProto_EnumReservedRange) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Unmarshal(m, b)
 }
 func (m *EnumDescriptorProto_EnumReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Marshal(b, m, deterministic)
 }
-func (dst *EnumDescriptorProto_EnumReservedRange) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Merge(dst, src)
+func (m *EnumDescriptorProto_EnumReservedRange) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Merge(m, src)
 }
 func (m *EnumDescriptorProto_EnumReservedRange) XXX_Size() int {
 	return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Size(m)
@@ -1080,16 +1116,17 @@
 func (m *EnumValueDescriptorProto) String() string { return proto.CompactTextString(m) }
 func (*EnumValueDescriptorProto) ProtoMessage()    {}
 func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{7}
+	return fileDescriptor_e5baabe45344a177, []int{7}
 }
+
 func (m *EnumValueDescriptorProto) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_EnumValueDescriptorProto.Unmarshal(m, b)
 }
 func (m *EnumValueDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_EnumValueDescriptorProto.Marshal(b, m, deterministic)
 }
-func (dst *EnumValueDescriptorProto) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_EnumValueDescriptorProto.Merge(dst, src)
+func (m *EnumValueDescriptorProto) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_EnumValueDescriptorProto.Merge(m, src)
 }
 func (m *EnumValueDescriptorProto) XXX_Size() int {
 	return xxx_messageInfo_EnumValueDescriptorProto.Size(m)
@@ -1135,16 +1172,17 @@
 func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) }
 func (*ServiceDescriptorProto) ProtoMessage()    {}
 func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{8}
+	return fileDescriptor_e5baabe45344a177, []int{8}
 }
+
 func (m *ServiceDescriptorProto) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_ServiceDescriptorProto.Unmarshal(m, b)
 }
 func (m *ServiceDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_ServiceDescriptorProto.Marshal(b, m, deterministic)
 }
-func (dst *ServiceDescriptorProto) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ServiceDescriptorProto.Merge(dst, src)
+func (m *ServiceDescriptorProto) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ServiceDescriptorProto.Merge(m, src)
 }
 func (m *ServiceDescriptorProto) XXX_Size() int {
 	return xxx_messageInfo_ServiceDescriptorProto.Size(m)
@@ -1197,16 +1235,17 @@
 func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) }
 func (*MethodDescriptorProto) ProtoMessage()    {}
 func (*MethodDescriptorProto) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{9}
+	return fileDescriptor_e5baabe45344a177, []int{9}
 }
+
 func (m *MethodDescriptorProto) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MethodDescriptorProto.Unmarshal(m, b)
 }
 func (m *MethodDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MethodDescriptorProto.Marshal(b, m, deterministic)
 }
-func (dst *MethodDescriptorProto) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MethodDescriptorProto.Merge(dst, src)
+func (m *MethodDescriptorProto) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MethodDescriptorProto.Merge(m, src)
 }
 func (m *MethodDescriptorProto) XXX_Size() int {
 	return xxx_messageInfo_MethodDescriptorProto.Size(m)
@@ -1336,6 +1375,14 @@
 	// is empty. When this option is empty, the package name will be used for
 	// determining the namespace.
 	PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"`
+	// Use this option to change the namespace of php generated metadata classes.
+	// Default is empty. When this option is empty, the proto file name will be used
+	// for determining the namespace.
+	PhpMetadataNamespace *string `protobuf:"bytes,44,opt,name=php_metadata_namespace,json=phpMetadataNamespace" json:"php_metadata_namespace,omitempty"`
+	// Use this option to change the package of ruby generated classes. Default
+	// is empty. When this option is not set, the package name will be used for
+	// determining the ruby package.
+	RubyPackage *string `protobuf:"bytes,45,opt,name=ruby_package,json=rubyPackage" json:"ruby_package,omitempty"`
 	// The parser stores options it doesn't recognize here.
 	// See the documentation for the "Options" section above.
 	UninterpretedOption          []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
@@ -1349,7 +1396,7 @@
 func (m *FileOptions) String() string { return proto.CompactTextString(m) }
 func (*FileOptions) ProtoMessage()    {}
 func (*FileOptions) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{10}
+	return fileDescriptor_e5baabe45344a177, []int{10}
 }
 
 var extRange_FileOptions = []proto.ExtensionRange{
@@ -1359,14 +1406,15 @@
 func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_FileOptions
 }
+
 func (m *FileOptions) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_FileOptions.Unmarshal(m, b)
 }
 func (m *FileOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_FileOptions.Marshal(b, m, deterministic)
 }
-func (dst *FileOptions) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_FileOptions.Merge(dst, src)
+func (m *FileOptions) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_FileOptions.Merge(m, src)
 }
 func (m *FileOptions) XXX_Size() int {
 	return xxx_messageInfo_FileOptions.Size(m)
@@ -1514,6 +1562,20 @@
 	return ""
 }
 
+func (m *FileOptions) GetPhpMetadataNamespace() string {
+	if m != nil && m.PhpMetadataNamespace != nil {
+		return *m.PhpMetadataNamespace
+	}
+	return ""
+}
+
+func (m *FileOptions) GetRubyPackage() string {
+	if m != nil && m.RubyPackage != nil {
+		return *m.RubyPackage
+	}
+	return ""
+}
+
 func (m *FileOptions) GetUninterpretedOption() []*UninterpretedOption {
 	if m != nil {
 		return m.UninterpretedOption
@@ -1584,7 +1646,7 @@
 func (m *MessageOptions) String() string { return proto.CompactTextString(m) }
 func (*MessageOptions) ProtoMessage()    {}
 func (*MessageOptions) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{11}
+	return fileDescriptor_e5baabe45344a177, []int{11}
 }
 
 var extRange_MessageOptions = []proto.ExtensionRange{
@@ -1594,14 +1656,15 @@
 func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_MessageOptions
 }
+
 func (m *MessageOptions) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MessageOptions.Unmarshal(m, b)
 }
 func (m *MessageOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MessageOptions.Marshal(b, m, deterministic)
 }
-func (dst *MessageOptions) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MessageOptions.Merge(dst, src)
+func (m *MessageOptions) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MessageOptions.Merge(m, src)
 }
 func (m *MessageOptions) XXX_Size() int {
 	return xxx_messageInfo_MessageOptions.Size(m)
@@ -1723,7 +1786,7 @@
 func (m *FieldOptions) String() string { return proto.CompactTextString(m) }
 func (*FieldOptions) ProtoMessage()    {}
 func (*FieldOptions) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{12}
+	return fileDescriptor_e5baabe45344a177, []int{12}
 }
 
 var extRange_FieldOptions = []proto.ExtensionRange{
@@ -1733,14 +1796,15 @@
 func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_FieldOptions
 }
+
 func (m *FieldOptions) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_FieldOptions.Unmarshal(m, b)
 }
 func (m *FieldOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_FieldOptions.Marshal(b, m, deterministic)
 }
-func (dst *FieldOptions) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_FieldOptions.Merge(dst, src)
+func (m *FieldOptions) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_FieldOptions.Merge(m, src)
 }
 func (m *FieldOptions) XXX_Size() int {
 	return xxx_messageInfo_FieldOptions.Size(m)
@@ -1819,7 +1883,7 @@
 func (m *OneofOptions) String() string { return proto.CompactTextString(m) }
 func (*OneofOptions) ProtoMessage()    {}
 func (*OneofOptions) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{13}
+	return fileDescriptor_e5baabe45344a177, []int{13}
 }
 
 var extRange_OneofOptions = []proto.ExtensionRange{
@@ -1829,14 +1893,15 @@
 func (*OneofOptions) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_OneofOptions
 }
+
 func (m *OneofOptions) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_OneofOptions.Unmarshal(m, b)
 }
 func (m *OneofOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_OneofOptions.Marshal(b, m, deterministic)
 }
-func (dst *OneofOptions) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_OneofOptions.Merge(dst, src)
+func (m *OneofOptions) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OneofOptions.Merge(m, src)
 }
 func (m *OneofOptions) XXX_Size() int {
 	return xxx_messageInfo_OneofOptions.Size(m)
@@ -1875,7 +1940,7 @@
 func (m *EnumOptions) String() string { return proto.CompactTextString(m) }
 func (*EnumOptions) ProtoMessage()    {}
 func (*EnumOptions) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{14}
+	return fileDescriptor_e5baabe45344a177, []int{14}
 }
 
 var extRange_EnumOptions = []proto.ExtensionRange{
@@ -1885,14 +1950,15 @@
 func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_EnumOptions
 }
+
 func (m *EnumOptions) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_EnumOptions.Unmarshal(m, b)
 }
 func (m *EnumOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_EnumOptions.Marshal(b, m, deterministic)
 }
-func (dst *EnumOptions) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_EnumOptions.Merge(dst, src)
+func (m *EnumOptions) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_EnumOptions.Merge(m, src)
 }
 func (m *EnumOptions) XXX_Size() int {
 	return xxx_messageInfo_EnumOptions.Size(m)
@@ -1944,7 +2010,7 @@
 func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) }
 func (*EnumValueOptions) ProtoMessage()    {}
 func (*EnumValueOptions) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{15}
+	return fileDescriptor_e5baabe45344a177, []int{15}
 }
 
 var extRange_EnumValueOptions = []proto.ExtensionRange{
@@ -1954,14 +2020,15 @@
 func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_EnumValueOptions
 }
+
 func (m *EnumValueOptions) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_EnumValueOptions.Unmarshal(m, b)
 }
 func (m *EnumValueOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_EnumValueOptions.Marshal(b, m, deterministic)
 }
-func (dst *EnumValueOptions) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_EnumValueOptions.Merge(dst, src)
+func (m *EnumValueOptions) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_EnumValueOptions.Merge(m, src)
 }
 func (m *EnumValueOptions) XXX_Size() int {
 	return xxx_messageInfo_EnumValueOptions.Size(m)
@@ -2006,7 +2073,7 @@
 func (m *ServiceOptions) String() string { return proto.CompactTextString(m) }
 func (*ServiceOptions) ProtoMessage()    {}
 func (*ServiceOptions) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{16}
+	return fileDescriptor_e5baabe45344a177, []int{16}
 }
 
 var extRange_ServiceOptions = []proto.ExtensionRange{
@@ -2016,14 +2083,15 @@
 func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_ServiceOptions
 }
+
 func (m *ServiceOptions) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_ServiceOptions.Unmarshal(m, b)
 }
 func (m *ServiceOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_ServiceOptions.Marshal(b, m, deterministic)
 }
-func (dst *ServiceOptions) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ServiceOptions.Merge(dst, src)
+func (m *ServiceOptions) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ServiceOptions.Merge(m, src)
 }
 func (m *ServiceOptions) XXX_Size() int {
 	return xxx_messageInfo_ServiceOptions.Size(m)
@@ -2069,7 +2137,7 @@
 func (m *MethodOptions) String() string { return proto.CompactTextString(m) }
 func (*MethodOptions) ProtoMessage()    {}
 func (*MethodOptions) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{17}
+	return fileDescriptor_e5baabe45344a177, []int{17}
 }
 
 var extRange_MethodOptions = []proto.ExtensionRange{
@@ -2079,14 +2147,15 @@
 func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_MethodOptions
 }
+
 func (m *MethodOptions) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_MethodOptions.Unmarshal(m, b)
 }
 func (m *MethodOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_MethodOptions.Marshal(b, m, deterministic)
 }
-func (dst *MethodOptions) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MethodOptions.Merge(dst, src)
+func (m *MethodOptions) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MethodOptions.Merge(m, src)
 }
 func (m *MethodOptions) XXX_Size() int {
 	return xxx_messageInfo_MethodOptions.Size(m)
@@ -2146,16 +2215,17 @@
 func (m *UninterpretedOption) String() string { return proto.CompactTextString(m) }
 func (*UninterpretedOption) ProtoMessage()    {}
 func (*UninterpretedOption) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{18}
+	return fileDescriptor_e5baabe45344a177, []int{18}
 }
+
 func (m *UninterpretedOption) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_UninterpretedOption.Unmarshal(m, b)
 }
 func (m *UninterpretedOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_UninterpretedOption.Marshal(b, m, deterministic)
 }
-func (dst *UninterpretedOption) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_UninterpretedOption.Merge(dst, src)
+func (m *UninterpretedOption) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_UninterpretedOption.Merge(m, src)
 }
 func (m *UninterpretedOption) XXX_Size() int {
 	return xxx_messageInfo_UninterpretedOption.Size(m)
@@ -2232,16 +2302,17 @@
 func (m *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(m) }
 func (*UninterpretedOption_NamePart) ProtoMessage()    {}
 func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{18, 0}
+	return fileDescriptor_e5baabe45344a177, []int{18, 0}
 }
+
 func (m *UninterpretedOption_NamePart) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_UninterpretedOption_NamePart.Unmarshal(m, b)
 }
 func (m *UninterpretedOption_NamePart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_UninterpretedOption_NamePart.Marshal(b, m, deterministic)
 }
-func (dst *UninterpretedOption_NamePart) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_UninterpretedOption_NamePart.Merge(dst, src)
+func (m *UninterpretedOption_NamePart) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_UninterpretedOption_NamePart.Merge(m, src)
 }
 func (m *UninterpretedOption_NamePart) XXX_Size() int {
 	return xxx_messageInfo_UninterpretedOption_NamePart.Size(m)
@@ -2322,16 +2393,17 @@
 func (m *SourceCodeInfo) String() string { return proto.CompactTextString(m) }
 func (*SourceCodeInfo) ProtoMessage()    {}
 func (*SourceCodeInfo) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{19}
+	return fileDescriptor_e5baabe45344a177, []int{19}
 }
+
 func (m *SourceCodeInfo) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_SourceCodeInfo.Unmarshal(m, b)
 }
 func (m *SourceCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_SourceCodeInfo.Marshal(b, m, deterministic)
 }
-func (dst *SourceCodeInfo) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SourceCodeInfo.Merge(dst, src)
+func (m *SourceCodeInfo) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SourceCodeInfo.Merge(m, src)
 }
 func (m *SourceCodeInfo) XXX_Size() int {
 	return xxx_messageInfo_SourceCodeInfo.Size(m)
@@ -2439,16 +2511,17 @@
 func (m *SourceCodeInfo_Location) String() string { return proto.CompactTextString(m) }
 func (*SourceCodeInfo_Location) ProtoMessage()    {}
 func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{19, 0}
+	return fileDescriptor_e5baabe45344a177, []int{19, 0}
 }
+
 func (m *SourceCodeInfo_Location) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_SourceCodeInfo_Location.Unmarshal(m, b)
 }
 func (m *SourceCodeInfo_Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_SourceCodeInfo_Location.Marshal(b, m, deterministic)
 }
-func (dst *SourceCodeInfo_Location) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SourceCodeInfo_Location.Merge(dst, src)
+func (m *SourceCodeInfo_Location) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SourceCodeInfo_Location.Merge(m, src)
 }
 func (m *SourceCodeInfo_Location) XXX_Size() int {
 	return xxx_messageInfo_SourceCodeInfo_Location.Size(m)
@@ -2510,16 +2583,17 @@
 func (m *GeneratedCodeInfo) String() string { return proto.CompactTextString(m) }
 func (*GeneratedCodeInfo) ProtoMessage()    {}
 func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{20}
+	return fileDescriptor_e5baabe45344a177, []int{20}
 }
+
 func (m *GeneratedCodeInfo) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_GeneratedCodeInfo.Unmarshal(m, b)
 }
 func (m *GeneratedCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_GeneratedCodeInfo.Marshal(b, m, deterministic)
 }
-func (dst *GeneratedCodeInfo) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GeneratedCodeInfo.Merge(dst, src)
+func (m *GeneratedCodeInfo) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GeneratedCodeInfo.Merge(m, src)
 }
 func (m *GeneratedCodeInfo) XXX_Size() int {
 	return xxx_messageInfo_GeneratedCodeInfo.Size(m)
@@ -2559,16 +2633,17 @@
 func (m *GeneratedCodeInfo_Annotation) String() string { return proto.CompactTextString(m) }
 func (*GeneratedCodeInfo_Annotation) ProtoMessage()    {}
 func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) {
-	return fileDescriptor_descriptor_4df4cb5f42392df6, []int{20, 0}
+	return fileDescriptor_e5baabe45344a177, []int{20, 0}
 }
+
 func (m *GeneratedCodeInfo_Annotation) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_GeneratedCodeInfo_Annotation.Unmarshal(m, b)
 }
 func (m *GeneratedCodeInfo_Annotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_GeneratedCodeInfo_Annotation.Marshal(b, m, deterministic)
 }
-func (dst *GeneratedCodeInfo_Annotation) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GeneratedCodeInfo_Annotation.Merge(dst, src)
+func (m *GeneratedCodeInfo_Annotation) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GeneratedCodeInfo_Annotation.Merge(m, src)
 }
 func (m *GeneratedCodeInfo_Annotation) XXX_Size() int {
 	return xxx_messageInfo_GeneratedCodeInfo_Annotation.Size(m)
@@ -2608,6 +2683,12 @@
 }
 
 func init() {
+	proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value)
+	proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value)
+	proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value)
+	proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value)
+	proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value)
+	proto.RegisterEnum("google.protobuf.MethodOptions_IdempotencyLevel", MethodOptions_IdempotencyLevel_name, MethodOptions_IdempotencyLevel_value)
 	proto.RegisterType((*FileDescriptorSet)(nil), "google.protobuf.FileDescriptorSet")
 	proto.RegisterType((*FileDescriptorProto)(nil), "google.protobuf.FileDescriptorProto")
 	proto.RegisterType((*DescriptorProto)(nil), "google.protobuf.DescriptorProto")
@@ -2635,178 +2716,172 @@
 	proto.RegisterType((*SourceCodeInfo_Location)(nil), "google.protobuf.SourceCodeInfo.Location")
 	proto.RegisterType((*GeneratedCodeInfo)(nil), "google.protobuf.GeneratedCodeInfo")
 	proto.RegisterType((*GeneratedCodeInfo_Annotation)(nil), "google.protobuf.GeneratedCodeInfo.Annotation")
-	proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value)
-	proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value)
-	proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value)
-	proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value)
-	proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value)
-	proto.RegisterEnum("google.protobuf.MethodOptions_IdempotencyLevel", MethodOptions_IdempotencyLevel_name, MethodOptions_IdempotencyLevel_value)
 }
 
-func init() {
-	proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor_descriptor_4df4cb5f42392df6)
-}
+func init() { proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor_e5baabe45344a177) }
 
-var fileDescriptor_descriptor_4df4cb5f42392df6 = []byte{
-	// 2555 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xdd, 0x6e, 0x1b, 0xc7,
-	0xf5, 0xcf, 0xf2, 0x4b, 0xe4, 0x21, 0x45, 0x8d, 0x46, 0x8a, 0xbd, 0x56, 0x3e, 0x2c, 0x33, 0x1f,
-	0x96, 0x9d, 0x7f, 0xa8, 0xc0, 0xb1, 0x1d, 0x47, 0xfe, 0x23, 0x2d, 0x45, 0xae, 0x15, 0xaa, 0x12,
-	0xc9, 0x2e, 0xa9, 0xe6, 0x03, 0x28, 0x16, 0xa3, 0xdd, 0x21, 0xb9, 0xf6, 0x72, 0x77, 0xb3, 0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-	0x58, 0x8f, 0xae, 0x53, 0x46, 0xec, 0xac, 0x63, 0x00, 0x62, 0xdb, 0x4e, 0x90, 0x74, 0xd7, 0x62,
-	0x28, 0x2f, 0xc8, 0xd5, 0x1b, 0xb1, 0x90, 0x9a, 0x50, 0xb0, 0x35, 0x01, 0x98, 0xf5, 0x9c, 0xeb,
-	0xb6, 0xab, 0x50, 0x0e, 0x3f, 0xf0, 0xf0, 0xaf, 0x84, 0xe2, 0x02, 0x0e, 0x02, 0x62, 0xf7, 0x2e,
-	0xbc, 0x09, 0xf9, 0x53, 0x3a, 0x32, 0xed, 0xf0, 0xd9, 0x56, 0x34, 0xa2, 0x67, 0x92, 0x5c, 0xfc,
-	0x4c, 0xb2, 0xff, 0x5b, 0x09, 0x36, 0x74, 0x67, 0x32, 0x6f, 0xef, 0x3e, 0x9a, 0x7b, 0x05, 0xf0,
-	0x3f, 0x96, 0x3e, 0xff, 0x68, 0x64, 0x06, 0xe3, 0xe9, 0x69, 0x5d, 0x77, 0x26, 0xbb, 0x23, 0xc7,
-	0x22, 0xf6, 0x68, 0xf6, 0x99, 0x93, 0xff, 0xd1, 0xdf, 0x1d, 0x51, 0xfb, 0xdd, 0x91, 0x93, 0xf8,
-	0xe8, 0x79, 0x7f, 0xf6, 0xf7, 0xbf, 0x92, 0xf4, 0xa7, 0x4c, 0xf6, 0xa0, 0xb7, 0xff, 0xe7, 0xcc,
-	0xd6, 0x81, 0x18, 0xae, 0x17, 0xb9, 0x47, 0xa5, 0x43, 0x8b, 0xea, 0x6c, 0xca, 0xff, 0x0b, 0x00,
-	0x00, 0xff, 0xff, 0x1a, 0x28, 0x25, 0x79, 0x42, 0x1d, 0x00, 0x00,
+var fileDescriptor_e5baabe45344a177 = []byte{
+	// 2589 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xdd, 0x8e, 0xdb, 0xc6,
+	0x15, 0x0e,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0x7d, 0x3f, 0xe5, 0x7f, 0xf4, 0x1b, 0x23, 0x6a, 0xdf, 0x18, 0x39,
+	0x89, 0xaf, 0xa9, 0xf7, 0x66, 0x7f, 0xff, 0x27, 0x49, 0x7f, 0xca, 0x64, 0x0f, 0x7a, 0xfb, 0x7f,
+	0xce, 0x6c, 0x1d, 0x88, 0xee, 0x7a, 0x51, 0x78, 0x54, 0x3a, 0xb4, 0xa8, 0xce, 0x86, 0xfc, 0xff,
+	0x00, 0x00, 0x00, 0xff, 0xff, 0x3e, 0xe8, 0xef, 0xc4, 0x9b, 0x1d, 0x00, 0x00,
 }
diff --git a/protoc-gen-go/descriptor/descriptor.proto b/protoc-gen-go/descriptor/descriptor.proto
index 8697a50..ed08fcb 100644
--- a/protoc-gen-go/descriptor/descriptor.proto
+++ b/protoc-gen-go/descriptor/descriptor.proto
@@ -417,6 +417,17 @@
   // determining the namespace.
   optional string php_namespace = 41;
 
+
+  // Use this option to change the namespace of php generated metadata classes.
+  // Default is empty. When this option is empty, the proto file name will be used
+  // for determining the namespace.
+  optional string php_metadata_namespace = 44;
+
+  // Use this option to change the package of ruby generated classes. Default
+  // is empty. When this option is not set, the package name will be used for
+  // determining the ruby package.
+  optional string ruby_package = 45;
+
   // The parser stores options it doesn't recognize here.
   // See the documentation for the "Options" section above.
   repeated UninterpretedOption uninterpreted_option = 999;
diff --git a/protoc-gen-go/generator/generator.go b/protoc-gen-go/generator/generator.go
index a2e0a5f..6f4a902 100644
--- a/protoc-gen-go/generator/generator.go
+++ b/protoc-gen-go/generator/generator.go
@@ -43,6 +43,7 @@
 	"crypto/sha256"
 	"encoding/hex"
 	"fmt"
+	"go/ast"
 	"go/build"
 	"go/parser"
 	"go/printer"
@@ -67,7 +68,7 @@
 // It is incremented whenever an incompatibility between the generated code and
 // proto package is introduced; the generated code references
 // a constant, proto.ProtoPackageIsVersionN (where N is generatedCodeVersion).
-const generatedCodeVersion = 2
+const generatedCodeVersion = 3
 
 // A Plugin provides functionality to add to the output during Go code generation,
 // such as to produce RPC stubs.
@@ -271,7 +272,6 @@
 	// This is used for supporting public imports.
 	exported map[Object][]symbol
 
-	fingerprint string        // Fingerprint of this file's contents.
 	importPath  GoImportPath  // Import path of this file's package.
 	packageName GoPackageName // Name of this file's Go package.
 
@@ -282,8 +282,8 @@
 // to the compressed bytes of this descriptor. It is not exported, so
 // it is only valid inside the generated package.
 func (d *FileDescriptor) VarName() string {
-	name := strings.Map(badToUnderscore, baseName(d.GetName()))
-	return fmt.Sprintf("fileDescriptor_%s_%s", name, d.fingerprint)
+	h := sha256.Sum256([]byte(d.GetName()))
+	return fmt.Sprintf("fileDescriptor_%s", hex.EncodeToString(h[:8]))
 }
 
 // goPackageOption interprets the file's go_package option.
@@ -340,7 +340,7 @@
 type symbol interface {
 	// GenerateAlias should generate an appropriate alias
 	// for the symbol from the named package.
-	GenerateAlias(g *Generator, pkg GoPackageName)
+	GenerateAlias(g *Generator, filename string, pkg GoPackageName)
 }
 
 type messageSymbol struct {
@@ -356,7 +356,8 @@
 	genType  bool   // whether typ contains a generated type (message/group/enum)
 }
 
-func (ms *messageSymbol) GenerateAlias(g *Generator, pkg GoPackageName) {
+func (ms *messageSymbol) GenerateAlias(g *Generator, filename string, pkg GoPackageName) {
+	g.P("// ", ms.sym, " from public import ", filename)
 	g.P("type ", ms.sym, " = ", pkg, ".", ms.sym)
 	for _, name := range ms.oneofTypes {
 		g.P("type ", name, " = ", pkg, ".", name)
@@ -368,8 +369,9 @@
 	proto3 bool // Whether this came from a proto3 file.
 }
 
-func (es enumSymbol) GenerateAlias(g *Generator, pkg GoPackageName) {
+func (es enumSymbol) GenerateAlias(g *Generator, filename string, pkg GoPackageName) {
 	s := es.name
+	g.P("// ", s, " from public import ", filename)
 	g.P("type ", s, " = ", pkg, ".", s)
 	g.P("var ", s, "_name = ", pkg, ".", s, "_name")
 	g.P("var ", s, "_value = ", pkg, ".", s, "_value")
@@ -381,7 +383,7 @@
 	cast string // if non-empty, a type cast is required (used for enums)
 }
 
-func (cs constOrVarSymbol) GenerateAlias(g *Generator, pkg GoPackageName) {
+func (cs constOrVarSymbol) GenerateAlias(g *Generator, filename string, pkg GoPackageName) {
 	v := string(pkg) + "." + cs.sym
 	if cs.cast != "" {
 		v = cs.cast + "(" + v + ")"
@@ -418,6 +420,7 @@
 	packageNames     map[GoImportPath]GoPackageName // Imported package names in the current file.
 	usedPackages     map[GoImportPath]bool          // Packages used in current file.
 	usedPackageNames map[GoPackageName]bool         // Package names used in the current file.
+	addedImports     map[GoImportPath]bool          // Additional imports to emit.
 	typeNameToObject map[string]Object              // Key is a fully-qualified name in input syntax.
 	init             []string                       // Lines to emit in the init function.
 	indent           string
@@ -532,7 +535,7 @@
 		return name
 	}
 	name := cleanPackageName(baseName(string(importPath)))
-	for i, orig := 1, name; g.usedPackageNames[name]; i++ {
+	for i, orig := 1, name; g.usedPackageNames[name] || isGoPredeclaredIdentifier[string(name)]; i++ {
 		name = orig + GoPackageName(strconv.Itoa(i))
 	}
 	g.packageNames[importPath] = name
@@ -540,6 +543,13 @@
 	return name
 }
 
+// AddImport adds a package to the generated file's import section.
+// It returns the name used for the package.
+func (g *Generator) AddImport(importPath GoImportPath) GoPackageName {
+	g.addedImports[importPath] = true
+	return g.GoPackageName(importPath)
+}
+
 var globalPackageNames = map[GoPackageName]bool{
 	"fmt":   true,
 	"math":  true,
@@ -585,9 +595,51 @@
 	"var":         true,
 }
 
+var isGoPredeclaredIdentifier = map[string]bool{
+	"append":     true,
+	"bool":       true,
+	"byte":       true,
+	"cap":        true,
+	"close":      true,
+	"complex":    true,
+	"complex128": true,
+	"complex64":  true,
+	"copy":       true,
+	"delete":     true,
+	"error":      true,
+	"false":      true,
+	"float32":    true,
+	"float64":    true,
+	"imag":       true,
+	"int":        true,
+	"int16":      true,
+	"int32":      true,
+	"int64":      true,
+	"int8":       true,
+	"iota":       true,
+	"len":        true,
+	"make":       true,
+	"new":        true,
+	"nil":        true,
+	"panic":      true,
+	"print":      true,
+	"println":    true,
+	"real":       true,
+	"recover":    true,
+	"rune":       true,
+	"string":     true,
+	"true":       true,
+	"uint":       true,
+	"uint16":     true,
+	"uint32":     true,
+	"uint64":     true,
+	"uint8":      true,
+	"uintptr":    true,
+}
+
 func cleanPackageName(name string) GoPackageName {
 	name = strings.Map(badToUnderscore, name)
-	// Identifier must not be keyword: insert _.
+	// Identifier must not be keyword or predeclared identifier: insert _.
 	if isGoKeyword[name] {
 		name = "_" + name
 	}
@@ -724,27 +776,10 @@
 		if fd == nil {
 			g.Fail("could not find file named", fileName)
 		}
-		fingerprint, err := fingerprintProto(fd.FileDescriptorProto)
-		if err != nil {
-			g.Error(err)
-		}
-		fd.fingerprint = fingerprint
 		g.genFiles = append(g.genFiles, fd)
 	}
 }
 
-// fingerprintProto returns a fingerprint for a message.
-// The fingerprint is intended to prevent conflicts between generated fileds,
-// not to provide cryptographic security.
-func fingerprintProto(m proto.Message) (string, error) {
-	b, err := proto.Marshal(m)
-	if err != nil {
-		return "", err
-	}
-	h := sha256.Sum256(b)
-	return hex.EncodeToString(h[:8]), nil
-}
-
 // Scan the descriptors in this file.  For each one, build the slice of nested descriptors
 func (g *Generator) buildNestedDescriptors(descs []*Descriptor) {
 	for _, desc := range descs {
@@ -938,39 +973,6 @@
 	if !ok {
 		g.Fail("can't find object with type", typeName)
 	}
-
-	// If the file of this object isn't a direct dependency of the current file,
-	// or in the current file, then this object has been publicly imported into
-	// a dependency of the current file.
-	// We should return the ImportedDescriptor object for it instead.
-	direct := *o.File().Name == *g.file.Name
-	if !direct {
-		for _, dep := range g.file.Dependency {
-			if *g.fileByName(dep).Name == *o.File().Name {
-				direct = true
-				break
-			}
-		}
-	}
-	if !direct {
-		found := false
-	Loop:
-		for _, dep := range g.file.Dependency {
-			df := g.fileByName(*g.fileByName(dep).Name)
-			for _, td := range df.imp {
-				if td.o == o {
-					// Found it!
-					o = td
-					found = true
-					break Loop
-				}
-			}
-		}
-		if !found {
-			log.Printf("protoc-gen-go: WARNING: failed finding publicly imported dependency for %v, used in %v", typeName, *g.file.Name)
-		}
-	}
-
 	return o
 }
 
@@ -1124,6 +1126,7 @@
 	g.usedPackages = make(map[GoImportPath]bool)
 	g.packageNames = make(map[GoImportPath]GoPackageName)
 	g.usedPackageNames = make(map[GoPackageName]bool)
+	g.addedImports = make(map[GoImportPath]bool)
 	for name := range globalPackageNames {
 		g.usedPackageNames[name] = true
 	}
@@ -1152,12 +1155,11 @@
 		g.generateExtension(ext)
 	}
 	g.generateInitFunction()
+	g.generateFileDescriptor(file)
 
 	// Run the plugins before the imports so we know which imports are necessary.
 	g.runPlugins(file)
 
-	g.generateFileDescriptor(file)
-
 	// Generate header and imports last, though they appear first in the output.
 	rem := g.Buffer
 	remAnno := g.annotations
@@ -1183,7 +1185,7 @@
 		// make a copy independent of g; we'll need it after Reset.
 		original = append([]byte(nil), original...)
 	}
-	ast, err := parser.ParseFile(fset, "", original, parser.ParseComments)
+	fileAST, err := parser.ParseFile(fset, "", original, parser.ParseComments)
 	if err != nil {
 		// Print out the bad code with line numbers.
 		// This should never happen in practice, but it can while changing generated code,
@@ -1195,8 +1197,9 @@
 		}
 		g.Fail("bad Go source code was generated:", err.Error(), "\n"+src.String())
 	}
+	ast.SortImports(fset, fileAST)
 	g.Reset()
-	err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, ast)
+	err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, fileAST)
 	if err != nil {
 		g.Fail("generated Go source code could not be reformatted:", err.Error())
 	}
@@ -1225,28 +1228,10 @@
 		g.P("// source: ", g.file.Name)
 	}
 	g.P()
-
-	importPath, _, _ := g.file.goPackageOption()
-	if importPath == "" {
-		g.P("package ", g.file.packageName)
-	} else {
-		g.P("package ", g.file.packageName, " // import ", GoImportPath(g.ImportPrefix)+importPath)
-	}
+	g.PrintComments(strconv.Itoa(packagePath))
 	g.P()
-
-	if loc, ok := g.file.comments[strconv.Itoa(packagePath)]; ok {
-		g.P("/*")
-		// not using g.PrintComments because this is a /* */ comment block.
-		text := strings.TrimSuffix(loc.GetLeadingComments(), "\n")
-		for _, line := range strings.Split(text, "\n") {
-			line = strings.TrimPrefix(line, " ")
-			// ensure we don't escape from the block comment
-			line = strings.Replace(line, "*/", "* /", -1)
-			g.P(line)
-		}
-		g.P("*/")
-		g.P()
-	}
+	g.P("package ", g.file.packageName)
+	g.P()
 }
 
 // deprecationComment is the standard comment added to deprecated
@@ -1261,16 +1246,28 @@
 	if !g.writeOutput {
 		return false
 	}
-	if loc, ok := g.file.comments[path]; ok {
-		text := strings.TrimSuffix(loc.GetLeadingComments(), "\n")
-		for _, line := range strings.Split(text, "\n") {
-			g.P("// ", strings.TrimPrefix(line, " "))
-		}
+	if c, ok := g.makeComments(path); ok {
+		g.P(c)
 		return true
 	}
 	return false
 }
 
+// makeComments generates the comment string for the field, no "\n" at the end
+func (g *Generator) makeComments(path string) (string, bool) {
+	loc, ok := g.file.comments[path]
+	if !ok {
+		return "", false
+	}
+	w := new(bytes.Buffer)
+	nl := ""
+	for _, line := range strings.Split(strings.TrimSuffix(loc.GetLeadingComments(), "\n"), "\n") {
+		fmt.Fprintf(w, "%s//%s", nl, line)
+		nl = "\n"
+	}
+	return w.String(), true
+}
+
 func (g *Generator) fileByName(filename string) *FileDescriptor {
 	return g.allFilesByName[filename]
 }
@@ -1287,17 +1284,7 @@
 
 // Generate the imports
 func (g *Generator) generateImports() {
-	// We almost always need a proto import.  Rather than computing when we
-	// do, which is tricky when there's a plugin, just import it and
-	// reference it later. The same argument applies to the fmt and math packages.
-	g.P("import "+g.Pkg["proto"]+" ", GoImportPath(g.ImportPrefix)+"github.com/golang/protobuf/proto")
-	g.P("import " + g.Pkg["fmt"] + ` "fmt"`)
-	g.P("import " + g.Pkg["math"] + ` "math"`)
-	var (
-		imports       = make(map[GoImportPath]bool)
-		strongImports = make(map[GoImportPath]bool)
-		importPaths   []string
-	)
+	imports := make(map[GoImportPath]GoPackageName)
 	for i, s := range g.file.Dependency {
 		fd := g.fileByName(s)
 		importPath := fd.importPath
@@ -1305,32 +1292,37 @@
 		if importPath == g.file.importPath {
 			continue
 		}
-		if !imports[importPath] {
-			importPaths = append(importPaths, string(importPath))
+		// Do not import weak imports.
+		if g.weak(int32(i)) {
+			continue
 		}
-		imports[importPath] = true
-		if !g.weak(int32(i)) {
-			strongImports[importPath] = true
-		}
-	}
-	sort.Strings(importPaths)
-	for i := range importPaths {
-		importPath := GoImportPath(importPaths[i])
-		packageName := g.GoPackageName(importPath)
-		fullPath := GoImportPath(g.ImportPrefix) + importPath
-		// Skip weak imports.
-		if !strongImports[importPath] {
-			g.P("// skipping weak import ", packageName, " ", fullPath)
+		// Do not import a package twice.
+		if _, ok := imports[importPath]; ok {
 			continue
 		}
 		// We need to import all the dependencies, even if we don't reference them,
 		// because other code and tools depend on having the full transitive closure
 		// of protocol buffer types in the binary.
+		packageName := g.GoPackageName(importPath)
 		if _, ok := g.usedPackages[importPath]; !ok {
 			packageName = "_"
 		}
-		g.P("import ", packageName, " ", fullPath)
+		imports[importPath] = packageName
 	}
+	for importPath := range g.addedImports {
+		imports[importPath] = g.GoPackageName(importPath)
+	}
+	// We almost always need a proto import.  Rather than computing when we
+	// do, which is tricky when there's a plugin, just import it and
+	// reference it later. The same argument applies to the fmt and math packages.
+	g.P("import (")
+	g.P(g.Pkg["fmt"] + ` "fmt"`)
+	g.P(g.Pkg["math"] + ` "math"`)
+	g.P(g.Pkg["proto"]+" ", GoImportPath(g.ImportPrefix)+"github.com/golang/protobuf/proto")
+	for importPath, packageName := range imports {
+		g.P(packageName, " ", GoImportPath(g.ImportPrefix)+importPath)
+	}
+	g.P(")")
 	g.P()
 	// TODO: may need to worry about uniqueness across plugins
 	for _, p := range plugins {
@@ -1345,24 +1337,19 @@
 }
 
 func (g *Generator) generateImported(id *ImportedDescriptor) {
-	tn := id.TypeName()
-	sn := tn[len(tn)-1]
 	df := id.o.File()
 	filename := *df.Name
 	if df.importPath == g.file.importPath {
 		// Don't generate type aliases for files in the same Go package as this one.
-		g.P("// Ignoring public import of ", sn, " from ", filename)
-		g.P()
 		return
 	}
 	if !supportTypeAliases {
 		g.Fail(fmt.Sprintf("%s: public imports require at least go1.9", filename))
 	}
-	g.P("// ", sn, " from public import ", filename)
 	g.usedPackages[df.importPath] = true
 
 	for _, sym := range df.exported[id.o] {
-		sym.GenerateAlias(g, g.GoPackageName(df.importPath))
+		sym.GenerateAlias(g, filename, g.GoPackageName(df.importPath))
 	}
 
 	g.P()
@@ -1384,7 +1371,6 @@
 	g.P("type ", Annotate(enum.file, enum.path, ccTypeName), " int32", deprecatedEnum)
 	g.file.addExport(enum, enumSymbol{ccTypeName, enum.proto3()})
 	g.P("const (")
-	g.In()
 	for i, e := range enum.Value {
 		etorPath := fmt.Sprintf("%s,%d,%d", enum.path, enumValuePath, i)
 		g.PrintComments(etorPath)
@@ -1398,10 +1384,9 @@
 		g.P(Annotate(enum.file, etorPath, name), " ", ccTypeName, " = ", e.Number, " ", deprecatedValue)
 		g.file.addExport(enum, constOrVarSymbol{name, "const", ccTypeName})
 	}
-	g.Out()
 	g.P(")")
+	g.P()
 	g.P("var ", ccTypeName, "_name = map[int32]string{")
-	g.In()
 	generated := make(map[int32]bool) // avoid duplicate values
 	for _, e := range enum.Value {
 		duplicate := ""
@@ -1411,45 +1396,39 @@
 		g.P(duplicate, e.Number, ": ", strconv.Quote(*e.Name), ",")
 		generated[*e.Number] = true
 	}
-	g.Out()
 	g.P("}")
+	g.P()
 	g.P("var ", ccTypeName, "_value = map[string]int32{")
-	g.In()
 	for _, e := range enum.Value {
 		g.P(strconv.Quote(*e.Name), ": ", e.Number, ",")
 	}
-	g.Out()
 	g.P("}")
+	g.P()
 
 	if !enum.proto3() {
 		g.P("func (x ", ccTypeName, ") Enum() *", ccTypeName, " {")
-		g.In()
 		g.P("p := new(", ccTypeName, ")")
 		g.P("*p = x")
 		g.P("return p")
-		g.Out()
 		g.P("}")
+		g.P()
 	}
 
 	g.P("func (x ", ccTypeName, ") String() string {")
-	g.In()
 	g.P("return ", g.Pkg["proto"], ".EnumName(", ccTypeName, "_name, int32(x))")
-	g.Out()
 	g.P("}")
+	g.P()
 
 	if !enum.proto3() {
 		g.P("func (x *", ccTypeName, ") UnmarshalJSON(data []byte) error {")
-		g.In()
 		g.P("value, err := ", g.Pkg["proto"], ".UnmarshalJSONEnum(", ccTypeName, `_value, data, "`, ccTypeName, `")`)
 		g.P("if err != nil {")
-		g.In()
 		g.P("return err")
-		g.Out()
 		g.P("}")
 		g.P("*x = ", ccTypeName, "(value)")
 		g.P("return nil")
-		g.Out()
 		g.P("}")
+		g.P()
 	}
 
 	var indexes []string
@@ -1459,15 +1438,15 @@
 	}
 	indexes = append(indexes, strconv.Itoa(enum.index))
 	g.P("func (", ccTypeName, ") EnumDescriptor() ([]byte, []int) {")
-	g.In()
 	g.P("return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "}")
-	g.Out()
 	g.P("}")
+	g.P()
 	if enum.file.GetPackage() == "google.protobuf" && enum.GetName() == "NullValue" {
 		g.P("func (", ccTypeName, `) XXX_WellKnownType() string { return "`, enum.GetName(), `" }`)
+		g.P()
 	}
 
-	g.P()
+	g.generateEnumRegistration(enum)
 }
 
 // The tag is a string like "varint,2,opt,name=fieldname,def=7" that
@@ -1524,6 +1503,18 @@
 				g.Fail("unknown enum type", CamelCaseSlice(obj.TypeName()))
 			}
 			defaultValue = enum.integerValueAsString(defaultValue)
+		case descriptor.FieldDescriptorProto_TYPE_FLOAT:
+			if def := defaultValue; def != "inf" && def != "-inf" && def != "nan" {
+				if f, err := strconv.ParseFloat(defaultValue, 32); err == nil {
+					defaultValue = fmt.Sprint(float32(f))
+				}
+			}
+		case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
+			if def := defaultValue; def != "inf" && def != "-inf" && def != "nan" {
+				if f, err := strconv.ParseFloat(defaultValue, 64); err == nil {
+					defaultValue = fmt.Sprint(f)
+				}
+			}
 		}
 		defaultValue = ",def=" + defaultValue
 	}
@@ -1561,7 +1552,7 @@
 			name = name[i+1:]
 		}
 	}
-	if json := field.GetJsonName(); json != "" && json != name {
+	if json := field.GetJsonName(); field.Extendee == nil && json != "" && json != name {
 		// TODO: escaping might be needed, in which case
 		// perhaps this should be in its own "json" tag.
 		name += ",json=" + json
@@ -1665,11 +1656,16 @@
 }
 
 func (g *Generator) RecordTypeUse(t string) {
-	if _, ok := g.typeNameToObject[t]; ok {
-		// Call ObjectNamed to get the true object to record the use.
-		obj := g.ObjectNamed(t)
-		g.usedPackages[obj.GoImportPath()] = true
+	if _, ok := g.typeNameToObject[t]; !ok {
+		return
 	}
+	importPath := g.ObjectNamed(t).GoImportPath()
+	if importPath == g.outputImportPath {
+		// Don't record use of objects in our package.
+		return
+	}
+	g.AddImport(importPath)
+	g.usedPackages[importPath] = true
 }
 
 // Method names that may be generated.  Fields with these names get an
@@ -1708,31 +1704,396 @@
 	"BytesValue":  true,
 }
 
-// Generate the type and default constant definitions for this Descriptor.
-func (g *Generator) generateMessage(message *Descriptor) {
-	// The full type name
-	typeName := message.TypeName()
-	// The full type name, CamelCased.
-	ccTypeName := CamelCaseSlice(typeName)
-
-	usedNames := make(map[string]bool)
-	for _, n := range methodNames {
-		usedNames[n] = true
+// getterDefault finds the default value for the field to return from a getter,
+// regardless of if it's a built in default or explicit from the source. Returns e.g. "nil", `""`, "Default_MessageType_FieldName"
+func (g *Generator) getterDefault(field *descriptor.FieldDescriptorProto, goMessageType string) string {
+	if isRepeated(field) {
+		return "nil"
 	}
-	fieldNames := make(map[*descriptor.FieldDescriptorProto]string)
-	fieldGetterNames := make(map[*descriptor.FieldDescriptorProto]string)
-	fieldTypes := make(map[*descriptor.FieldDescriptorProto]string)
-	mapFieldTypes := make(map[*descriptor.FieldDescriptorProto]string)
+	if def := field.GetDefaultValue(); def != "" {
+		defaultConstant := g.defaultConstantName(goMessageType, field.GetName())
+		if *field.Type != descriptor.FieldDescriptorProto_TYPE_BYTES {
+			return defaultConstant
+		}
+		return "append([]byte(nil), " + defaultConstant + "...)"
+	}
+	switch *field.Type {
+	case descriptor.FieldDescriptorProto_TYPE_BOOL:
+		return "false"
+	case descriptor.FieldDescriptorProto_TYPE_STRING:
+		return `""`
+	case descriptor.FieldDescriptorProto_TYPE_GROUP, descriptor.FieldDescriptorProto_TYPE_MESSAGE, descriptor.FieldDescriptorProto_TYPE_BYTES:
+		return "nil"
+	case descriptor.FieldDescriptorProto_TYPE_ENUM:
+		obj := g.ObjectNamed(field.GetTypeName())
+		var enum *EnumDescriptor
+		if id, ok := obj.(*ImportedDescriptor); ok {
+			// The enum type has been publicly imported.
+			enum, _ = id.o.(*EnumDescriptor)
+		} else {
+			enum, _ = obj.(*EnumDescriptor)
+		}
+		if enum == nil {
+			log.Printf("don't know how to generate getter for %s", field.GetName())
+			return "nil"
+		}
+		if len(enum.Value) == 0 {
+			return "0 // empty enum"
+		}
+		first := enum.Value[0].GetName()
+		return g.DefaultPackageName(obj) + enum.prefix() + first
+	default:
+		return "0"
+	}
+}
 
-	oneofFieldName := make(map[int32]string)                           // indexed by oneof_index field of FieldDescriptorProto
-	oneofDisc := make(map[int32]string)                                // name of discriminator method
-	oneofTypeName := make(map[*descriptor.FieldDescriptorProto]string) // without star
-	oneofInsertPoints := make(map[int32]int)                           // oneof_index => offset of g.Buffer
+// defaultConstantName builds the name of the default constant from the message
+// type name and the untouched field name, e.g. "Default_MessageType_FieldName"
+func (g *Generator) defaultConstantName(goMessageType, protoFieldName string) string {
+	return "Default_" + goMessageType + "_" + CamelCase(protoFieldName)
+}
 
-	comments := g.PrintComments(message.path)
+// The different types of fields in a message and how to actually print them
+// Most of the logic for generateMessage is in the methods of these types.
+//
+// Note that the content of the field is irrelevant, a simpleField can contain
+// anything from a scalar to a group (which is just a message).
+//
+// Extension fields (and message sets) are however handled separately.
+//
+// simpleField - a field that is neiter weak nor oneof, possibly repeated
+// oneofField - field containing list of subfields:
+// - oneofSubField - a field within the oneof
+
+// msgCtx contains the context for the generator functions.
+type msgCtx struct {
+	goName  string      // Go struct name of the message, e.g. MessageName
+	message *Descriptor // The descriptor for the message
+}
+
+// fieldCommon contains data common to all types of fields.
+type fieldCommon struct {
+	goName     string // Go name of field, e.g. "FieldName" or "Descriptor_"
+	protoName  string // Name of field in proto language, e.g. "field_name" or "descriptor"
+	getterName string // Name of the getter, e.g. "GetFieldName" or "GetDescriptor_"
+	goType     string // The Go type as a string, e.g. "*int32" or "*OtherMessage"
+	tags       string // The tag string/annotation for the type, e.g. `protobuf:"varint,8,opt,name=region_id,json=regionId"`
+	fullPath   string // The full path of the field as used by Annotate etc, e.g. "4,0,2,0"
+}
+
+// getProtoName gets the proto name of a field, e.g. "field_name" or "descriptor".
+func (f *fieldCommon) getProtoName() string {
+	return f.protoName
+}
+
+// getGoType returns the go type of the field  as a string, e.g. "*int32".
+func (f *fieldCommon) getGoType() string {
+	return f.goType
+}
+
+// simpleField is not weak, not a oneof, not an extension. Can be required, optional or repeated.
+type simpleField struct {
+	fieldCommon
+	protoTypeName string                               // Proto type name, empty if primitive, e.g. ".google.protobuf.Duration"
+	protoType     descriptor.FieldDescriptorProto_Type // Actual type enum value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64
+	deprecated    string                               // Deprecation comment, if any, e.g. "// Deprecated: Do not use."
+	getterDef     string                               // Default for getters, e.g. "nil", `""` or "Default_MessageType_FieldName"
+	protoDef      string                               // Default value as defined in the proto file, e.g "yoshi" or "5"
+	comment       string                               // The full comment for the field, e.g. "// Useful information"
+}
+
+// decl prints the declaration of the field in the struct (if any).
+func (f *simpleField) decl(g *Generator, mc *msgCtx) {
+	g.P(f.comment, Annotate(mc.message.file, f.fullPath, f.goName), "\t", f.goType, "\t`", f.tags, "`", f.deprecated)
+}
+
+// getter prints the getter for the field.
+func (f *simpleField) getter(g *Generator, mc *msgCtx) {
+	star := ""
+	tname := f.goType
+	if needsStar(f.protoType) && tname[0] == '*' {
+		tname = tname[1:]
+		star = "*"
+	}
+	if f.deprecated != "" {
+		g.P(f.deprecated)
+	}
+	g.P("func (m *", mc.goName, ") ", Annotate(mc.message.file, f.fullPath, f.getterName), "() "+tname+" {")
+	if f.getterDef == "nil" { // Simpler getter
+		g.P("if m != nil {")
+		g.P("return m." + f.goName)
+		g.P("}")
+		g.P("return nil")
+		g.P("}")
+		g.P()
+		return
+	}
+	if mc.message.proto3() {
+		g.P("if m != nil {")
+	} else {
+		g.P("if m != nil && m." + f.goName + " != nil {")
+	}
+	g.P("return " + star + "m." + f.goName)
+	g.P("}")
+	g.P("return ", f.getterDef)
+	g.P("}")
+	g.P()
+}
+
+// setter prints the setter method of the field.
+func (f *simpleField) setter(g *Generator, mc *msgCtx) {
+	// No setter for regular fields yet
+}
+
+// getProtoDef returns the default value explicitly stated in the proto file, e.g "yoshi" or "5".
+func (f *simpleField) getProtoDef() string {
+	return f.protoDef
+}
+
+// getProtoTypeName returns the protobuf type name for the field as returned by field.GetTypeName(), e.g. ".google.protobuf.Duration".
+func (f *simpleField) getProtoTypeName() string {
+	return f.protoTypeName
+}
+
+// getProtoType returns the *field.Type value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64.
+func (f *simpleField) getProtoType() descriptor.FieldDescriptorProto_Type {
+	return f.protoType
+}
+
+// oneofSubFields are kept slize held by each oneofField. They do not appear in the top level slize of fields for the message.
+type oneofSubField struct {
+	fieldCommon
+	protoTypeName string                               // Proto type name, empty if primitive, e.g. ".google.protobuf.Duration"
+	protoType     descriptor.FieldDescriptorProto_Type // Actual type enum value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64
+	oneofTypeName string                               // Type name of the enclosing struct, e.g. "MessageName_FieldName"
+	fieldNumber   int                                  // Actual field number, as defined in proto, e.g. 12
+	getterDef     string                               // Default for getters, e.g. "nil", `""` or "Default_MessageType_FieldName"
+	protoDef      string                               // Default value as defined in the proto file, e.g "yoshi" or "5"
+	deprecated    string                               // Deprecation comment, if any.
+}
+
+// typedNil prints a nil casted to the pointer to this field.
+// - for XXX_OneofWrappers
+func (f *oneofSubField) typedNil(g *Generator) {
+	g.P("(*", f.oneofTypeName, ")(nil),")
+}
+
+// getProtoDef returns the default value explicitly stated in the proto file, e.g "yoshi" or "5".
+func (f *oneofSubField) getProtoDef() string {
+	return f.protoDef
+}
+
+// getProtoTypeName returns the protobuf type name for the field as returned by field.GetTypeName(), e.g. ".google.protobuf.Duration".
+func (f *oneofSubField) getProtoTypeName() string {
+	return f.protoTypeName
+}
+
+// getProtoType returns the *field.Type value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64.
+func (f *oneofSubField) getProtoType() descriptor.FieldDescriptorProto_Type {
+	return f.protoType
+}
+
+// oneofField represents the oneof on top level.
+// The alternative fields within the oneof are represented by oneofSubField.
+type oneofField struct {
+	fieldCommon
+	subFields []*oneofSubField // All the possible oneof fields
+	comment   string           // The full comment for the field, e.g. "// Types that are valid to be assigned to MyOneof:\n\\"
+}
+
+// decl prints the declaration of the field in the struct (if any).
+func (f *oneofField) decl(g *Generator, mc *msgCtx) {
+	comment := f.comment
+	for _, sf := range f.subFields {
+		comment += "//\t*" + sf.oneofTypeName + "\n"
+	}
+	g.P(comment, Annotate(mc.message.file, f.fullPath, f.goName), " ", f.goType, " `", f.tags, "`")
+}
+
+// getter for a oneof field will print additional discriminators and interfaces for the oneof,
+// also it prints all the getters for the sub fields.
+func (f *oneofField) getter(g *Generator, mc *msgCtx) {
+	// The discriminator type
+	g.P("type ", f.goType, " interface {")
+	g.P(f.goType, "()")
+	g.P("}")
+	g.P()
+	// The subField types, fulfilling the discriminator type contract
+	for _, sf := range f.subFields {
+		g.P("type ", Annotate(mc.message.file, sf.fullPath, sf.oneofTypeName), " struct {")
+		g.P(Annotate(mc.message.file, sf.fullPath, sf.goName), " ", sf.goType, " `", sf.tags, "`")
+		g.P("}")
+		g.P()
+	}
+	for _, sf := range f.subFields {
+		g.P("func (*", sf.oneofTypeName, ") ", f.goType, "() {}")
+		g.P()
+	}
+	// Getter for the oneof field
+	g.P("func (m *", mc.goName, ") ", Annotate(mc.message.file, f.fullPath, f.getterName), "() ", f.goType, " {")
+	g.P("if m != nil { return m.", f.goName, " }")
+	g.P("return nil")
+	g.P("}")
+	g.P()
+	// Getters for each oneof
+	for _, sf := range f.subFields {
+		if sf.deprecated != "" {
+			g.P(sf.deprecated)
+		}
+		g.P("func (m *", mc.goName, ") ", Annotate(mc.message.file, sf.fullPath, sf.getterName), "() "+sf.goType+" {")
+		g.P("if x, ok := m.", f.getterName, "().(*", sf.oneofTypeName, "); ok {")
+		g.P("return x.", sf.goName)
+		g.P("}")
+		g.P("return ", sf.getterDef)
+		g.P("}")
+		g.P()
+	}
+}
+
+// setter prints the setter method of the field.
+func (f *oneofField) setter(g *Generator, mc *msgCtx) {
+	// No setters for oneof yet
+}
+
+// topLevelField interface implemented by all types of fields on the top level (not oneofSubField).
+type topLevelField interface {
+	decl(g *Generator, mc *msgCtx)   // print declaration within the struct
+	getter(g *Generator, mc *msgCtx) // print getter
+	setter(g *Generator, mc *msgCtx) // print setter if applicable
+}
+
+// defField interface implemented by all types of fields that can have defaults (not oneofField, but instead oneofSubField).
+type defField interface {
+	getProtoDef() string                                // default value explicitly stated in the proto file, e.g "yoshi" or "5"
+	getProtoName() string                               // proto name of a field, e.g. "field_name" or "descriptor"
+	getGoType() string                                  // go type of the field  as a string, e.g. "*int32"
+	getProtoTypeName() string                           // protobuf type name for the field, e.g. ".google.protobuf.Duration"
+	getProtoType() descriptor.FieldDescriptorProto_Type // *field.Type value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64
+}
+
+// generateDefaultConstants adds constants for default values if needed, which is only if the default value is.
+// explicit in the proto.
+func (g *Generator) generateDefaultConstants(mc *msgCtx, topLevelFields []topLevelField) {
+	// Collect fields that can have defaults
+	dFields := []defField{}
+	for _, pf := range topLevelFields {
+		if f, ok := pf.(*oneofField); ok {
+			for _, osf := range f.subFields {
+				dFields = append(dFields, osf)
+			}
+			continue
+		}
+		dFields = append(dFields, pf.(defField))
+	}
+	for _, df := range dFields {
+		def := df.getProtoDef()
+		if def == "" {
+			continue
+		}
+		fieldname := g.defaultConstantName(mc.goName, df.getProtoName())
+		typename := df.getGoType()
+		if typename[0] == '*' {
+			typename = typename[1:]
+		}
+		kind := "const "
+		switch {
+		case typename == "bool":
+		case typename == "string":
+			def = strconv.Quote(def)
+		case typename == "[]byte":
+			def = "[]byte(" + strconv.Quote(unescape(def)) + ")"
+			kind = "var "
+		case def == "inf", def == "-inf", def == "nan":
+			// These names are known to, and defined by, the protocol language.
+			switch def {
+			case "inf":
+				def = "math.Inf(1)"
+			case "-inf":
+				def = "math.Inf(-1)"
+			case "nan":
+				def = "math.NaN()"
+			}
+			if df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_FLOAT {
+				def = "float32(" + def + ")"
+			}
+			kind = "var "
+		case df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_FLOAT:
+			if f, err := strconv.ParseFloat(def, 32); err == nil {
+				def = fmt.Sprint(float32(f))
+			}
+		case df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_DOUBLE:
+			if f, err := strconv.ParseFloat(def, 64); err == nil {
+				def = fmt.Sprint(f)
+			}
+		case df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_ENUM:
+			// Must be an enum.  Need to construct the prefixed name.
+			obj := g.ObjectNamed(df.getProtoTypeName())
+			var enum *EnumDescriptor
+			if id, ok := obj.(*ImportedDescriptor); ok {
+				// The enum type has been publicly imported.
+				enum, _ = id.o.(*EnumDescriptor)
+			} else {
+				enum, _ = obj.(*EnumDescriptor)
+			}
+			if enum == nil {
+				log.Printf("don't know how to generate constant for %s", fieldname)
+				continue
+			}
+			def = g.DefaultPackageName(obj) + enum.prefix() + def
+		}
+		g.P(kind, fieldname, " ", typename, " = ", def)
+		g.file.addExport(mc.message, constOrVarSymbol{fieldname, kind, ""})
+	}
+	g.P()
+}
+
+// generateInternalStructFields just adds the XXX_<something> fields to the message struct.
+func (g *Generator) generateInternalStructFields(mc *msgCtx, topLevelFields []topLevelField) {
+	g.P("XXX_NoUnkeyedLiteral\tstruct{} `json:\"-\"`") // prevent unkeyed struct literals
+	if len(mc.message.ExtensionRange) > 0 {
+		messageset := ""
+		if opts := mc.message.Options; opts != nil && opts.GetMessageSetWireFormat() {
+			messageset = "protobuf_messageset:\"1\" "
+		}
+		g.P(g.Pkg["proto"], ".XXX_InternalExtensions `", messageset, "json:\"-\"`")
+	}
+	g.P("XXX_unrecognized\t[]byte `json:\"-\"`")
+	g.P("XXX_sizecache\tint32 `json:\"-\"`")
+
+}
+
+// generateOneofFuncs adds all the utility functions for oneof, including marshalling, unmarshalling and sizer.
+func (g *Generator) generateOneofFuncs(mc *msgCtx, topLevelFields []topLevelField) {
+	ofields := []*oneofField{}
+	for _, f := range topLevelFields {
+		if o, ok := f.(*oneofField); ok {
+			ofields = append(ofields, o)
+		}
+	}
+	if len(ofields) == 0 {
+		return
+	}
+
+	// OneofFuncs
+	g.P("// XXX_OneofWrappers is for the internal use of the proto package.")
+	g.P("func (*", mc.goName, ") XXX_OneofWrappers() []interface{} {")
+	g.P("return []interface{}{")
+	for _, of := range ofields {
+		for _, sf := range of.subFields {
+			sf.typedNil(g)
+		}
+	}
+	g.P("}")
+	g.P("}")
+	g.P()
+}
+
+// generateMessageStruct adds the actual struct with it's members (but not methods) to the output.
+func (g *Generator) generateMessageStruct(mc *msgCtx, topLevelFields []topLevelField) {
+	comments := g.PrintComments(mc.message.path)
 
 	// Guarantee deprecation comments appear after user-provided comments.
-	if message.GetOptions().GetDeprecated() {
+	if mc.message.GetOptions().GetDeprecated() {
 		if comments {
 			// Convention: Separate deprecation comments from original
 			// comments with an empty line.
@@ -1741,8 +2102,108 @@
 		g.P(deprecationComment)
 	}
 
-	g.P("type ", Annotate(message.file, message.path, ccTypeName), " struct {")
-	g.In()
+	g.P("type ", Annotate(mc.message.file, mc.message.path, mc.goName), " struct {")
+	for _, pf := range topLevelFields {
+		pf.decl(g, mc)
+	}
+	g.generateInternalStructFields(mc, topLevelFields)
+	g.P("}")
+}
+
+// generateGetters adds getters for all fields, including oneofs and weak fields when applicable.
+func (g *Generator) generateGetters(mc *msgCtx, topLevelFields []topLevelField) {
+	for _, pf := range topLevelFields {
+		pf.getter(g, mc)
+	}
+}
+
+// generateSetters add setters for all fields, including oneofs and weak fields when applicable.
+func (g *Generator) generateSetters(mc *msgCtx, topLevelFields []topLevelField) {
+	for _, pf := range topLevelFields {
+		pf.setter(g, mc)
+	}
+}
+
+// generateCommonMethods adds methods to the message that are not on a per field basis.
+func (g *Generator) generateCommonMethods(mc *msgCtx) {
+	// Reset, String and ProtoMessage methods.
+	g.P("func (m *", mc.goName, ") Reset() { *m = ", mc.goName, "{} }")
+	g.P("func (m *", mc.goName, ") String() string { return ", g.Pkg["proto"], ".CompactTextString(m) }")
+	g.P("func (*", mc.goName, ") ProtoMessage() {}")
+	var indexes []string
+	for m := mc.message; m != nil; m = m.parent {
+		indexes = append([]string{strconv.Itoa(m.index)}, indexes...)
+	}
+	g.P("func (*", mc.goName, ") Descriptor() ([]byte, []int) {")
+	g.P("return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "}")
+	g.P("}")
+	g.P()
+	// TODO: Revisit the decision to use a XXX_WellKnownType method
+	// if we change proto.MessageName to work with multiple equivalents.
+	if mc.message.file.GetPackage() == "google.protobuf" && wellKnownTypes[mc.message.GetName()] {
+		g.P("func (*", mc.goName, `) XXX_WellKnownType() string { return "`, mc.message.GetName(), `" }`)
+		g.P()
+	}
+
+	// Extension support methods
+	if len(mc.message.ExtensionRange) > 0 {
+		g.P()
+		g.P("var extRange_", mc.goName, " = []", g.Pkg["proto"], ".ExtensionRange{")
+		for _, r := range mc.message.ExtensionRange {
+			end := fmt.Sprint(*r.End - 1) // make range inclusive on both ends
+			g.P("{Start: ", r.Start, ", End: ", end, "},")
+		}
+		g.P("}")
+		g.P("func (*", mc.goName, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange {")
+		g.P("return extRange_", mc.goName)
+		g.P("}")
+		g.P()
+	}
+
+	// TODO: It does not scale to keep adding another method for every
+	// operation on protos that we want to switch over to using the
+	// table-driven approach. Instead, we should only add a single method
+	// that allows getting access to the *InternalMessageInfo struct and then
+	// calling Unmarshal, Marshal, Merge, Size, and Discard directly on that.
+
+	// Wrapper for table-driven marshaling and unmarshaling.
+	g.P("func (m *", mc.goName, ") XXX_Unmarshal(b []byte) error {")
+	g.P("return xxx_messageInfo_", mc.goName, ".Unmarshal(m, b)")
+	g.P("}")
+
+	g.P("func (m *", mc.goName, ") XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {")
+	g.P("return xxx_messageInfo_", mc.goName, ".Marshal(b, m, deterministic)")
+	g.P("}")
+
+	g.P("func (m *", mc.goName, ") XXX_Merge(src ", g.Pkg["proto"], ".Message) {")
+	g.P("xxx_messageInfo_", mc.goName, ".Merge(m, src)")
+	g.P("}")
+
+	g.P("func (m *", mc.goName, ") XXX_Size() int {") // avoid name clash with "Size" field in some message
+	g.P("return xxx_messageInfo_", mc.goName, ".Size(m)")
+	g.P("}")
+
+	g.P("func (m *", mc.goName, ") XXX_DiscardUnknown() {")
+	g.P("xxx_messageInfo_", mc.goName, ".DiscardUnknown(m)")
+	g.P("}")
+
+	g.P("var xxx_messageInfo_", mc.goName, " ", g.Pkg["proto"], ".InternalMessageInfo")
+	g.P()
+}
+
+// Generate the type, methods and default constant definitions for this Descriptor.
+func (g *Generator) generateMessage(message *Descriptor) {
+	topLevelFields := []topLevelField{}
+	oFields := make(map[int32]*oneofField)
+	// The full type name
+	typeName := message.TypeName()
+	// The full type name, CamelCased.
+	goTypeName := CamelCaseSlice(typeName)
+
+	usedNames := make(map[string]bool)
+	for _, n := range methodNames {
+		usedNames[n] = true
+	}
 
 	// allocNames finds a conflict-free variation of the given strings,
 	// consistently mutating their suffixes.
@@ -1765,6 +2226,9 @@
 		}
 	}
 
+	mapFieldTypes := make(map[*descriptor.FieldDescriptorProto]string) // keep track of the map fields to be added later
+
+	// Build a structure more suitable for generating the text in one pass
 	for i, field := range message.Field {
 		// Allocate the getter and the field at the same time so name
 		// collisions create field/method consistent names.
@@ -1778,31 +2242,38 @@
 		jsonName := *field.Name
 		tag := fmt.Sprintf("protobuf:%s json:%q", g.goTag(message, field, wiretype), jsonName+",omitempty")
 
-		fieldNames[field] = fieldName
-		fieldGetterNames[field] = fieldGetterName
-
 		oneof := field.OneofIndex != nil
-		if oneof && oneofFieldName[*field.OneofIndex] == "" {
+		if oneof && oFields[*field.OneofIndex] == nil {
 			odp := message.OneofDecl[int(*field.OneofIndex)]
-			fname := allocNames(CamelCase(odp.GetName()))[0]
+			base := CamelCase(odp.GetName())
+			fname := allocNames(base)[0]
 
 			// This is the first field of a oneof we haven't seen before.
 			// Generate the union field.
 			oneofFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageOneofPath, *field.OneofIndex)
-			com := g.PrintComments(oneofFullPath)
-			if com {
-				g.P("//")
+			c, ok := g.makeComments(oneofFullPath)
+			if ok {
+				c += "\n//\n"
 			}
-			g.P("// Types that are valid to be assigned to ", fname, ":")
+			c += "// Types that are valid to be assigned to " + fname + ":\n"
 			// Generate the rest of this comment later,
 			// when we've computed any disambiguation.
-			oneofInsertPoints[*field.OneofIndex] = g.Buffer.Len()
 
-			dname := "is" + ccTypeName + "_" + fname
-			oneofFieldName[*field.OneofIndex] = fname
-			oneofDisc[*field.OneofIndex] = dname
+			dname := "is" + goTypeName + "_" + fname
 			tag := `protobuf_oneof:"` + odp.GetName() + `"`
-			g.P(Annotate(message.file, oneofFullPath, fname), " ", dname, " `", tag, "`")
+			of := oneofField{
+				fieldCommon: fieldCommon{
+					goName:     fname,
+					getterName: "Get"+fname,
+					goType:     dname,
+					tags:       tag,
+					protoName:  odp.GetName(),
+					fullPath:   oneofFullPath,
+				},
+				comment: c,
+			}
+			topLevelFields = append(topLevelFields, &of)
+			oFields[*field.OneofIndex] = &of
 		}
 
 		if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE {
@@ -1835,10 +2306,14 @@
 			}
 		}
 
-		fieldTypes[field] = typename
+		fieldDeprecated := ""
+		if field.GetOptions().GetDeprecated() {
+			fieldDeprecated = deprecationComment
+		}
 
+		dvalue := g.getterDefault(field, goTypeName)
 		if oneof {
-			tname := ccTypeName + "_" + fieldName
+			tname := goTypeName + "_" + fieldName
 			// It is possible for this to collide with a message or enum
 			// nested in this message. Check for collisions.
 			for {
@@ -1862,659 +2337,92 @@
 				break
 			}
 
-			oneofTypeName[field] = tname
+			oneofField := oFields[*field.OneofIndex]
+			tag := "protobuf:" + g.goTag(message, field, wiretype)
+			sf := oneofSubField{
+				fieldCommon: fieldCommon{
+					goName:     fieldName,
+					getterName: fieldGetterName,
+					goType:     typename,
+					tags:       tag,
+					protoName:  field.GetName(),
+					fullPath:   fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i),
+				},
+				protoTypeName: field.GetTypeName(),
+				fieldNumber:   int(*field.Number),
+				protoType:     *field.Type,
+				getterDef:     dvalue,
+				protoDef:      field.GetDefaultValue(),
+				oneofTypeName: tname,
+				deprecated:    fieldDeprecated,
+			}
+			oneofField.subFields = append(oneofField.subFields, &sf)
+			g.RecordTypeUse(field.GetTypeName())
 			continue
 		}
 
-		fieldDeprecated := ""
-		if field.GetOptions().GetDeprecated() {
-			fieldDeprecated = deprecationComment
-		}
-
 		fieldFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i)
-		g.PrintComments(fieldFullPath)
-		g.P(Annotate(message.file, fieldFullPath, fieldName), "\t", typename, "\t`", tag, "`", fieldDeprecated)
+		c, ok := g.makeComments(fieldFullPath)
+		if ok {
+			c += "\n"
+		}
+		rf := simpleField{
+			fieldCommon: fieldCommon{
+				goName:     fieldName,
+				getterName: fieldGetterName,
+				goType:     typename,
+				tags:       tag,
+				protoName:  field.GetName(),
+				fullPath:   fieldFullPath,
+			},
+			protoTypeName: field.GetTypeName(),
+			protoType:     *field.Type,
+			deprecated:    fieldDeprecated,
+			getterDef:     dvalue,
+			protoDef:      field.GetDefaultValue(),
+			comment:       c,
+		}
+		var pf topLevelField = &rf
+
+		topLevelFields = append(topLevelFields, pf)
 		g.RecordTypeUse(field.GetTypeName())
 	}
-	g.P("XXX_NoUnkeyedLiteral\tstruct{} `json:\"-\"`") // prevent unkeyed struct literals
-	if len(message.ExtensionRange) > 0 {
-		messageset := ""
-		if opts := message.Options; opts != nil && opts.GetMessageSetWireFormat() {
-			messageset = "protobuf_messageset:\"1\" "
-		}
-		g.P(g.Pkg["proto"], ".XXX_InternalExtensions `", messageset, "json:\"-\"`")
-	}
-	g.P("XXX_unrecognized\t[]byte `json:\"-\"`")
-	g.P("XXX_sizecache\tint32 `json:\"-\"`")
-	g.Out()
-	g.P("}")
 
-	// Update g.Buffer to list valid oneof types.
-	// We do this down here, after we've disambiguated the oneof type names.
-	// We go in reverse order of insertion point to avoid invalidating offsets.
-	for oi := int32(len(message.OneofDecl)); oi >= 0; oi-- {
-		ip := oneofInsertPoints[oi]
-		all := g.Buffer.Bytes()
-		rem := all[ip:]
-		g.Buffer = bytes.NewBuffer(all[:ip:ip]) // set cap so we don't scribble on rem
-		oldLen := g.Buffer.Len()
-		for _, field := range message.Field {
-			if field.OneofIndex == nil || *field.OneofIndex != oi {
-				continue
-			}
-			g.P("//\t*", oneofTypeName[field])
-		}
-		// If we've inserted text, we also need to fix up affected annotations (as
-		// they contain offsets that may need to be changed).
-		offset := int32(g.Buffer.Len() - oldLen)
-		ip32 := int32(ip)
-		for _, anno := range g.annotations {
-			if *anno.Begin >= ip32 {
-				*anno.Begin += offset
-			}
-			if *anno.End >= ip32 {
-				*anno.End += offset
-			}
-		}
-		g.Buffer.Write(rem)
+	mc := &msgCtx{
+		goName:  goTypeName,
+		message: message,
 	}
 
-	// Reset, String and ProtoMessage methods.
-	g.P("func (m *", ccTypeName, ") Reset() { *m = ", ccTypeName, "{} }")
-	g.P("func (m *", ccTypeName, ") String() string { return ", g.Pkg["proto"], ".CompactTextString(m) }")
-	g.P("func (*", ccTypeName, ") ProtoMessage() {}")
-	var indexes []string
-	for m := message; m != nil; m = m.parent {
-		indexes = append([]string{strconv.Itoa(m.index)}, indexes...)
-	}
-	g.P("func (*", ccTypeName, ") Descriptor() ([]byte, []int) {")
-	g.In()
-	g.P("return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "}")
-	g.Out()
-	g.P("}")
-	// TODO: Revisit the decision to use a XXX_WellKnownType method
-	// if we change proto.MessageName to work with multiple equivalents.
-	if message.file.GetPackage() == "google.protobuf" && wellKnownTypes[message.GetName()] {
-		g.P("func (*", ccTypeName, `) XXX_WellKnownType() string { return "`, message.GetName(), `" }`)
-	}
-
-	// Extension support methods
-	var hasExtensions, isMessageSet bool
-	if len(message.ExtensionRange) > 0 {
-		hasExtensions = true
-		// message_set_wire_format only makes sense when extensions are defined.
-		if opts := message.Options; opts != nil && opts.GetMessageSetWireFormat() {
-			isMessageSet = true
-			g.P()
-			g.P("func (m *", ccTypeName, ") MarshalJSON() ([]byte, error) {")
-			g.In()
-			g.P("return ", g.Pkg["proto"], ".MarshalMessageSetJSON(&m.XXX_InternalExtensions)")
-			g.Out()
-			g.P("}")
-			g.P("func (m *", ccTypeName, ") UnmarshalJSON(buf []byte) error {")
-			g.In()
-			g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)")
-			g.Out()
-			g.P("}")
-		}
-
-		g.P()
-		g.P("var extRange_", ccTypeName, " = []", g.Pkg["proto"], ".ExtensionRange{")
-		g.In()
-		for _, r := range message.ExtensionRange {
-			end := fmt.Sprint(*r.End - 1) // make range inclusive on both ends
-			g.P("{Start: ", r.Start, ", End: ", end, "},")
-		}
-		g.Out()
-		g.P("}")
-		g.P("func (*", ccTypeName, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange {")
-		g.In()
-		g.P("return extRange_", ccTypeName)
-		g.Out()
-		g.P("}")
-	}
-
-	// TODO: It does not scale to keep adding another method for every
-	// operation on protos that we want to switch over to using the
-	// table-driven approach. Instead, we should only add a single method
-	// that allows getting access to the *InternalMessageInfo struct and then
-	// calling Unmarshal, Marshal, Merge, Size, and Discard directly on that.
-
-	// Wrapper for table-driven marshaling and unmarshaling.
-	g.P("func (m *", ccTypeName, ") XXX_Unmarshal(b []byte) error {")
-	g.In()
-	g.P("return xxx_messageInfo_", ccTypeName, ".Unmarshal(m, b)")
-	g.Out()
-	g.P("}")
-
-	g.P("func (m *", ccTypeName, ") XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {")
-	g.In()
-	g.P("return xxx_messageInfo_", ccTypeName, ".Marshal(b, m, deterministic)")
-	g.Out()
-	g.P("}")
-
-	g.P("func (dst *", ccTypeName, ") XXX_Merge(src ", g.Pkg["proto"], ".Message) {")
-	g.In()
-	g.P("xxx_messageInfo_", ccTypeName, ".Merge(dst, src)")
-	g.Out()
-	g.P("}")
-
-	g.P("func (m *", ccTypeName, ") XXX_Size() int {") // avoid name clash with "Size" field in some message
-	g.In()
-	g.P("return xxx_messageInfo_", ccTypeName, ".Size(m)")
-	g.Out()
-	g.P("}")
-
-	g.P("func (m *", ccTypeName, ") XXX_DiscardUnknown() {")
-	g.In()
-	g.P("xxx_messageInfo_", ccTypeName, ".DiscardUnknown(m)")
-	g.Out()
-	g.P("}")
-
-	g.P("var xxx_messageInfo_", ccTypeName, " ", g.Pkg["proto"], ".InternalMessageInfo")
-
-	// Default constants
-	defNames := make(map[*descriptor.FieldDescriptorProto]string)
-	for _, field := range message.Field {
-		def := field.GetDefaultValue()
-		if def == "" {
-			continue
-		}
-		fieldname := "Default_" + ccTypeName + "_" + CamelCase(*field.Name)
-		defNames[field] = fieldname
-		typename, _ := g.GoType(message, field)
-		if typename[0] == '*' {
-			typename = typename[1:]
-		}
-		kind := "const "
-		switch {
-		case typename == "bool":
-		case typename == "string":
-			def = strconv.Quote(def)
-		case typename == "[]byte":
-			def = "[]byte(" + strconv.Quote(unescape(def)) + ")"
-			kind = "var "
-		case def == "inf", def == "-inf", def == "nan":
-			// These names are known to, and defined by, the protocol language.
-			switch def {
-			case "inf":
-				def = "math.Inf(1)"
-			case "-inf":
-				def = "math.Inf(-1)"
-			case "nan":
-				def = "math.NaN()"
-			}
-			if *field.Type == descriptor.FieldDescriptorProto_TYPE_FLOAT {
-				def = "float32(" + def + ")"
-			}
-			kind = "var "
-		case *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM:
-			// Must be an enum.  Need to construct the prefixed name.
-			obj := g.ObjectNamed(field.GetTypeName())
-			var enum *EnumDescriptor
-			if id, ok := obj.(*ImportedDescriptor); ok {
-				// The enum type has been publicly imported.
-				enum, _ = id.o.(*EnumDescriptor)
-			} else {
-				enum, _ = obj.(*EnumDescriptor)
-			}
-			if enum == nil {
-				log.Printf("don't know how to generate constant for %s", fieldname)
-				continue
-			}
-			def = g.DefaultPackageName(obj) + enum.prefix() + def
-		}
-		g.P(kind, fieldname, " ", typename, " = ", def)
-		g.file.addExport(message, constOrVarSymbol{fieldname, kind, ""})
-	}
+	g.generateMessageStruct(mc, topLevelFields)
+	g.P()
+	g.generateCommonMethods(mc)
+	g.P()
+	g.generateDefaultConstants(mc, topLevelFields)
+	g.P()
+	g.generateGetters(mc, topLevelFields)
+	g.P()
+	g.generateSetters(mc, topLevelFields)
+	g.P()
+	g.generateOneofFuncs(mc, topLevelFields)
 	g.P()
 
-	// Oneof per-field types, discriminants and getters.
-	//
-	// Generate unexported named types for the discriminant interfaces.
-	// We shouldn't have to do this, but there was (~19 Aug 2015) a compiler/linker bug
-	// that was triggered by using anonymous interfaces here.
-	// TODO: Revisit this and consider reverting back to anonymous interfaces.
-	for oi := range message.OneofDecl {
-		dname := oneofDisc[int32(oi)]
-		g.P("type ", dname, " interface {")
-		g.In()
-		g.P(dname, "()")
-		g.Out()
-		g.P("}")
-	}
-	g.P()
 	var oneofTypes []string
-	for i, field := range message.Field {
-		if field.OneofIndex == nil {
-			continue
-		}
-		_, wiretype := g.GoType(message, field)
-		tag := "protobuf:" + g.goTag(message, field, wiretype)
-		fieldFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i)
-		g.P("type ", Annotate(message.file, fieldFullPath, oneofTypeName[field]), " struct{ ", Annotate(message.file, fieldFullPath, fieldNames[field]), " ", fieldTypes[field], " `", tag, "` }")
-		g.RecordTypeUse(field.GetTypeName())
-		oneofTypes = append(oneofTypes, oneofTypeName[field])
-	}
-	g.P()
-	for _, field := range message.Field {
-		if field.OneofIndex == nil {
-			continue
-		}
-		g.P("func (*", oneofTypeName[field], ") ", oneofDisc[*field.OneofIndex], "() {}")
-	}
-	g.P()
-	for oi := range message.OneofDecl {
-		fname := oneofFieldName[int32(oi)]
-		oneofFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageOneofPath, oi)
-		g.P("func (m *", ccTypeName, ") ", Annotate(message.file, oneofFullPath, "Get"+fname), "() ", oneofDisc[int32(oi)], " {")
-		g.P("if m != nil { return m.", fname, " }")
-		g.P("return nil")
-		g.P("}")
-	}
-	g.P()
-
-	// Field getters
-	for i, field := range message.Field {
-		oneof := field.OneofIndex != nil
-
-		fname := fieldNames[field]
-		typename, _ := g.GoType(message, field)
-		if t, ok := mapFieldTypes[field]; ok {
-			typename = t
-		}
-		mname := fieldGetterNames[field]
-		star := ""
-		if needsStar(*field.Type) && typename[0] == '*' {
-			typename = typename[1:]
-			star = "*"
-		}
-		fieldFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i)
-
-		if field.GetOptions().GetDeprecated() {
-			g.P(deprecationComment)
-		}
-
-		g.P("func (m *", ccTypeName, ") ", Annotate(message.file, fieldFullPath, mname), "() "+typename+" {")
-		g.In()
-		def, hasDef := defNames[field]
-		typeDefaultIsNil := false // whether this field type's default value is a literal nil unless specified
-		switch *field.Type {
-		case descriptor.FieldDescriptorProto_TYPE_BYTES:
-			typeDefaultIsNil = !hasDef
-		case descriptor.FieldDescriptorProto_TYPE_GROUP, descriptor.FieldDescriptorProto_TYPE_MESSAGE:
-			typeDefaultIsNil = true
-		}
-		if isRepeated(field) {
-			typeDefaultIsNil = true
-		}
-		if typeDefaultIsNil && !oneof {
-			// A bytes field with no explicit default needs less generated code,
-			// as does a message or group field, or a repeated field.
-			g.P("if m != nil {")
-			g.In()
-			g.P("return m." + fname)
-			g.Out()
-			g.P("}")
-			g.P("return nil")
-			g.Out()
-			g.P("}")
-			g.P()
-			continue
-		}
-		if !oneof {
-			if message.proto3() {
-				g.P("if m != nil {")
-			} else {
-				g.P("if m != nil && m." + fname + " != nil {")
-			}
-			g.In()
-			g.P("return " + star + "m." + fname)
-			g.Out()
-			g.P("}")
-		} else {
-			uname := oneofFieldName[*field.OneofIndex]
-			tname := oneofTypeName[field]
-			g.P("if x, ok := m.Get", uname, "().(*", tname, "); ok {")
-			g.P("return x.", fname)
-			g.P("}")
-		}
-		if hasDef {
-			if *field.Type != descriptor.FieldDescriptorProto_TYPE_BYTES {
-				g.P("return " + def)
-			} else {
-				// The default is a []byte var.
-				// Make a copy when returning it to be safe.
-				g.P("return append([]byte(nil), ", def, "...)")
-			}
-		} else {
-			switch *field.Type {
-			case descriptor.FieldDescriptorProto_TYPE_BOOL:
-				g.P("return false")
-			case descriptor.FieldDescriptorProto_TYPE_STRING:
-				g.P(`return ""`)
-			case descriptor.FieldDescriptorProto_TYPE_GROUP,
-				descriptor.FieldDescriptorProto_TYPE_MESSAGE,
-				descriptor.FieldDescriptorProto_TYPE_BYTES:
-				// This is only possible for oneof fields.
-				g.P("return nil")
-			case descriptor.FieldDescriptorProto_TYPE_ENUM:
-				// The default default for an enum is the first value in the enum,
-				// not zero.
-				obj := g.ObjectNamed(field.GetTypeName())
-				var enum *EnumDescriptor
-				if id, ok := obj.(*ImportedDescriptor); ok {
-					// The enum type has been publicly imported.
-					enum, _ = id.o.(*EnumDescriptor)
-				} else {
-					enum, _ = obj.(*EnumDescriptor)
-				}
-				if enum == nil {
-					log.Printf("don't know how to generate getter for %s", field.GetName())
-					continue
-				}
-				if len(enum.Value) == 0 {
-					g.P("return 0 // empty enum")
-				} else {
-					first := enum.Value[0].GetName()
-					g.P("return ", g.DefaultPackageName(obj)+enum.prefix()+first)
-				}
-			default:
-				g.P("return 0")
+	for _, f := range topLevelFields {
+		if of, ok := f.(*oneofField); ok {
+			for _, osf := range of.subFields {
+				oneofTypes = append(oneofTypes, osf.oneofTypeName)
 			}
 		}
-		g.Out()
-		g.P("}")
-		g.P()
 	}
 
-	if !message.group {
-		ms := &messageSymbol{
-			sym:           ccTypeName,
-			hasExtensions: hasExtensions,
-			isMessageSet:  isMessageSet,
-			oneofTypes:    oneofTypes,
-		}
-		g.file.addExport(message, ms)
+	opts := message.Options
+	ms := &messageSymbol{
+		sym:           goTypeName,
+		hasExtensions: len(message.ExtensionRange) > 0,
+		isMessageSet:  opts != nil && opts.GetMessageSetWireFormat(),
+		oneofTypes:    oneofTypes,
 	}
-
-	// Oneof functions
-	if len(message.OneofDecl) > 0 {
-		fieldWire := make(map[*descriptor.FieldDescriptorProto]string)
-
-		// method
-		enc := "_" + ccTypeName + "_OneofMarshaler"
-		dec := "_" + ccTypeName + "_OneofUnmarshaler"
-		size := "_" + ccTypeName + "_OneofSizer"
-		encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error"
-		decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)"
-		sizeSig := "(msg " + g.Pkg["proto"] + ".Message) (n int)"
-
-		g.P("// XXX_OneofFuncs is for the internal use of the proto package.")
-		g.P("func (*", ccTypeName, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {")
-		g.P("return ", enc, ", ", dec, ", ", size, ", []interface{}{")
-		for _, field := range message.Field {
-			if field.OneofIndex == nil {
-				continue
-			}
-			g.P("(*", oneofTypeName[field], ")(nil),")
-		}
-		g.P("}")
-		g.P("}")
-		g.P()
-
-		// marshaler
-		g.P("func ", enc, encSig, " {")
-		g.P("m := msg.(*", ccTypeName, ")")
-		for oi, odp := range message.OneofDecl {
-			g.P("// ", odp.GetName())
-			fname := oneofFieldName[int32(oi)]
-			g.P("switch x := m.", fname, ".(type) {")
-			for _, field := range message.Field {
-				if field.OneofIndex == nil || int(*field.OneofIndex) != oi {
-					continue
-				}
-				g.P("case *", oneofTypeName[field], ":")
-				var wire, pre, post string
-				val := "x." + fieldNames[field] // overridden for TYPE_BOOL
-				canFail := false                // only TYPE_MESSAGE and TYPE_GROUP can fail
-				switch *field.Type {
-				case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
-					wire = "WireFixed64"
-					pre = "b.EncodeFixed64(" + g.Pkg["math"] + ".Float64bits("
-					post = "))"
-				case descriptor.FieldDescriptorProto_TYPE_FLOAT:
-					wire = "WireFixed32"
-					pre = "b.EncodeFixed32(uint64(" + g.Pkg["math"] + ".Float32bits("
-					post = ")))"
-				case descriptor.FieldDescriptorProto_TYPE_INT64,
-					descriptor.FieldDescriptorProto_TYPE_UINT64:
-					wire = "WireVarint"
-					pre, post = "b.EncodeVarint(uint64(", "))"
-				case descriptor.FieldDescriptorProto_TYPE_INT32,
-					descriptor.FieldDescriptorProto_TYPE_UINT32,
-					descriptor.FieldDescriptorProto_TYPE_ENUM:
-					wire = "WireVarint"
-					pre, post = "b.EncodeVarint(uint64(", "))"
-				case descriptor.FieldDescriptorProto_TYPE_FIXED64,
-					descriptor.FieldDescriptorProto_TYPE_SFIXED64:
-					wire = "WireFixed64"
-					pre, post = "b.EncodeFixed64(uint64(", "))"
-				case descriptor.FieldDescriptorProto_TYPE_FIXED32,
-					descriptor.FieldDescriptorProto_TYPE_SFIXED32:
-					wire = "WireFixed32"
-					pre, post = "b.EncodeFixed32(uint64(", "))"
-				case descriptor.FieldDescriptorProto_TYPE_BOOL:
-					// bool needs special handling.
-					g.P("t := uint64(0)")
-					g.P("if ", val, " { t = 1 }")
-					val = "t"
-					wire = "WireVarint"
-					pre, post = "b.EncodeVarint(", ")"
-				case descriptor.FieldDescriptorProto_TYPE_STRING:
-					wire = "WireBytes"
-					pre, post = "b.EncodeStringBytes(", ")"
-				case descriptor.FieldDescriptorProto_TYPE_GROUP:
-					wire = "WireStartGroup"
-					pre, post = "b.Marshal(", ")"
-					canFail = true
-				case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
-					wire = "WireBytes"
-					pre, post = "b.EncodeMessage(", ")"
-					canFail = true
-				case descriptor.FieldDescriptorProto_TYPE_BYTES:
-					wire = "WireBytes"
-					pre, post = "b.EncodeRawBytes(", ")"
-				case descriptor.FieldDescriptorProto_TYPE_SINT32:
-					wire = "WireVarint"
-					pre, post = "b.EncodeZigzag32(uint64(", "))"
-				case descriptor.FieldDescriptorProto_TYPE_SINT64:
-					wire = "WireVarint"
-					pre, post = "b.EncodeZigzag64(uint64(", "))"
-				default:
-					g.Fail("unhandled oneof field type ", field.Type.String())
-				}
-				fieldWire[field] = wire
-				g.P("b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".", wire, ")")
-				if !canFail {
-					g.P(pre, val, post)
-				} else {
-					g.P("if err := ", pre, val, post, "; err != nil {")
-					g.P("return err")
-					g.P("}")
-				}
-				if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP {
-					g.P("b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".WireEndGroup)")
-				}
-			}
-			g.P("case nil:")
-			g.P("default: return ", g.Pkg["fmt"], `.Errorf("`, ccTypeName, ".", fname, ` has unexpected type %T", x)`)
-			g.P("}")
-		}
-		g.P("return nil")
-		g.P("}")
-		g.P()
-
-		// unmarshaler
-		g.P("func ", dec, decSig, " {")
-		g.P("m := msg.(*", ccTypeName, ")")
-		g.P("switch tag {")
-		for _, field := range message.Field {
-			if field.OneofIndex == nil {
-				continue
-			}
-			odp := message.OneofDecl[int(*field.OneofIndex)]
-			g.P("case ", field.Number, ": // ", odp.GetName(), ".", *field.Name)
-			g.P("if wire != ", g.Pkg["proto"], ".", fieldWire[field], " {")
-			g.P("return true, ", g.Pkg["proto"], ".ErrInternalBadWireType")
-			g.P("}")
-			lhs := "x, err" // overridden for TYPE_MESSAGE and TYPE_GROUP
-			var dec, cast, cast2 string
-			switch *field.Type {
-			case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
-				dec, cast = "b.DecodeFixed64()", g.Pkg["math"]+".Float64frombits"
-			case descriptor.FieldDescriptorProto_TYPE_FLOAT:
-				dec, cast, cast2 = "b.DecodeFixed32()", "uint32", g.Pkg["math"]+".Float32frombits"
-			case descriptor.FieldDescriptorProto_TYPE_INT64:
-				dec, cast = "b.DecodeVarint()", "int64"
-			case descriptor.FieldDescriptorProto_TYPE_UINT64:
-				dec = "b.DecodeVarint()"
-			case descriptor.FieldDescriptorProto_TYPE_INT32:
-				dec, cast = "b.DecodeVarint()", "int32"
-			case descriptor.FieldDescriptorProto_TYPE_FIXED64:
-				dec = "b.DecodeFixed64()"
-			case descriptor.FieldDescriptorProto_TYPE_FIXED32:
-				dec, cast = "b.DecodeFixed32()", "uint32"
-			case descriptor.FieldDescriptorProto_TYPE_BOOL:
-				dec = "b.DecodeVarint()"
-				// handled specially below
-			case descriptor.FieldDescriptorProto_TYPE_STRING:
-				dec = "b.DecodeStringBytes()"
-			case descriptor.FieldDescriptorProto_TYPE_GROUP:
-				g.P("msg := new(", fieldTypes[field][1:], ")") // drop star
-				lhs = "err"
-				dec = "b.DecodeGroup(msg)"
-				// handled specially below
-			case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
-				g.P("msg := new(", fieldTypes[field][1:], ")") // drop star
-				lhs = "err"
-				dec = "b.DecodeMessage(msg)"
-				// handled specially below
-			case descriptor.FieldDescriptorProto_TYPE_BYTES:
-				dec = "b.DecodeRawBytes(true)"
-			case descriptor.FieldDescriptorProto_TYPE_UINT32:
-				dec, cast = "b.DecodeVarint()", "uint32"
-			case descriptor.FieldDescriptorProto_TYPE_ENUM:
-				dec, cast = "b.DecodeVarint()", fieldTypes[field]
-			case descriptor.FieldDescriptorProto_TYPE_SFIXED32:
-				dec, cast = "b.DecodeFixed32()", "int32"
-			case descriptor.FieldDescriptorProto_TYPE_SFIXED64:
-				dec, cast = "b.DecodeFixed64()", "int64"
-			case descriptor.FieldDescriptorProto_TYPE_SINT32:
-				dec, cast = "b.DecodeZigzag32()", "int32"
-			case descriptor.FieldDescriptorProto_TYPE_SINT64:
-				dec, cast = "b.DecodeZigzag64()", "int64"
-			default:
-				g.Fail("unhandled oneof field type ", field.Type.String())
-			}
-			g.P(lhs, " := ", dec)
-			val := "x"
-			if cast != "" {
-				val = cast + "(" + val + ")"
-			}
-			if cast2 != "" {
-				val = cast2 + "(" + val + ")"
-			}
-			switch *field.Type {
-			case descriptor.FieldDescriptorProto_TYPE_BOOL:
-				val += " != 0"
-			case descriptor.FieldDescriptorProto_TYPE_GROUP,
-				descriptor.FieldDescriptorProto_TYPE_MESSAGE:
-				val = "msg"
-			}
-			g.P("m.", oneofFieldName[*field.OneofIndex], " = &", oneofTypeName[field], "{", val, "}")
-			g.P("return true, err")
-		}
-		g.P("default: return false, nil")
-		g.P("}")
-		g.P("}")
-		g.P()
-
-		// sizer
-		g.P("func ", size, sizeSig, " {")
-		g.P("m := msg.(*", ccTypeName, ")")
-		for oi, odp := range message.OneofDecl {
-			g.P("// ", odp.GetName())
-			fname := oneofFieldName[int32(oi)]
-			g.P("switch x := m.", fname, ".(type) {")
-			for _, field := range message.Field {
-				if field.OneofIndex == nil || int(*field.OneofIndex) != oi {
-					continue
-				}
-				g.P("case *", oneofTypeName[field], ":")
-				val := "x." + fieldNames[field]
-				var varint, fixed string
-				switch *field.Type {
-				case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
-					fixed = "8"
-				case descriptor.FieldDescriptorProto_TYPE_FLOAT:
-					fixed = "4"
-				case descriptor.FieldDescriptorProto_TYPE_INT64,
-					descriptor.FieldDescriptorProto_TYPE_UINT64,
-					descriptor.FieldDescriptorProto_TYPE_INT32,
-					descriptor.FieldDescriptorProto_TYPE_UINT32,
-					descriptor.FieldDescriptorProto_TYPE_ENUM:
-					varint = val
-				case descriptor.FieldDescriptorProto_TYPE_FIXED64,
-					descriptor.FieldDescriptorProto_TYPE_SFIXED64:
-					fixed = "8"
-				case descriptor.FieldDescriptorProto_TYPE_FIXED32,
-					descriptor.FieldDescriptorProto_TYPE_SFIXED32:
-					fixed = "4"
-				case descriptor.FieldDescriptorProto_TYPE_BOOL:
-					fixed = "1"
-				case descriptor.FieldDescriptorProto_TYPE_STRING:
-					fixed = "len(" + val + ")"
-					varint = fixed
-				case descriptor.FieldDescriptorProto_TYPE_GROUP:
-					fixed = g.Pkg["proto"] + ".Size(" + val + ")"
-				case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
-					g.P("s := ", g.Pkg["proto"], ".Size(", val, ")")
-					fixed = "s"
-					varint = fixed
-				case descriptor.FieldDescriptorProto_TYPE_BYTES:
-					fixed = "len(" + val + ")"
-					varint = fixed
-				case descriptor.FieldDescriptorProto_TYPE_SINT32:
-					varint = "(uint32(" + val + ") << 1) ^ uint32((int32(" + val + ") >> 31))"
-				case descriptor.FieldDescriptorProto_TYPE_SINT64:
-					varint = "uint64(" + val + " << 1) ^ uint64((int64(" + val + ") >> 63))"
-				default:
-					g.Fail("unhandled oneof field type ", field.Type.String())
-				}
-				// Tag and wire varint is known statically,
-				// so don't generate code for that part of the size computation.
-				tagAndWireSize := proto.SizeVarint(uint64(*field.Number << 3)) // wire doesn't affect varint size
-				g.P("n += ", tagAndWireSize, " // tag and wire")
-				if varint != "" {
-					g.P("n += ", g.Pkg["proto"], ".SizeVarint(uint64(", varint, "))")
-				}
-				if fixed != "" {
-					g.P("n += ", fixed)
-				}
-				if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP {
-					g.P("n += ", tagAndWireSize, " // tag and wire")
-				}
-			}
-			g.P("case nil:")
-			g.P("default:")
-			g.P("panic(", g.Pkg["fmt"], ".Sprintf(\"proto: unexpected type %T in oneof\", x))")
-			g.P("}")
-		}
-		g.P("return n")
-		g.P("}")
-		g.P()
-	}
+	g.file.addExport(message, ms)
 
 	for _, ext := range message.ext {
 		g.generateExtension(ext)
@@ -2525,12 +2433,13 @@
 		fullName = *g.file.Package + "." + fullName
 	}
 
-	g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["proto"], ccTypeName, fullName)
+	g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["proto"], goTypeName, fullName)
 	// Register types for native map types.
 	for _, k := range mapFieldKeys(mapFieldTypes) {
 		fullName := strings.TrimPrefix(*k.TypeName, ".")
 		g.addInitf("%s.RegisterMapType((%s)(nil), %q)", g.Pkg["proto"], mapFieldTypes[k], fullName)
 	}
+
 }
 
 type byTypeName []*descriptor.FieldDescriptorProto
@@ -2642,10 +2551,8 @@
 	// In addition, the situation for when to apply this special case is implemented
 	// differently in other languages:
 	// https://github.com/google/protobuf/blob/aff10976/src/google/protobuf/text_format.cc#L1560
-	mset := false
 	if extDesc.GetOptions().GetMessageSetWireFormat() && typeName[len(typeName)-1] == "message_set_extension" {
 		typeName = typeName[:len(typeName)-1]
-		mset = true
 	}
 
 	// For text formatting, the package must be exactly what the .proto file declares,
@@ -2656,7 +2563,6 @@
 	}
 
 	g.P("var ", ccTypeName, " = &", g.Pkg["proto"], ".ExtensionDesc{")
-	g.In()
 	g.P("ExtendedType: (", extendedType, ")(nil),")
 	g.P("ExtensionType: (", fieldType, ")(nil),")
 	g.P("Field: ", field.Number, ",")
@@ -2664,39 +2570,22 @@
 	g.P("Tag: ", tag, ",")
 	g.P(`Filename: "`, g.file.GetName(), `",`)
 
-	g.Out()
 	g.P("}")
 	g.P()
 
-	if mset {
-		// Generate a bit more code to register with message_set.go.
-		g.addInitf("%s.RegisterMessageSetType((%s)(nil), %d, %q)", g.Pkg["proto"], fieldType, *field.Number, extName)
-	}
+	g.addInitf("%s.RegisterExtension(%s)", g.Pkg["proto"], ext.DescName())
 
 	g.file.addExport(ext, constOrVarSymbol{ccTypeName, "var", ""})
 }
 
 func (g *Generator) generateInitFunction() {
-	for _, enum := range g.file.enum {
-		g.generateEnumRegistration(enum)
-	}
-	for _, d := range g.file.desc {
-		for _, ext := range d.ext {
-			g.generateExtensionRegistration(ext)
-		}
-	}
-	for _, ext := range g.file.ext {
-		g.generateExtensionRegistration(ext)
-	}
 	if len(g.init) == 0 {
 		return
 	}
 	g.P("func init() {")
-	g.In()
 	for _, l := range g.init {
 		g.P(l)
 	}
-	g.Out()
 	g.P("}")
 	g.init = nil
 }
@@ -2722,7 +2611,6 @@
 	g.P()
 	g.P("func init() { ", g.Pkg["proto"], ".RegisterFile(", strconv.Quote(*file.Name), ", ", v, ") }")
 	g.P("var ", v, " = []byte{")
-	g.In()
 	g.P("// ", len(b), " bytes of a gzipped FileDescriptorProto")
 	for len(b) > 0 {
 		n := 16
@@ -2738,7 +2626,6 @@
 
 		b = b[n:]
 	}
-	g.Out()
 	g.P("}")
 }
 
@@ -2755,10 +2642,6 @@
 	g.addInitf("%s.RegisterEnum(%q, %[3]s_name, %[3]s_value)", g.Pkg["proto"], pkg+ccTypeName, ccTypeName)
 }
 
-func (g *Generator) generateExtensionRegistration(ext *ExtensionDescriptor) {
-	g.addInitf("%s.RegisterExtension(%s)", g.Pkg["proto"], ext.DescName())
-}
-
 // And now lots of helper functions.
 
 // Is c an ASCII lower-case letter?
diff --git a/protoc-gen-go/generator/name_test.go b/protoc-gen-go/generator/name_test.go
index 571147c..e4a119d 100644
--- a/protoc-gen-go/generator/name_test.go
+++ b/protoc-gen-go/generator/name_test.go
@@ -68,6 +68,7 @@
 		{"foo", "", "foo", true},
 		{"github.com/golang/bar", "github.com/golang/bar", "bar", true},
 		{"github.com/golang/bar;baz", "github.com/golang/bar", "baz", true},
+		{"github.com/golang/string", "github.com/golang/string", "string", true},
 	}
 	for _, tc := range tests {
 		d := &FileDescriptor{
@@ -85,6 +86,25 @@
 	}
 }
 
+func TestPackageNames(t *testing.T) {
+	g := New()
+	g.packageNames = make(map[GoImportPath]GoPackageName)
+	g.usedPackageNames = make(map[GoPackageName]bool)
+	for _, test := range []struct {
+		importPath GoImportPath
+		want       GoPackageName
+	}{
+		{"github.com/golang/foo", "foo"},
+		{"github.com/golang/second/package/named/foo", "foo1"},
+		{"github.com/golang/third/package/named/foo", "foo2"},
+		{"github.com/golang/conflicts/with/predeclared/ident/string", "string1"},
+	} {
+		if got := g.GoPackageName(test.importPath); got != test.want {
+			t.Errorf("GoPackageName(%v) = %v, want %v", test.importPath, got, test.want)
+		}
+	}
+}
+
 func TestUnescape(t *testing.T) {
 	tests := []struct {
 		in  string
diff --git a/protoc-gen-go/golden_test.go b/protoc-gen-go/golden_test.go
index 2630de6..2950eac 100644
--- a/protoc-gen-go/golden_test.go
+++ b/protoc-gen-go/golden_test.go
@@ -3,7 +3,6 @@
 import (
 	"bytes"
 	"flag"
-	"fmt"
 	"go/build"
 	"go/parser"
 	"go/token"
@@ -150,7 +149,7 @@
 		wantPackageB: "test_beta",
 		wantImportsA: map[string]bool{
 			"github.com/golang/protobuf/proto": true,
-			"beta": true,
+			"beta":                             true,
 		},
 	}, {
 		parameters: "import_prefix=prefix",
@@ -323,64 +322,6 @@
 	}
 }
 
-func TestPackageComment(t *testing.T) {
-	workdir, err := ioutil.TempDir("", "proto-test")
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer os.RemoveAll(workdir)
-
-	var packageRE = regexp.MustCompile(`(?m)^package .*`)
-
-	for i, test := range []struct {
-		goPackageOption string
-		wantPackage     string
-	}{{
-		goPackageOption: ``,
-		wantPackage:     `package proto_package`,
-	}, {
-		goPackageOption: `option go_package = "go_package";`,
-		wantPackage:     `package go_package`,
-	}, {
-		goPackageOption: `option go_package = "import/path/of/go_package";`,
-		wantPackage:     `package go_package // import "import/path/of/go_package"`,
-	}, {
-		goPackageOption: `option go_package = "import/path/of/something;go_package";`,
-		wantPackage:     `package go_package // import "import/path/of/something"`,
-	}, {
-		goPackageOption: `option go_package = "import_path;go_package";`,
-		wantPackage:     `package go_package // import "import_path"`,
-	}} {
-		srcName := filepath.Join(workdir, fmt.Sprintf("%d.proto", i))
-		tgtName := filepath.Join(workdir, fmt.Sprintf("%d.pb.go", i))
-
-		buf := &bytes.Buffer{}
-		fmt.Fprintln(buf, `syntax = "proto3";`)
-		fmt.Fprintln(buf, `package proto_package;`)
-		fmt.Fprintln(buf, test.goPackageOption)
-		if err := ioutil.WriteFile(srcName, buf.Bytes(), 0666); err != nil {
-			t.Fatal(err)
-		}
-
-		protoc(t, []string{"-I" + workdir, "--go_out=paths=source_relative:" + workdir, srcName})
-
-		out, err := ioutil.ReadFile(tgtName)
-		if err != nil {
-			t.Fatal(err)
-		}
-
-		pkg := packageRE.Find(out)
-		if pkg == nil {
-			t.Errorf("generated .pb.go contains no package line\n\nsource:\n%v\n\noutput:\n%v", buf.String(), string(out))
-			continue
-		}
-
-		if got, want := string(pkg), test.wantPackage; got != want {
-			t.Errorf("unexpected package statement with go_package = %q\n got: %v\nwant: %v", test.goPackageOption, got, want)
-		}
-	}
-}
-
 // parseFile returns a file's package name and a list of all packages it imports.
 func parseFile(source string) (packageName string, imports []string, err error) {
 	fset := token.NewFileSet()
diff --git a/protoc-gen-go/grpc/grpc.go b/protoc-gen-go/grpc/grpc.go
index faef1ab..1ddfe83 100644
--- a/protoc-gen-go/grpc/grpc.go
+++ b/protoc-gen-go/grpc/grpc.go
@@ -36,7 +36,6 @@
 
 import (
 	"fmt"
-	"path"
 	"strconv"
 	"strings"
 
@@ -53,7 +52,7 @@
 // Paths for packages used by code generated in this file,
 // relative to the import_prefix of the generator.Generator.
 const (
-	contextPkgPath = "golang.org/x/net/context"
+	contextPkgPath = "context"
 	grpcPkgPath    = "google.golang.org/grpc"
 )
 
@@ -83,8 +82,6 @@
 // Init initializes the plugin.
 func (g *grpc) Init(gen *generator.Generator) {
 	g.gen = gen
-	contextPkg = generator.RegisterUniquePackageName("context", nil)
-	grpcPkg = generator.RegisterUniquePackageName("grpc", nil)
 }
 
 // Given a type name defined in a .proto, return its object.
@@ -108,6 +105,9 @@
 		return
 	}
 
+	contextPkg = string(g.gen.AddImport(contextPkgPath))
+	grpcPkg = string(g.gen.AddImport(grpcPkgPath))
+
 	g.P("// Reference imports to suppress errors if they are not otherwise used.")
 	g.P("var _ ", contextPkg, ".Context")
 	g.P("var _ ", grpcPkg, ".ClientConn")
@@ -126,14 +126,6 @@
 
 // GenerateImports generates the import declaration for this file.
 func (g *grpc) GenerateImports(file *generator.FileDescriptor) {
-	if len(file.FileDescriptorProto.Service) == 0 {
-		return
-	}
-	g.P("import (")
-	g.P(contextPkg, " ", generator.GoImportPath(path.Join(string(g.gen.ImportPrefix), contextPkgPath)))
-	g.P(grpcPkg, " ", generator.GoImportPath(path.Join(string(g.gen.ImportPrefix), grpcPkgPath)))
-	g.P(")")
-	g.P()
 }
 
 // reservedClientName records whether a client name is reserved on the client side.
diff --git a/protoc-gen-go/testdata/deprecated/deprecated.pb.go b/protoc-gen-go/testdata/deprecated/deprecated.pb.go
index 63e4e13..5af4d22 100644
--- a/protoc-gen-go/testdata/deprecated/deprecated.pb.go
+++ b/protoc-gen-go/testdata/deprecated/deprecated.pb.go
@@ -1,19 +1,16 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // deprecated/deprecated.proto is a deprecated file.
 
-package deprecated // import "github.com/golang/protobuf/protoc-gen-go/testdata/deprecated"
+// package deprecated contains only deprecated messages and services.
 
-/*
-package deprecated contains only deprecated messages and services.
-*/
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+package deprecated
 
 import (
-	context "golang.org/x/net/context"
+	context "context"
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
 	grpc "google.golang.org/grpc"
+	math "math"
 )
 
 // Reference imports to suppress errors if they are not otherwise used.
@@ -25,7 +22,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 // DeprecatedEnum contains deprecated values.
 type DeprecatedEnum int32 // Deprecated: Do not use.
@@ -37,6 +34,7 @@
 var DeprecatedEnum_name = map[int32]string{
 	0: "DEPRECATED",
 }
+
 var DeprecatedEnum_value = map[string]int32{
 	"DEPRECATED": 0,
 }
@@ -44,8 +42,9 @@
 func (x DeprecatedEnum) String() string {
 	return proto.EnumName(DeprecatedEnum_name, int32(x))
 }
+
 func (DeprecatedEnum) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_deprecated_9e1889ba21817fad, []int{0}
+	return fileDescriptor_f64ba265cd7eae3f, []int{0}
 }
 
 // DeprecatedRequest is a request to DeprecatedCall.
@@ -61,16 +60,17 @@
 func (m *DeprecatedRequest) String() string { return proto.CompactTextString(m) }
 func (*DeprecatedRequest) ProtoMessage()    {}
 func (*DeprecatedRequest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_deprecated_9e1889ba21817fad, []int{0}
+	return fileDescriptor_f64ba265cd7eae3f, []int{0}
 }
+
 func (m *DeprecatedRequest) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_DeprecatedRequest.Unmarshal(m, b)
 }
 func (m *DeprecatedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_DeprecatedRequest.Marshal(b, m, deterministic)
 }
-func (dst *DeprecatedRequest) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_DeprecatedRequest.Merge(dst, src)
+func (m *DeprecatedRequest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_DeprecatedRequest.Merge(m, src)
 }
 func (m *DeprecatedRequest) XXX_Size() int {
 	return xxx_messageInfo_DeprecatedRequest.Size(m)
@@ -84,26 +84,32 @@
 // Deprecated: Do not use.
 type DeprecatedResponse struct {
 	// DeprecatedField contains a DeprecatedEnum.
-	DeprecatedField      DeprecatedEnum `protobuf:"varint,1,opt,name=deprecated_field,json=deprecatedField,proto3,enum=deprecated.DeprecatedEnum" json:"deprecated_field,omitempty"` // Deprecated: Do not use.
-	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
-	XXX_unrecognized     []byte         `json:"-"`
-	XXX_sizecache        int32          `json:"-"`
+	DeprecatedField DeprecatedEnum `protobuf:"varint,1,opt,name=deprecated_field,json=deprecatedField,proto3,enum=deprecated.DeprecatedEnum" json:"deprecated_field,omitempty"` // Deprecated: Do not use.
+	// DeprecatedOneof contains a deprecated field.
+	//
+	// Types that are valid to be assigned to DeprecatedOneof:
+	//	*DeprecatedResponse_DeprecatedOneofField
+	DeprecatedOneof      isDeprecatedResponse_DeprecatedOneof `protobuf_oneof:"deprecated_oneof"`
+	XXX_NoUnkeyedLiteral struct{}                             `json:"-"`
+	XXX_unrecognized     []byte                               `json:"-"`
+	XXX_sizecache        int32                                `json:"-"`
 }
 
 func (m *DeprecatedResponse) Reset()         { *m = DeprecatedResponse{} }
 func (m *DeprecatedResponse) String() string { return proto.CompactTextString(m) }
 func (*DeprecatedResponse) ProtoMessage()    {}
 func (*DeprecatedResponse) Descriptor() ([]byte, []int) {
-	return fileDescriptor_deprecated_9e1889ba21817fad, []int{1}
+	return fileDescriptor_f64ba265cd7eae3f, []int{1}
 }
+
 func (m *DeprecatedResponse) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_DeprecatedResponse.Unmarshal(m, b)
 }
 func (m *DeprecatedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_DeprecatedResponse.Marshal(b, m, deterministic)
 }
-func (dst *DeprecatedResponse) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_DeprecatedResponse.Merge(dst, src)
+func (m *DeprecatedResponse) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_DeprecatedResponse.Merge(m, src)
 }
 func (m *DeprecatedResponse) XXX_Size() int {
 	return xxx_messageInfo_DeprecatedResponse.Size(m)
@@ -122,10 +128,66 @@
 	return DeprecatedEnum_DEPRECATED
 }
 
+type isDeprecatedResponse_DeprecatedOneof interface {
+	isDeprecatedResponse_DeprecatedOneof()
+}
+
+type DeprecatedResponse_DeprecatedOneofField struct {
+	DeprecatedOneofField string `protobuf:"bytes,2,opt,name=deprecated_oneof_field,json=deprecatedOneofField,proto3,oneof"`
+}
+
+func (*DeprecatedResponse_DeprecatedOneofField) isDeprecatedResponse_DeprecatedOneof() {}
+
+func (m *DeprecatedResponse) GetDeprecatedOneof() isDeprecatedResponse_DeprecatedOneof {
+	if m != nil {
+		return m.DeprecatedOneof
+	}
+	return nil
+}
+
+// Deprecated: Do not use.
+func (m *DeprecatedResponse) GetDeprecatedOneofField() string {
+	if x, ok := m.GetDeprecatedOneof().(*DeprecatedResponse_DeprecatedOneofField); ok {
+		return x.DeprecatedOneofField
+	}
+	return ""
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*DeprecatedResponse) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
+		(*DeprecatedResponse_DeprecatedOneofField)(nil),
+	}
+}
+
 func init() {
+	proto.RegisterEnum("deprecated.DeprecatedEnum", DeprecatedEnum_name, DeprecatedEnum_value)
 	proto.RegisterType((*DeprecatedRequest)(nil), "deprecated.DeprecatedRequest")
 	proto.RegisterType((*DeprecatedResponse)(nil), "deprecated.DeprecatedResponse")
-	proto.RegisterEnum("deprecated.DeprecatedEnum", DeprecatedEnum_name, DeprecatedEnum_value)
+}
+
+func init() { proto.RegisterFile("deprecated/deprecated.proto", fileDescriptor_f64ba265cd7eae3f) }
+
+var fileDescriptor_f64ba265cd7eae3f = []byte{
+	// 287 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xcd, 0x4a, 0xf3, 0x40,
+	0x14, 0x86, 0x7b, 0xe6, 0x83, 0x0f, 0x9d, 0x45, 0xad, 0x83, 0x68, 0x88, 0x28, 0x25, 0xab, 0x20,
+	0x34, 0x81, 0xba, 0x2b, 0x6e, 0x9a, 0x26, 0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0x97, 0x7f, 0xc9, 0xdb, 0x75, 0x39,
+	0xff, 0x3e, 0x08, 0xd8, 0xea, 0x13, 0x2c, 0x9f, 0x6f, 0xca, 0x4a, 0xbe, 0xf6, 0xa9, 0x97, 0x89,
+	0x8d, 0x5f, 0x8a, 0x3a, 0xe1, 0xa5, 0x3f, 0xdc, 0x23, 0xed, 0x8b, 0x6d, 0x90, 0xcd, 0x4a, 0xe4,
+	0xb3, 0x52, 0xf8, 0x12, 0x3b, 0x99, 0x27, 0x32, 0x31, 0x4e, 0xf7, 0x05, 0x90, 0xfe, 0x1f, 0x5c,
+	0xd7, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x08, 0xd5, 0xa0, 0x89, 0xdd, 0x01, 0x00, 0x00,
 }
 
 // Reference imports to suppress errors if they are not otherwise used.
@@ -208,27 +270,3 @@
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "deprecated/deprecated.proto",
 }
-
-func init() {
-	proto.RegisterFile("deprecated/deprecated.proto", fileDescriptor_deprecated_9e1889ba21817fad)
-}
-
-var fileDescriptor_deprecated_9e1889ba21817fad = []byte{
-	// 248 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0x49, 0x2d, 0x28,
-	0x4a, 0x4d, 0x4e, 0x2c, 0x49, 0x4d, 0xd1, 0x47, 0x30, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85,
-	0xb8, 0x10, 0x22, 0x4a, 0xe2, 0x5c, 0x82, 0x2e, 0x70, 0x5e, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71,
-	0x89, 0x15, 0x93, 0x04, 0xa3, 0x52, 0x32, 0x97, 0x10, 0xb2, 0x44, 0x71, 0x41, 0x7e, 0x5e, 0x71,
-	0xaa, 0x90, 0x27, 0x97, 0x00, 0x42, 0x73, 0x7c, 0x5a, 0x66, 0x6a, 0x4e, 0x8a, 0x04, 0xa3, 0x02,
-	0xa3, 0x06, 0x9f, 0x91, 0x94, 0x1e, 0x92, 0x3d, 0x08, 0x9d, 0xae, 0x79, 0xa5, 0xb9, 0x4e, 0x4c,
-	0x12, 0x8c, 0x41, 0xfc, 0x08, 0x69, 0x37, 0x90, 0x36, 0x90, 0x25, 0x5a, 0x1a, 0x5c, 0x7c, 0xa8,
-	0x4a, 0x85, 0x84, 0xb8, 0xb8, 0x5c, 0x5c, 0x03, 0x82, 0x5c, 0x9d, 0x1d, 0x43, 0x5c, 0x5d, 0x04,
-	0x18, 0xa4, 0x98, 0x38, 0x18, 0xa5, 0x98, 0x24, 0x18, 0x8d, 0xf2, 0x90, 0xdd, 0x19, 0x9c, 0x5a,
-	0x54, 0x96, 0x99, 0x9c, 0x2a, 0x14, 0x82, 0xac, 0xdd, 0x39, 0x31, 0x27, 0x47, 0x48, 0x16, 0xbb,
-	0x2b, 0xa0, 0x1e, 0x93, 0x92, 0xc3, 0x25, 0x0d, 0xf1, 0x9e, 0x12, 0x73, 0x07, 0x13, 0xa3, 0x14,
-	0x88, 0x70, 0x72, 0x8c, 0xb2, 0x49, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5,
-	0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x07, 0x07, 0x5f, 0x52, 0x69, 0x1a, 0x84, 0x91, 0xac,
-	0x9b, 0x9e, 0x9a, 0xa7, 0x9b, 0x9e, 0xaf, 0x5f, 0x92, 0x5a, 0x5c, 0x92, 0x92, 0x58, 0x92, 0x88,
-	0x14, 0xd2, 0x3b, 0x18, 0x19, 0x93, 0xd8, 0xc0, 0xaa, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff,
-	0x0e, 0xf5, 0x6c, 0x87, 0x8c, 0x01, 0x00, 0x00,
-}
diff --git a/protoc-gen-go/testdata/deprecated/deprecated.proto b/protoc-gen-go/testdata/deprecated/deprecated.proto
index b314166..192b158 100644
--- a/protoc-gen-go/testdata/deprecated/deprecated.proto
+++ b/protoc-gen-go/testdata/deprecated/deprecated.proto
@@ -49,6 +49,11 @@
   option deprecated = true;
   // DeprecatedField contains a DeprecatedEnum.
   DeprecatedEnum deprecated_field = 1 [deprecated=true];
+  // DeprecatedOneof contains a deprecated field.
+  oneof deprecated_oneof {
+    // DeprecatedOneofField is a deprecated field.
+    string deprecated_oneof_field = 2 [deprecated=true];
+  }
 }
 
 // DeprecatedEnum contains deprecated values.
diff --git a/protoc-gen-go/testdata/extension_base/extension_base.pb.go b/protoc-gen-go/testdata/extension_base/extension_base.pb.go
index a08e8ed..b5d4aa6 100644
--- a/protoc-gen-go/testdata/extension_base/extension_base.pb.go
+++ b/protoc-gen-go/testdata/extension_base/extension_base.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: extension_base/extension_base.proto
 
-package extension_base // import "github.com/golang/protobuf/protoc-gen-go/testdata/extension_base"
+package extension_base
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type BaseMessage struct {
 	Height                       *int32   `protobuf:"varint,1,opt,name=height" json:"height,omitempty"`
@@ -30,7 +32,7 @@
 func (m *BaseMessage) String() string { return proto.CompactTextString(m) }
 func (*BaseMessage) ProtoMessage()    {}
 func (*BaseMessage) Descriptor() ([]byte, []int) {
-	return fileDescriptor_extension_base_41d3c712c9fc37fc, []int{0}
+	return fileDescriptor_2fbd53bac0b7ca8a, []int{0}
 }
 
 var extRange_BaseMessage = []proto.ExtensionRange{
@@ -41,14 +43,15 @@
 func (*BaseMessage) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_BaseMessage
 }
+
 func (m *BaseMessage) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_BaseMessage.Unmarshal(m, b)
 }
 func (m *BaseMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_BaseMessage.Marshal(b, m, deterministic)
 }
-func (dst *BaseMessage) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_BaseMessage.Merge(dst, src)
+func (m *BaseMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_BaseMessage.Merge(m, src)
 }
 func (m *BaseMessage) XXX_Size() int {
 	return xxx_messageInfo_BaseMessage.Size(m)
@@ -78,14 +81,7 @@
 func (m *OldStyleMessage) String() string { return proto.CompactTextString(m) }
 func (*OldStyleMessage) ProtoMessage()    {}
 func (*OldStyleMessage) Descriptor() ([]byte, []int) {
-	return fileDescriptor_extension_base_41d3c712c9fc37fc, []int{1}
-}
-
-func (m *OldStyleMessage) MarshalJSON() ([]byte, error) {
-	return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions)
-}
-func (m *OldStyleMessage) UnmarshalJSON(buf []byte) error {
-	return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)
+	return fileDescriptor_2fbd53bac0b7ca8a, []int{1}
 }
 
 var extRange_OldStyleMessage = []proto.ExtensionRange{
@@ -95,14 +91,15 @@
 func (*OldStyleMessage) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_OldStyleMessage
 }
+
 func (m *OldStyleMessage) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_OldStyleMessage.Unmarshal(m, b)
 }
 func (m *OldStyleMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_OldStyleMessage.Marshal(b, m, deterministic)
 }
-func (dst *OldStyleMessage) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_OldStyleMessage.Merge(dst, src)
+func (m *OldStyleMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OldStyleMessage.Merge(m, src)
 }
 func (m *OldStyleMessage) XXX_Size() int {
 	return xxx_messageInfo_OldStyleMessage.Size(m)
@@ -119,10 +116,10 @@
 }
 
 func init() {
-	proto.RegisterFile("extension_base/extension_base.proto", fileDescriptor_extension_base_41d3c712c9fc37fc)
+	proto.RegisterFile("extension_base/extension_base.proto", fileDescriptor_2fbd53bac0b7ca8a)
 }
 
-var fileDescriptor_extension_base_41d3c712c9fc37fc = []byte{
+var fileDescriptor_2fbd53bac0b7ca8a = []byte{
 	// 179 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4e, 0xad, 0x28, 0x49,
 	0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0x8b, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x47, 0xe5, 0xea, 0x15, 0x14,
diff --git a/protoc-gen-go/testdata/extension_extra/extension_extra.pb.go b/protoc-gen-go/testdata/extension_extra/extension_extra.pb.go
index b373216..fd82a25 100644
--- a/protoc-gen-go/testdata/extension_extra/extension_extra.pb.go
+++ b/protoc-gen-go/testdata/extension_extra/extension_extra.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: extension_extra/extension_extra.proto
 
-package extension_extra // import "github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra"
+package extension_extra
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type ExtraMessage struct {
 	Width                *int32   `protobuf:"varint,1,opt,name=width" json:"width,omitempty"`
@@ -29,16 +31,17 @@
 func (m *ExtraMessage) String() string { return proto.CompactTextString(m) }
 func (*ExtraMessage) ProtoMessage()    {}
 func (*ExtraMessage) Descriptor() ([]byte, []int) {
-	return fileDescriptor_extension_extra_83adf2410f49f816, []int{0}
+	return fileDescriptor_fce75f5a63502cd5, []int{0}
 }
+
 func (m *ExtraMessage) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_ExtraMessage.Unmarshal(m, b)
 }
 func (m *ExtraMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_ExtraMessage.Marshal(b, m, deterministic)
 }
-func (dst *ExtraMessage) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ExtraMessage.Merge(dst, src)
+func (m *ExtraMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ExtraMessage.Merge(m, src)
 }
 func (m *ExtraMessage) XXX_Size() int {
 	return xxx_messageInfo_ExtraMessage.Size(m)
@@ -61,10 +64,10 @@
 }
 
 func init() {
-	proto.RegisterFile("extension_extra/extension_extra.proto", fileDescriptor_extension_extra_83adf2410f49f816)
+	proto.RegisterFile("extension_extra/extension_extra.proto", fileDescriptor_fce75f5a63502cd5)
 }
 
-var fileDescriptor_extension_extra_83adf2410f49f816 = []byte{
+var fileDescriptor_fce75f5a63502cd5 = []byte{
 	// 133 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xad, 0x28, 0x49,
 	0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0x8b, 0x4f, 0xad, 0x28, 0x29, 0x4a, 0xd4, 0x47, 0xe3, 0xeb, 0x15,
diff --git a/protoc-gen-go/testdata/extension_user/extension_user.pb.go b/protoc-gen-go/testdata/extension_user/extension_user.pb.go
index c718792..d7849be 100644
--- a/protoc-gen-go/testdata/extension_user/extension_user.pb.go
+++ b/protoc-gen-go/testdata/extension_user/extension_user.pb.go
@@ -1,13 +1,15 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: extension_user/extension_user.proto
 
-package extension_user // import "github.com/golang/protobuf/protoc-gen-go/testdata/extension_user"
+package extension_user
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import extension_base "github.com/golang/protobuf/protoc-gen-go/testdata/extension_base"
-import extension_extra "github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	extension_base "github.com/golang/protobuf/protoc-gen-go/testdata/extension_base"
+	extension_extra "github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -18,7 +20,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type UserMessage struct {
 	Name                 *string  `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
@@ -32,16 +34,17 @@
 func (m *UserMessage) String() string { return proto.CompactTextString(m) }
 func (*UserMessage) ProtoMessage()    {}
 func (*UserMessage) Descriptor() ([]byte, []int) {
-	return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{0}
+	return fileDescriptor_359ba8abf543ca10, []int{0}
 }
+
 func (m *UserMessage) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_UserMessage.Unmarshal(m, b)
 }
 func (m *UserMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_UserMessage.Marshal(b, m, deterministic)
 }
-func (dst *UserMessage) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_UserMessage.Merge(dst, src)
+func (m *UserMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_UserMessage.Merge(m, src)
 }
 func (m *UserMessage) XXX_Size() int {
 	return xxx_messageInfo_UserMessage.Size(m)
@@ -78,7 +81,7 @@
 func (m *LoudMessage) String() string { return proto.CompactTextString(m) }
 func (*LoudMessage) ProtoMessage()    {}
 func (*LoudMessage) Descriptor() ([]byte, []int) {
-	return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{1}
+	return fileDescriptor_359ba8abf543ca10, []int{1}
 }
 
 var extRange_LoudMessage = []proto.ExtensionRange{
@@ -88,14 +91,15 @@
 func (*LoudMessage) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_LoudMessage
 }
+
 func (m *LoudMessage) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_LoudMessage.Unmarshal(m, b)
 }
 func (m *LoudMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_LoudMessage.Marshal(b, m, deterministic)
 }
-func (dst *LoudMessage) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_LoudMessage.Merge(dst, src)
+func (m *LoudMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_LoudMessage.Merge(m, src)
 }
 func (m *LoudMessage) XXX_Size() int {
 	return xxx_messageInfo_LoudMessage.Size(m)
@@ -126,16 +130,17 @@
 func (m *LoginMessage) String() string { return proto.CompactTextString(m) }
 func (*LoginMessage) ProtoMessage()    {}
 func (*LoginMessage) Descriptor() ([]byte, []int) {
-	return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{2}
+	return fileDescriptor_359ba8abf543ca10, []int{2}
 }
+
 func (m *LoginMessage) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_LoginMessage.Unmarshal(m, b)
 }
 func (m *LoginMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_LoginMessage.Marshal(b, m, deterministic)
 }
-func (dst *LoginMessage) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_LoginMessage.Merge(dst, src)
+func (m *LoginMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_LoginMessage.Merge(m, src)
 }
 func (m *LoginMessage) XXX_Size() int {
 	return xxx_messageInfo_LoginMessage.Size(m)
@@ -151,7 +156,7 @@
 	ExtensionType: (*UserMessage)(nil),
 	Field:         16,
 	Name:          "extension_user.LoginMessage.user_message",
-	Tag:           "bytes,16,opt,name=user_message,json=userMessage",
+	Tag:           "bytes,16,opt,name=user_message",
 	Filename:      "extension_user/extension_user.proto",
 }
 
@@ -166,16 +171,17 @@
 func (m *Detail) String() string { return proto.CompactTextString(m) }
 func (*Detail) ProtoMessage()    {}
 func (*Detail) Descriptor() ([]byte, []int) {
-	return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{3}
+	return fileDescriptor_359ba8abf543ca10, []int{3}
 }
+
 func (m *Detail) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Detail.Unmarshal(m, b)
 }
 func (m *Detail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Detail.Marshal(b, m, deterministic)
 }
-func (dst *Detail) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Detail.Merge(dst, src)
+func (m *Detail) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Detail.Merge(m, src)
 }
 func (m *Detail) XXX_Size() int {
 	return xxx_messageInfo_Detail.Size(m)
@@ -205,16 +211,17 @@
 func (m *Announcement) String() string { return proto.CompactTextString(m) }
 func (*Announcement) ProtoMessage()    {}
 func (*Announcement) Descriptor() ([]byte, []int) {
-	return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{4}
+	return fileDescriptor_359ba8abf543ca10, []int{4}
 }
+
 func (m *Announcement) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Announcement.Unmarshal(m, b)
 }
 func (m *Announcement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Announcement.Marshal(b, m, deterministic)
 }
-func (dst *Announcement) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Announcement.Merge(dst, src)
+func (m *Announcement) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Announcement.Merge(m, src)
 }
 func (m *Announcement) XXX_Size() int {
 	return xxx_messageInfo_Announcement.Size(m)
@@ -237,7 +244,7 @@
 	ExtensionType: (*Announcement)(nil),
 	Field:         100,
 	Name:          "extension_user.Announcement.loud_ext",
-	Tag:           "bytes,100,opt,name=loud_ext,json=loudExt",
+	Tag:           "bytes,100,opt,name=loud_ext",
 	Filename:      "extension_user/extension_user.proto",
 }
 
@@ -254,16 +261,17 @@
 func (m *OldStyleParcel) String() string { return proto.CompactTextString(m) }
 func (*OldStyleParcel) ProtoMessage()    {}
 func (*OldStyleParcel) Descriptor() ([]byte, []int) {
-	return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{5}
+	return fileDescriptor_359ba8abf543ca10, []int{5}
 }
+
 func (m *OldStyleParcel) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_OldStyleParcel.Unmarshal(m, b)
 }
 func (m *OldStyleParcel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_OldStyleParcel.Marshal(b, m, deterministic)
 }
-func (dst *OldStyleParcel) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_OldStyleParcel.Merge(dst, src)
+func (m *OldStyleParcel) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OldStyleParcel.Merge(m, src)
 }
 func (m *OldStyleParcel) XXX_Size() int {
 	return xxx_messageInfo_OldStyleParcel.Size(m)
@@ -293,7 +301,7 @@
 	ExtensionType: (*OldStyleParcel)(nil),
 	Field:         2001,
 	Name:          "extension_user.OldStyleParcel",
-	Tag:           "bytes,2001,opt,name=message_set_extension,json=messageSetExtension",
+	Tag:           "bytes,2001,opt,name=message_set_extension",
 	Filename:      "extension_user/extension_user.proto",
 }
 
@@ -302,7 +310,7 @@
 	ExtensionType: (*UserMessage)(nil),
 	Field:         5,
 	Name:          "extension_user.user_message",
-	Tag:           "bytes,5,opt,name=user_message,json=userMessage",
+	Tag:           "bytes,5,opt,name=user_message",
 	Filename:      "extension_user/extension_user.proto",
 }
 
@@ -311,7 +319,7 @@
 	ExtensionType: (*extension_extra.ExtraMessage)(nil),
 	Field:         9,
 	Name:          "extension_user.extra_message",
-	Tag:           "bytes,9,opt,name=extra_message,json=extraMessage",
+	Tag:           "bytes,9,opt,name=extra_message",
 	Filename:      "extension_user/extension_user.proto",
 }
 
@@ -344,16 +352,15 @@
 
 func init() {
 	proto.RegisterType((*UserMessage)(nil), "extension_user.UserMessage")
+	proto.RegisterExtension(E_LoudMessage_Volume)
 	proto.RegisterType((*LoudMessage)(nil), "extension_user.LoudMessage")
+	proto.RegisterExtension(E_LoginMessage_UserMessage)
 	proto.RegisterType((*LoginMessage)(nil), "extension_user.LoginMessage")
 	proto.RegisterType((*Detail)(nil), "extension_user.Detail")
-	proto.RegisterType((*Announcement)(nil), "extension_user.Announcement")
-	proto.RegisterMessageSetType((*OldStyleParcel)(nil), 2001, "extension_user.OldStyleParcel")
-	proto.RegisterType((*OldStyleParcel)(nil), "extension_user.OldStyleParcel")
-	proto.RegisterExtension(E_LoudMessage_Volume)
-	proto.RegisterExtension(E_LoginMessage_UserMessage)
 	proto.RegisterExtension(E_Announcement_LoudExt)
+	proto.RegisterType((*Announcement)(nil), "extension_user.Announcement")
 	proto.RegisterExtension(E_OldStyleParcel_MessageSetExtension)
+	proto.RegisterType((*OldStyleParcel)(nil), "extension_user.OldStyleParcel")
 	proto.RegisterExtension(E_UserMessage)
 	proto.RegisterExtension(E_ExtraMessage)
 	proto.RegisterExtension(E_Width)
@@ -362,10 +369,10 @@
 }
 
 func init() {
-	proto.RegisterFile("extension_user/extension_user.proto", fileDescriptor_extension_user_af41b5e0bdfb7846)
+	proto.RegisterFile("extension_user/extension_user.proto", fileDescriptor_359ba8abf543ca10)
 }
 
-var fileDescriptor_extension_user_af41b5e0bdfb7846 = []byte{
+var fileDescriptor_359ba8abf543ca10 = []byte{
 	// 492 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x51, 0x6f, 0x94, 0x40,
 	0x10, 0x0e, 0x6d, 0x8f, 0x5e, 0x87, 0x6b, 0xad, 0xa8, 0xcd, 0xa5, 0x6a, 0x25, 0x18, 0x13, 0x62,
diff --git a/protoc-gen-go/testdata/grpc/grpc.pb.go b/protoc-gen-go/testdata/grpc/grpc.pb.go
index 1bc0283..98e4f40 100644
--- a/protoc-gen-go/testdata/grpc/grpc.pb.go
+++ b/protoc-gen-go/testdata/grpc/grpc.pb.go
@@ -1,15 +1,14 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: grpc/grpc.proto
 
-package testing // import "github.com/golang/protobuf/protoc-gen-go/testdata/grpc"
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+package testing
 
 import (
-	context "golang.org/x/net/context"
+	context "context"
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
 	grpc "google.golang.org/grpc"
+	math "math"
 )
 
 // Reference imports to suppress errors if they are not otherwise used.
@@ -21,7 +20,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type SimpleRequest struct {
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -33,16 +32,17 @@
 func (m *SimpleRequest) String() string { return proto.CompactTextString(m) }
 func (*SimpleRequest) ProtoMessage()    {}
 func (*SimpleRequest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_grpc_65bf3902e49ee873, []int{0}
+	return fileDescriptor_81ea47a3f88c2082, []int{0}
 }
+
 func (m *SimpleRequest) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_SimpleRequest.Unmarshal(m, b)
 }
 func (m *SimpleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_SimpleRequest.Marshal(b, m, deterministic)
 }
-func (dst *SimpleRequest) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SimpleRequest.Merge(dst, src)
+func (m *SimpleRequest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SimpleRequest.Merge(m, src)
 }
 func (m *SimpleRequest) XXX_Size() int {
 	return xxx_messageInfo_SimpleRequest.Size(m)
@@ -63,16 +63,17 @@
 func (m *SimpleResponse) String() string { return proto.CompactTextString(m) }
 func (*SimpleResponse) ProtoMessage()    {}
 func (*SimpleResponse) Descriptor() ([]byte, []int) {
-	return fileDescriptor_grpc_65bf3902e49ee873, []int{1}
+	return fileDescriptor_81ea47a3f88c2082, []int{1}
 }
+
 func (m *SimpleResponse) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_SimpleResponse.Unmarshal(m, b)
 }
 func (m *SimpleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_SimpleResponse.Marshal(b, m, deterministic)
 }
-func (dst *SimpleResponse) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SimpleResponse.Merge(dst, src)
+func (m *SimpleResponse) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SimpleResponse.Merge(m, src)
 }
 func (m *SimpleResponse) XXX_Size() int {
 	return xxx_messageInfo_SimpleResponse.Size(m)
@@ -93,16 +94,17 @@
 func (m *StreamMsg) String() string { return proto.CompactTextString(m) }
 func (*StreamMsg) ProtoMessage()    {}
 func (*StreamMsg) Descriptor() ([]byte, []int) {
-	return fileDescriptor_grpc_65bf3902e49ee873, []int{2}
+	return fileDescriptor_81ea47a3f88c2082, []int{2}
 }
+
 func (m *StreamMsg) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_StreamMsg.Unmarshal(m, b)
 }
 func (m *StreamMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_StreamMsg.Marshal(b, m, deterministic)
 }
-func (dst *StreamMsg) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_StreamMsg.Merge(dst, src)
+func (m *StreamMsg) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_StreamMsg.Merge(m, src)
 }
 func (m *StreamMsg) XXX_Size() int {
 	return xxx_messageInfo_StreamMsg.Size(m)
@@ -123,16 +125,17 @@
 func (m *StreamMsg2) String() string { return proto.CompactTextString(m) }
 func (*StreamMsg2) ProtoMessage()    {}
 func (*StreamMsg2) Descriptor() ([]byte, []int) {
-	return fileDescriptor_grpc_65bf3902e49ee873, []int{3}
+	return fileDescriptor_81ea47a3f88c2082, []int{3}
 }
+
 func (m *StreamMsg2) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_StreamMsg2.Unmarshal(m, b)
 }
 func (m *StreamMsg2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_StreamMsg2.Marshal(b, m, deterministic)
 }
-func (dst *StreamMsg2) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_StreamMsg2.Merge(dst, src)
+func (m *StreamMsg2) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_StreamMsg2.Merge(m, src)
 }
 func (m *StreamMsg2) XXX_Size() int {
 	return xxx_messageInfo_StreamMsg2.Size(m)
@@ -150,6 +153,28 @@
 	proto.RegisterType((*StreamMsg2)(nil), "grpc.testing.StreamMsg2")
 }
 
+func init() { proto.RegisterFile("grpc/grpc.proto", fileDescriptor_81ea47a3f88c2082) }
+
+var fileDescriptor_81ea47a3f88c2082 = []byte{
+	// 244 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0x2f, 0x2a, 0x48,
+	0xd6, 0x07, 0x11, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0x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
+	0x9a, 0xa7, 0x9b, 0x9e, 0xaf, 0x0f, 0x32, 0x22, 0x25, 0xb1, 0x24, 0x11, 0x1c, 0x4d, 0xd6, 0x50,
+	0x03, 0x93, 0xd8, 0xc0, 0x8a, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0xb9, 0x95, 0x42,
+	0xc2, 0x01, 0x00, 0x00,
+}
+
 // Reference imports to suppress errors if they are not otherwise used.
 var _ context.Context
 var _ grpc.ClientConn
@@ -420,25 +445,3 @@
 	},
 	Metadata: "grpc/grpc.proto",
 }
-
-func init() { proto.RegisterFile("grpc/grpc.proto", fileDescriptor_grpc_65bf3902e49ee873) }
-
-var fileDescriptor_grpc_65bf3902e49ee873 = []byte{
-	// 244 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0x2f, 0x2a, 0x48,
-	0xd6, 0x07, 0x11, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x3c, 0x60, 0x76, 0x49, 0x6a, 0x71,
-	0x49, 0x66, 0x5e, 0xba, 0x12, 0x3f, 0x17, 0x6f, 0x70, 0x66, 0x6e, 0x41, 0x4e, 0x6a, 0x50, 0x6a,
-	0x61, 0x69, 0x6a, 0x71, 0x89, 0x92, 0x00, 0x17, 0x1f, 0x4c, 0xa0, 0xb8, 0x20, 0x3f, 0xaf, 0x38,
-	0x55, 0x89, 0x9b, 0x8b, 0x33, 0xb8, 0xa4, 0x28, 0x35, 0x31, 0xd7, 0xb7, 0x38, 0x5d, 0x89, 0x87,
-	0x8b, 0x0b, 0xce, 0x31, 0x32, 0x9a, 0xc1, 0xc4, 0xc5, 0x12, 0x92, 0x5a, 0x5c, 0x22, 0xe4, 0xc6,
-	0xc5, 0x19, 0x9a, 0x97, 0x58, 0x54, 0xe9, 0x9c, 0x98, 0x93, 0x23, 0x24, 0xad, 0x87, 0x6c, 0x85,
-	0x1e, 0x8a, 0xf9, 0x52, 0x32, 0xd8, 0x25, 0x21, 0x76, 0x09, 0xb9, 0x70, 0x71, 0xb9, 0xe4, 0x97,
-	0xe7, 0x15, 0x83, 0xad, 0xc0, 0x6f, 0x90, 0x38, 0x9a, 0x24, 0xcc, 0x55, 0x06, 0x8c, 0x42, 0xce,
-	0x5c, 0x1c, 0xa1, 0x05, 0x50, 0x33, 0x70, 0x29, 0xc3, 0xef, 0x10, 0x0d, 0x46, 0x21, 0x5b, 0x2e,
-	0x16, 0xa7, 0xcc, 0x94, 0x4c, 0xdc, 0x06, 0x48, 0xe0, 0x90, 0x30, 0xd2, 0x60, 0x34, 0x60, 0x74,
-	0x72, 0x88, 0xb2, 0x4b, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf,
-	0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x07, 0xc7, 0x40, 0x52, 0x69, 0x1a, 0x84, 0x91, 0xac, 0x9b, 0x9e,
-	0x9a, 0xa7, 0x9b, 0x9e, 0xaf, 0x0f, 0x32, 0x22, 0x25, 0xb1, 0x24, 0x11, 0x1c, 0x4d, 0xd6, 0x50,
-	0x03, 0x93, 0xd8, 0xc0, 0x8a, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0xb9, 0x95, 0x42,
-	0xc2, 0x01, 0x00, 0x00,
-}
diff --git a/protoc-gen-go/testdata/import_public/a.pb.go b/protoc-gen-go/testdata/import_public/a.pb.go
index d67ada6..fa511fc 100644
--- a/protoc-gen-go/testdata/import_public/a.pb.go
+++ b/protoc-gen-go/testdata/import_public/a.pb.go
@@ -1,12 +1,14 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: import_public/a.proto
 
-package import_public // import "github.com/golang/protobuf/protoc-gen-go/testdata/import_public"
+package import_public
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import sub "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	sub "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -17,10 +19,22 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+const Default_M_DefaultField = sub.Default_M_DefaultField
 
 // M from public import import_public/sub/a.proto
 type M = sub.M
+type M_OneofInt32 = sub.M_OneofInt32
+type M_OneofInt64 = sub.M_OneofInt64
+
+// M_Grouping from public import import_public/sub/a.proto
+type M_Grouping = sub.M_Grouping
+
+// M_Submessage from public import import_public/sub/a.proto
+type M_Submessage = sub.M_Submessage
+type M_Submessage_SubmessageOneofInt32 = sub.M_Submessage_SubmessageOneofInt32
+type M_Submessage_SubmessageOneofInt64 = sub.M_Submessage_SubmessageOneofInt64
 
 // E from public import import_public/sub/a.proto
 type E = sub.E
@@ -30,12 +44,28 @@
 
 const E_ZERO = E(sub.E_ZERO)
 
-// Ignoring public import of Local from import_public/b.proto
+// M_Subenum from public import import_public/sub/a.proto
+type M_Subenum = sub.M_Subenum
+
+var M_Subenum_name = sub.M_Subenum_name
+var M_Subenum_value = sub.M_Subenum_value
+
+const M_M_ZERO = M_Subenum(sub.M_M_ZERO)
+
+// M_Submessage_Submessage_Subenum from public import import_public/sub/a.proto
+type M_Submessage_Submessage_Subenum = sub.M_Submessage_Submessage_Subenum
+
+var M_Submessage_Submessage_Subenum_name = sub.M_Submessage_Submessage_Subenum_name
+var M_Submessage_Submessage_Subenum_value = sub.M_Submessage_Submessage_Subenum_value
+
+const M_Submessage_M_SUBMESSAGE_ZERO = M_Submessage_Submessage_Subenum(sub.M_Submessage_M_SUBMESSAGE_ZERO)
+
+var E_ExtensionField = sub.E_ExtensionField
 
 type Public struct {
-	M                    *sub.M   `protobuf:"bytes,1,opt,name=m,proto3" json:"m,omitempty"`
-	E                    sub.E    `protobuf:"varint,2,opt,name=e,proto3,enum=goproto.test.import_public.sub.E" json:"e,omitempty"`
-	Local                *Local   `protobuf:"bytes,3,opt,name=local,proto3" json:"local,omitempty"`
+	M                    *sub.M   `protobuf:"bytes,1,opt,name=m" json:"m,omitempty"`
+	E                    *sub.E   `protobuf:"varint,2,opt,name=e,enum=goproto.test.import_public.sub.E" json:"e,omitempty"`
+	Local                *Local   `protobuf:"bytes,3,opt,name=local" json:"local,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
 	XXX_sizecache        int32    `json:"-"`
@@ -45,16 +75,17 @@
 func (m *Public) String() string { return proto.CompactTextString(m) }
 func (*Public) ProtoMessage()    {}
 func (*Public) Descriptor() ([]byte, []int) {
-	return fileDescriptor_a_c0314c022b7c17d8, []int{0}
+	return fileDescriptor_73b7577c95fa6b70, []int{0}
 }
+
 func (m *Public) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Public.Unmarshal(m, b)
 }
 func (m *Public) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Public.Marshal(b, m, deterministic)
 }
-func (dst *Public) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Public.Merge(dst, src)
+func (m *Public) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Public.Merge(m, src)
 }
 func (m *Public) XXX_Size() int {
 	return xxx_messageInfo_Public.Size(m)
@@ -73,8 +104,8 @@
 }
 
 func (m *Public) GetE() sub.E {
-	if m != nil {
-		return m.E
+	if m != nil && m.E != nil {
+		return *m.E
 	}
 	return sub.E_ZERO
 }
@@ -90,10 +121,10 @@
 	proto.RegisterType((*Public)(nil), "goproto.test.import_public.Public")
 }
 
-func init() { proto.RegisterFile("import_public/a.proto", fileDescriptor_a_c0314c022b7c17d8) }
+func init() { proto.RegisterFile("import_public/a.proto", fileDescriptor_73b7577c95fa6b70) }
 
-var fileDescriptor_a_c0314c022b7c17d8 = []byte{
-	// 200 bytes of a gzipped FileDescriptorProto
+var fileDescriptor_73b7577c95fa6b70 = []byte{
+	// 195 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0xcc, 0x2d, 0xc8,
 	0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x4f, 0xd4, 0x2b, 0x28, 0xca, 0x2f,
 	0xc9, 0x17, 0x92, 0x4a, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b, 0xf4, 0x50, 0xd4, 0x48,
@@ -105,6 +136,6 @@
 	0x04, 0x51, 0xef, 0xe4, 0x18, 0x65, 0x9f, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f,
 	0xab, 0x9f, 0x9e, 0x9f, 0x93, 0x98, 0x97, 0xae, 0x0f, 0xd6, 0x9a, 0x54, 0x9a, 0x06, 0x61, 0x24,
 	0xeb, 0xa6, 0xa7, 0xe6, 0xe9, 0xa6, 0xe7, 0xeb, 0x83, 0xcc, 0x4a, 0x49, 0x2c, 0x49, 0xd4, 0x47,
-	0x31, 0x2f, 0x80, 0x21, 0x80, 0x31, 0x89, 0x0d, 0xac, 0xd2, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff,
-	0x70, 0xc5, 0xc3, 0x79, 0x5a, 0x01, 0x00, 0x00,
+	0x31, 0x2f, 0x80, 0x21, 0x80, 0x11, 0x10, 0x00, 0x00, 0xff, 0xff, 0x17, 0x83, 0x2d, 0xd4, 0x52,
+	0x01, 0x00, 0x00,
 }
diff --git a/protoc-gen-go/testdata/import_public/a.proto b/protoc-gen-go/testdata/import_public/a.proto
index 957ad89..9a4e7c0 100644
--- a/protoc-gen-go/testdata/import_public/a.proto
+++ b/protoc-gen-go/testdata/import_public/a.proto
@@ -29,7 +29,7 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-syntax = "proto3";
+syntax = "proto2";
 
 package goproto.test.import_public;
 
@@ -39,7 +39,7 @@
 import public "import_public/b.proto";     // Same Go package.
 
 message Public {
-  goproto.test.import_public.sub.M m = 1;
-  goproto.test.import_public.sub.E e = 2;
-  Local local = 3;
+  optional goproto.test.import_public.sub.M m = 1;
+  optional goproto.test.import_public.sub.E e = 2;
+  optional Local local = 3;
 }
diff --git a/protoc-gen-go/testdata/import_public/b.pb.go b/protoc-gen-go/testdata/import_public/b.pb.go
index 24569ab..522f215 100644
--- a/protoc-gen-go/testdata/import_public/b.pb.go
+++ b/protoc-gen-go/testdata/import_public/b.pb.go
@@ -1,12 +1,14 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: import_public/b.proto
 
-package import_public // import "github.com/golang/protobuf/protoc-gen-go/testdata/import_public"
+package import_public
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import sub "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	sub "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -17,11 +19,11 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type Local struct {
-	M                    *sub.M   `protobuf:"bytes,1,opt,name=m,proto3" json:"m,omitempty"`
-	E                    sub.E    `protobuf:"varint,2,opt,name=e,proto3,enum=goproto.test.import_public.sub.E" json:"e,omitempty"`
+	M                    *sub.M   `protobuf:"bytes,1,opt,name=m" json:"m,omitempty"`
+	E                    *sub.E   `protobuf:"varint,2,opt,name=e,enum=goproto.test.import_public.sub.E" json:"e,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
 	XXX_sizecache        int32    `json:"-"`
@@ -31,16 +33,17 @@
 func (m *Local) String() string { return proto.CompactTextString(m) }
 func (*Local) ProtoMessage()    {}
 func (*Local) Descriptor() ([]byte, []int) {
-	return fileDescriptor_b_7f20a805fad67bd0, []int{0}
+	return fileDescriptor_84995586b3d09710, []int{0}
 }
+
 func (m *Local) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Local.Unmarshal(m, b)
 }
 func (m *Local) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Local.Marshal(b, m, deterministic)
 }
-func (dst *Local) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Local.Merge(dst, src)
+func (m *Local) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Local.Merge(m, src)
 }
 func (m *Local) XXX_Size() int {
 	return xxx_messageInfo_Local.Size(m)
@@ -59,8 +62,8 @@
 }
 
 func (m *Local) GetE() sub.E {
-	if m != nil {
-		return m.E
+	if m != nil && m.E != nil {
+		return *m.E
 	}
 	return sub.E_ZERO
 }
@@ -69,10 +72,10 @@
 	proto.RegisterType((*Local)(nil), "goproto.test.import_public.Local")
 }
 
-func init() { proto.RegisterFile("import_public/b.proto", fileDescriptor_b_7f20a805fad67bd0) }
+func init() { proto.RegisterFile("import_public/b.proto", fileDescriptor_84995586b3d09710) }
 
-var fileDescriptor_b_7f20a805fad67bd0 = []byte{
-	// 174 bytes of a gzipped FileDescriptorProto
+var fileDescriptor_84995586b3d09710 = []byte{
+	// 169 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0xcc, 0x2d, 0xc8,
 	0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x4f, 0xd2, 0x2b, 0x28, 0xca, 0x2f,
 	0xc9, 0x17, 0x92, 0x4a, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b, 0xf4, 0x50, 0xd4, 0x48,
@@ -82,6 +85,6 @@
 	0x04, 0x93, 0x02, 0xa3, 0x06, 0x1f, 0x61, 0x0d, 0xae, 0x41, 0x8c, 0xa9, 0x4e, 0x8e, 0x51, 0xf6,
 	0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0x39, 0x89, 0x79,
 	0xe9, 0xfa, 0x60, 0x6d, 0x49, 0xa5, 0x69, 0x10, 0x46, 0xb2, 0x6e, 0x7a, 0x6a, 0x9e, 0x6e, 0x7a,
-	0xbe, 0x3e, 0xc8, 0x9c, 0x94, 0xc4, 0x92, 0x44, 0x7d, 0x14, 0xb3, 0x92, 0xd8, 0xc0, 0xaa, 0x8c,
-	0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x2b, 0x5f, 0x8e, 0x04, 0x01, 0x00, 0x00,
+	0xbe, 0x3e, 0xc8, 0x9c, 0x94, 0xc4, 0x92, 0x44, 0x7d, 0x14, 0xb3, 0x00, 0x01, 0x00, 0x00, 0xff,
+	0xff, 0x35, 0x0e, 0x6a, 0x82, 0xfc, 0x00, 0x00, 0x00,
 }
diff --git a/protoc-gen-go/testdata/import_public/b.proto b/protoc-gen-go/testdata/import_public/b.proto
index 1dbca3e..424306e 100644
--- a/protoc-gen-go/testdata/import_public/b.proto
+++ b/protoc-gen-go/testdata/import_public/b.proto
@@ -29,7 +29,7 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-syntax = "proto3";
+syntax = "proto2";
 
 package goproto.test.import_public;
 
@@ -38,6 +38,6 @@
 import "import_public/sub/a.proto";
 
 message Local {
-  goproto.test.import_public.sub.M m = 1;
-  goproto.test.import_public.sub.E e = 2;
+  optional goproto.test.import_public.sub.M m = 1;
+  optional goproto.test.import_public.sub.E e = 2;
 }
diff --git a/protoc-gen-go/testdata/import_public/importing/importing.pb.go b/protoc-gen-go/testdata/import_public/importing/importing.pb.go
new file mode 100644
index 0000000..3f0f37e
--- /dev/null
+++ b/protoc-gen-go/testdata/import_public/importing/importing.pb.go
@@ -0,0 +1,85 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: import_public/importing/importing.proto
+
+package importing
+
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	_ "github.com/golang/protobuf/protoc-gen-go/testdata/import_public"
+	sub "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub"
+	math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+type M struct {
+	// Message type defined in a file publicly imported by a file we import.
+	M                    *sub.M   `protobuf:"bytes,1,opt,name=m" json:"m,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *M) Reset()         { *m = M{} }
+func (m *M) String() string { return proto.CompactTextString(m) }
+func (*M) ProtoMessage()    {}
+func (*M) Descriptor() ([]byte, []int) {
+	return fileDescriptor_36b835b3b8f6171a, []int{0}
+}
+
+func (m *M) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_M.Unmarshal(m, b)
+}
+func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_M.Marshal(b, m, deterministic)
+}
+func (m *M) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_M.Merge(m, src)
+}
+func (m *M) XXX_Size() int {
+	return xxx_messageInfo_M.Size(m)
+}
+func (m *M) XXX_DiscardUnknown() {
+	xxx_messageInfo_M.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_M proto.InternalMessageInfo
+
+func (m *M) GetM() *sub.M {
+	if m != nil {
+		return m.M
+	}
+	return nil
+}
+
+func init() {
+	proto.RegisterType((*M)(nil), "goproto.test.import_public.importing.M")
+}
+
+func init() {
+	proto.RegisterFile("import_public/importing/importing.proto", fileDescriptor_36b835b3b8f6171a)
+}
+
+var fileDescriptor_36b835b3b8f6171a = []byte{
+	// 153 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xcf, 0xcc, 0x2d, 0xc8,
+	0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x87, 0xf0, 0x32, 0xf3, 0xd2, 0x11,
+	0x2c, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0x95, 0xf4, 0x7c, 0x30, 0x43, 0xaf, 0x24, 0xb5,
+	0xb8, 0x44, 0x0f, 0x45, 0x97, 0x1e, 0x5c, 0xad, 0x94, 0x28, 0xaa, 0x71, 0x89, 0x10, 0xcd, 0x4a,
+	0x26, 0x5c, 0x8c, 0xbe, 0x42, 0xfa, 0x5c, 0x8c, 0xb9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xdc, 0x46,
+	0x8a, 0x7a, 0x78, 0x4c, 0x2b, 0x2e, 0x4d, 0xd2, 0xf3, 0x0d, 0x62, 0xcc, 0x75, 0xf2, 0x8e, 0xf2,
+	0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc,
+	0x4b, 0xd7, 0x07, 0x6b, 0x4b, 0x2a, 0x4d, 0x83, 0x30, 0x92, 0x75, 0xd3, 0x53, 0xf3, 0x74, 0xd3,
+	0xf3, 0xf5, 0x41, 0xe6, 0xa4, 0x24, 0x96, 0x24, 0xea, 0xe3, 0xf0, 0x0f, 0x20, 0x00, 0x00, 0xff,
+	0xff, 0xd8, 0x7e, 0x58, 0x1c, 0xe9, 0x00, 0x00, 0x00,
+}
diff --git a/protoc-gen-go/testdata/import_public/importing/importing.proto b/protoc-gen-go/testdata/import_public/importing/importing.proto
new file mode 100644
index 0000000..fc78f5f
--- /dev/null
+++ b/protoc-gen-go/testdata/import_public/importing/importing.proto
@@ -0,0 +1,43 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2018 The Go Authors.  All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto2";
+
+package goproto.test.import_public.importing;
+
+option go_package = "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/importing";
+
+import "import_public/a.proto";
+
+message M {
+  // Message type defined in a file publicly imported by a file we import.
+  optional goproto.test.import_public.sub.M m = 1;
+}
diff --git a/protoc-gen-go/testdata/import_public/sub/a.pb.go b/protoc-gen-go/testdata/import_public/sub/a.pb.go
index be667c9..6f81567 100644
--- a/protoc-gen-go/testdata/import_public/sub/a.pb.go
+++ b/protoc-gen-go/testdata/import_public/sub/a.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: import_public/sub/a.proto
 
-package sub // import "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub"
+package sub
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type E int32
 
@@ -27,39 +29,137 @@
 var E_name = map[int32]string{
 	0: "ZERO",
 }
+
 var E_value = map[string]int32{
 	"ZERO": 0,
 }
 
+func (x E) Enum() *E {
+	p := new(E)
+	*p = x
+	return p
+}
+
 func (x E) String() string {
 	return proto.EnumName(E_name, int32(x))
 }
+
+func (x *E) UnmarshalJSON(data []byte) error {
+	value, err := proto.UnmarshalJSONEnum(E_value, data, "E")
+	if err != nil {
+		return err
+	}
+	*x = E(value)
+	return nil
+}
+
 func (E) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_a_91ca0264a534463a, []int{0}
+	return fileDescriptor_382f7805394b5c4e, []int{0}
+}
+
+type M_Subenum int32
+
+const (
+	M_M_ZERO M_Subenum = 0
+)
+
+var M_Subenum_name = map[int32]string{
+	0: "M_ZERO",
+}
+
+var M_Subenum_value = map[string]int32{
+	"M_ZERO": 0,
+}
+
+func (x M_Subenum) Enum() *M_Subenum {
+	p := new(M_Subenum)
+	*p = x
+	return p
+}
+
+func (x M_Subenum) String() string {
+	return proto.EnumName(M_Subenum_name, int32(x))
+}
+
+func (x *M_Subenum) UnmarshalJSON(data []byte) error {
+	value, err := proto.UnmarshalJSONEnum(M_Subenum_value, data, "M_Subenum")
+	if err != nil {
+		return err
+	}
+	*x = M_Subenum(value)
+	return nil
+}
+
+func (M_Subenum) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_382f7805394b5c4e, []int{0, 0}
+}
+
+type M_Submessage_Submessage_Subenum int32
+
+const (
+	M_Submessage_M_SUBMESSAGE_ZERO M_Submessage_Submessage_Subenum = 0
+)
+
+var M_Submessage_Submessage_Subenum_name = map[int32]string{
+	0: "M_SUBMESSAGE_ZERO",
+}
+
+var M_Submessage_Submessage_Subenum_value = map[string]int32{
+	"M_SUBMESSAGE_ZERO": 0,
+}
+
+func (x M_Submessage_Submessage_Subenum) Enum() *M_Submessage_Submessage_Subenum {
+	p := new(M_Submessage_Submessage_Subenum)
+	*p = x
+	return p
+}
+
+func (x M_Submessage_Submessage_Subenum) String() string {
+	return proto.EnumName(M_Submessage_Submessage_Subenum_name, int32(x))
+}
+
+func (x *M_Submessage_Submessage_Subenum) UnmarshalJSON(data []byte) error {
+	value, err := proto.UnmarshalJSONEnum(M_Submessage_Submessage_Subenum_value, data, "M_Submessage_Submessage_Subenum")
+	if err != nil {
+		return err
+	}
+	*x = M_Submessage_Submessage_Subenum(value)
+	return nil
+}
+
+func (M_Submessage_Submessage_Subenum) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_382f7805394b5c4e, []int{0, 1, 0}
 }
 
 type M struct {
 	// Field using a type in the same Go package, but a different source file.
-	M2                   *M2      `protobuf:"bytes,1,opt,name=m2,proto3" json:"m2,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	M2 *M2 `protobuf:"bytes,1,opt,name=m2" json:"m2,omitempty"`
+	// Types that are valid to be assigned to OneofField:
+	//	*M_OneofInt32
+	//	*M_OneofInt64
+	OneofField           isM_OneofField `protobuf_oneof:"oneof_field"`
+	Grouping             *M_Grouping    `protobuf:"group,4,opt,name=Grouping,json=grouping" json:"grouping,omitempty"`
+	DefaultField         *string        `protobuf:"bytes,6,opt,name=default_field,json=defaultField,def=def" json:"default_field,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
+	XXX_unrecognized     []byte         `json:"-"`
+	XXX_sizecache        int32          `json:"-"`
 }
 
 func (m *M) Reset()         { *m = M{} }
 func (m *M) String() string { return proto.CompactTextString(m) }
 func (*M) ProtoMessage()    {}
 func (*M) Descriptor() ([]byte, []int) {
-	return fileDescriptor_a_91ca0264a534463a, []int{0}
+	return fileDescriptor_382f7805394b5c4e, []int{0}
 }
+
 func (m *M) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_M.Unmarshal(m, b)
 }
 func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_M.Marshal(b, m, deterministic)
 }
-func (dst *M) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_M.Merge(dst, src)
+func (m *M) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_M.Merge(m, src)
 }
 func (m *M) XXX_Size() int {
 	return xxx_messageInfo_M.Size(m)
@@ -70,6 +170,8 @@
 
 var xxx_messageInfo_M proto.InternalMessageInfo
 
+const Default_M_DefaultField string = "def"
+
 func (m *M) GetM2() *M2 {
 	if m != nil {
 		return m.M2
@@ -77,24 +179,231 @@
 	return nil
 }
 
-func init() {
-	proto.RegisterType((*M)(nil), "goproto.test.import_public.sub.M")
-	proto.RegisterEnum("goproto.test.import_public.sub.E", E_name, E_value)
+type isM_OneofField interface {
+	isM_OneofField()
 }
 
-func init() { proto.RegisterFile("import_public/sub/a.proto", fileDescriptor_a_91ca0264a534463a) }
+type M_OneofInt32 struct {
+	OneofInt32 int32 `protobuf:"varint,2,opt,name=oneof_int32,json=oneofInt32,oneof"`
+}
 
-var fileDescriptor_a_91ca0264a534463a = []byte{
-	// 172 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8,
-	0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x2f, 0x2e, 0x4d, 0xd2, 0x4f, 0xd4,
-	0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x4b, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b,
-	0xf4, 0x50, 0xd4, 0xe9, 0x15, 0x97, 0x26, 0x49, 0x61, 0xd1, 0x9a, 0x04, 0xd1, 0xaa, 0x64, 0xce,
-	0xc5, 0xe8, 0x2b, 0x64, 0xc4, 0xc5, 0x94, 0x6b, 0x24, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xa4,
-	0xa4, 0x87, 0xdf, 0x30, 0x3d, 0x5f, 0xa3, 0x20, 0xa6, 0x5c, 0x23, 0x2d, 0x5e, 0x2e, 0x46, 0x57,
-	0x21, 0x0e, 0x2e, 0x96, 0x28, 0xd7, 0x20, 0x7f, 0x01, 0x06, 0x27, 0xd7, 0x28, 0xe7, 0xf4, 0xcc,
-	0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xf4, 0xfc, 0x9c, 0xc4, 0xbc, 0x74, 0x7d,
-	0xb0, 0x39, 0x49, 0xa5, 0x69, 0x10, 0x46, 0xb2, 0x6e, 0x7a, 0x6a, 0x9e, 0x6e, 0x7a, 0xbe, 0x3e,
-	0xc8, 0xe0, 0x94, 0xc4, 0x92, 0x44, 0x7d, 0x0c, 0x67, 0x25, 0xb1, 0x81, 0x55, 0x1a, 0x03, 0x02,
-	0x00, 0x00, 0xff, 0xff, 0x81, 0xcc, 0x07, 0x7d, 0xed, 0x00, 0x00, 0x00,
+type M_OneofInt64 struct {
+	OneofInt64 int64 `protobuf:"varint,3,opt,name=oneof_int64,json=oneofInt64,oneof"`
+}
+
+func (*M_OneofInt32) isM_OneofField() {}
+
+func (*M_OneofInt64) isM_OneofField() {}
+
+func (m *M) GetOneofField() isM_OneofField {
+	if m != nil {
+		return m.OneofField
+	}
+	return nil
+}
+
+func (m *M) GetOneofInt32() int32 {
+	if x, ok := m.GetOneofField().(*M_OneofInt32); ok {
+		return x.OneofInt32
+	}
+	return 0
+}
+
+func (m *M) GetOneofInt64() int64 {
+	if x, ok := m.GetOneofField().(*M_OneofInt64); ok {
+		return x.OneofInt64
+	}
+	return 0
+}
+
+func (m *M) GetGrouping() *M_Grouping {
+	if m != nil {
+		return m.Grouping
+	}
+	return nil
+}
+
+func (m *M) GetDefaultField() string {
+	if m != nil && m.DefaultField != nil {
+		return *m.DefaultField
+	}
+	return Default_M_DefaultField
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*M) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
+		(*M_OneofInt32)(nil),
+		(*M_OneofInt64)(nil),
+	}
+}
+
+type M_Grouping struct {
+	GroupField           *string  `protobuf:"bytes,5,opt,name=group_field,json=groupField" json:"group_field,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *M_Grouping) Reset()         { *m = M_Grouping{} }
+func (m *M_Grouping) String() string { return proto.CompactTextString(m) }
+func (*M_Grouping) ProtoMessage()    {}
+func (*M_Grouping) Descriptor() ([]byte, []int) {
+	return fileDescriptor_382f7805394b5c4e, []int{0, 0}
+}
+
+func (m *M_Grouping) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_M_Grouping.Unmarshal(m, b)
+}
+func (m *M_Grouping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_M_Grouping.Marshal(b, m, deterministic)
+}
+func (m *M_Grouping) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_M_Grouping.Merge(m, src)
+}
+func (m *M_Grouping) XXX_Size() int {
+	return xxx_messageInfo_M_Grouping.Size(m)
+}
+func (m *M_Grouping) XXX_DiscardUnknown() {
+	xxx_messageInfo_M_Grouping.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_M_Grouping proto.InternalMessageInfo
+
+func (m *M_Grouping) GetGroupField() string {
+	if m != nil && m.GroupField != nil {
+		return *m.GroupField
+	}
+	return ""
+}
+
+type M_Submessage struct {
+	// Types that are valid to be assigned to SubmessageOneofField:
+	//	*M_Submessage_SubmessageOneofInt32
+	//	*M_Submessage_SubmessageOneofInt64
+	SubmessageOneofField isM_Submessage_SubmessageOneofField `protobuf_oneof:"submessage_oneof_field"`
+	XXX_NoUnkeyedLiteral struct{}                            `json:"-"`
+	XXX_unrecognized     []byte                              `json:"-"`
+	XXX_sizecache        int32                               `json:"-"`
+}
+
+func (m *M_Submessage) Reset()         { *m = M_Submessage{} }
+func (m *M_Submessage) String() string { return proto.CompactTextString(m) }
+func (*M_Submessage) ProtoMessage()    {}
+func (*M_Submessage) Descriptor() ([]byte, []int) {
+	return fileDescriptor_382f7805394b5c4e, []int{0, 1}
+}
+
+func (m *M_Submessage) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_M_Submessage.Unmarshal(m, b)
+}
+func (m *M_Submessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_M_Submessage.Marshal(b, m, deterministic)
+}
+func (m *M_Submessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_M_Submessage.Merge(m, src)
+}
+func (m *M_Submessage) XXX_Size() int {
+	return xxx_messageInfo_M_Submessage.Size(m)
+}
+func (m *M_Submessage) XXX_DiscardUnknown() {
+	xxx_messageInfo_M_Submessage.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_M_Submessage proto.InternalMessageInfo
+
+type isM_Submessage_SubmessageOneofField interface {
+	isM_Submessage_SubmessageOneofField()
+}
+
+type M_Submessage_SubmessageOneofInt32 struct {
+	SubmessageOneofInt32 int32 `protobuf:"varint,1,opt,name=submessage_oneof_int32,json=submessageOneofInt32,oneof"`
+}
+
+type M_Submessage_SubmessageOneofInt64 struct {
+	SubmessageOneofInt64 int64 `protobuf:"varint,2,opt,name=submessage_oneof_int64,json=submessageOneofInt64,oneof"`
+}
+
+func (*M_Submessage_SubmessageOneofInt32) isM_Submessage_SubmessageOneofField() {}
+
+func (*M_Submessage_SubmessageOneofInt64) isM_Submessage_SubmessageOneofField() {}
+
+func (m *M_Submessage) GetSubmessageOneofField() isM_Submessage_SubmessageOneofField {
+	if m != nil {
+		return m.SubmessageOneofField
+	}
+	return nil
+}
+
+func (m *M_Submessage) GetSubmessageOneofInt32() int32 {
+	if x, ok := m.GetSubmessageOneofField().(*M_Submessage_SubmessageOneofInt32); ok {
+		return x.SubmessageOneofInt32
+	}
+	return 0
+}
+
+func (m *M_Submessage) GetSubmessageOneofInt64() int64 {
+	if x, ok := m.GetSubmessageOneofField().(*M_Submessage_SubmessageOneofInt64); ok {
+		return x.SubmessageOneofInt64
+	}
+	return 0
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*M_Submessage) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
+		(*M_Submessage_SubmessageOneofInt32)(nil),
+		(*M_Submessage_SubmessageOneofInt64)(nil),
+	}
+}
+
+var E_ExtensionField = &proto.ExtensionDesc{
+	ExtendedType:  (*M2)(nil),
+	ExtensionType: (*string)(nil),
+	Field:         1,
+	Name:          "goproto.test.import_public.sub.extension_field",
+	Tag:           "bytes,1,opt,name=extension_field",
+	Filename:      "import_public/sub/a.proto",
+}
+
+func init() {
+	proto.RegisterEnum("goproto.test.import_public.sub.E", E_name, E_value)
+	proto.RegisterEnum("goproto.test.import_public.sub.M_Subenum", M_Subenum_name, M_Subenum_value)
+	proto.RegisterEnum("goproto.test.import_public.sub.M_Submessage_Submessage_Subenum", M_Submessage_Submessage_Subenum_name, M_Submessage_Submessage_Subenum_value)
+	proto.RegisterType((*M)(nil), "goproto.test.import_public.sub.M")
+	proto.RegisterType((*M_Grouping)(nil), "goproto.test.import_public.sub.M.Grouping")
+	proto.RegisterType((*M_Submessage)(nil), "goproto.test.import_public.sub.M.Submessage")
+	proto.RegisterExtension(E_ExtensionField)
+}
+
+func init() { proto.RegisterFile("import_public/sub/a.proto", fileDescriptor_382f7805394b5c4e) }
+
+var fileDescriptor_382f7805394b5c4e = []byte{
+	// 410 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x6e, 0xd3, 0x40,
+	0x10, 0xc6, 0xbb, 0x49, 0x5a, 0xd2, 0x09, 0xe1, 0xcf, 0x8a, 0x22, 0xd3, 0x03, 0x98, 0x9c, 0xac,
+	0x56, 0x5d, 0x4b, 0x26, 0xf2, 0xa1, 0x37, 0x82, 0xdc, 0x82, 0x90, 0x55, 0xc9, 0x16, 0x97, 0x5e,
+	0x2c, 0x6f, 0xbc, 0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,
 }
diff --git a/protoc-gen-go/testdata/import_public/sub/a.proto b/protoc-gen-go/testdata/import_public/sub/a.proto
index 4494c81..8f8895b 100644
--- a/protoc-gen-go/testdata/import_public/sub/a.proto
+++ b/protoc-gen-go/testdata/import_public/sub/a.proto
@@ -29,7 +29,7 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-syntax = "proto3";
+syntax = "proto2";
 
 package goproto.test.import_public.sub;
 
@@ -39,9 +39,39 @@
 
 message M {
   // Field using a type in the same Go package, but a different source file.
-  M2 m2 = 1;
+  optional M2 m2 = 1;
+
+  oneof oneof_field {
+    int32 oneof_int32 = 2;
+    int64 oneof_int64 = 3;
+  }
+
+  optional group Grouping = 4  {
+    optional string group_field = 5;
+  }
+
+  optional string default_field = 6 [default="def"];
+
+  message Submessage {
+    enum Submessage_Subenum {
+      M_SUBMESSAGE_ZERO = 0;
+    }
+
+    oneof submessage_oneof_field {
+      int32 submessage_oneof_int32 = 1;
+      int64 submessage_oneof_int64 = 2;
+    }
+  }
+
+  enum Subenum {
+    M_ZERO = 0;
+  }
 }
 
 enum E {
   ZERO = 0;
 }
+
+extend M2 {
+  optional string extension_field = 1;
+}
diff --git a/protoc-gen-go/testdata/import_public/sub/b.pb.go b/protoc-gen-go/testdata/import_public/sub/b.pb.go
index d57a3bb..cb4ea17 100644
--- a/protoc-gen-go/testdata/import_public/sub/b.pb.go
+++ b/protoc-gen-go/testdata/import_public/sub/b.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: import_public/sub/b.proto
 
-package sub // import "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub"
+package sub
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,28 +18,38 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type M2 struct {
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	XXX_NoUnkeyedLiteral         struct{} `json:"-"`
+	proto.XXX_InternalExtensions `json:"-"`
+	XXX_unrecognized             []byte `json:"-"`
+	XXX_sizecache                int32  `json:"-"`
 }
 
 func (m *M2) Reset()         { *m = M2{} }
 func (m *M2) String() string { return proto.CompactTextString(m) }
 func (*M2) ProtoMessage()    {}
 func (*M2) Descriptor() ([]byte, []int) {
-	return fileDescriptor_b_eba25180453d86b4, []int{0}
+	return fileDescriptor_fc66afda3d7c2232, []int{0}
 }
+
+var extRange_M2 = []proto.ExtensionRange{
+	{Start: 1, End: 536870911},
+}
+
+func (*M2) ExtensionRangeArray() []proto.ExtensionRange {
+	return extRange_M2
+}
+
 func (m *M2) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_M2.Unmarshal(m, b)
 }
 func (m *M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_M2.Marshal(b, m, deterministic)
 }
-func (dst *M2) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_M2.Merge(dst, src)
+func (m *M2) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_M2.Merge(m, src)
 }
 func (m *M2) XXX_Size() int {
 	return xxx_messageInfo_M2.Size(m)
@@ -52,16 +64,17 @@
 	proto.RegisterType((*M2)(nil), "goproto.test.import_public.sub.M2")
 }
 
-func init() { proto.RegisterFile("import_public/sub/b.proto", fileDescriptor_b_eba25180453d86b4) }
+func init() { proto.RegisterFile("import_public/sub/b.proto", fileDescriptor_fc66afda3d7c2232) }
 
-var fileDescriptor_b_eba25180453d86b4 = []byte{
-	// 127 bytes of a gzipped FileDescriptorProto
+var fileDescriptor_fc66afda3d7c2232 = []byte{
+	// 132 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8,
 	0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x2f, 0x2e, 0x4d, 0xd2, 0x4f, 0xd2,
 	0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x4b, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b,
-	0xf4, 0x50, 0xd4, 0xe9, 0x15, 0x97, 0x26, 0x29, 0xb1, 0x70, 0x31, 0xf9, 0x1a, 0x39, 0xb9, 0x46,
-	0x39, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xe7, 0x24,
-	0xe6, 0xa5, 0xeb, 0x83, 0xf5, 0x25, 0x95, 0xa6, 0x41, 0x18, 0xc9, 0xba, 0xe9, 0xa9, 0x79, 0xba,
-	0xe9, 0xf9, 0xfa, 0x20, 0x83, 0x52, 0x12, 0x4b, 0x12, 0xf5, 0x31, 0x2c, 0x4d, 0x62, 0x03, 0xab,
-	0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x64, 0x42, 0xe4, 0xa8, 0x90, 0x00, 0x00, 0x00,
+	0xf4, 0x50, 0xd4, 0xe9, 0x15, 0x97, 0x26, 0x29, 0xf1, 0x71, 0x31, 0xf9, 0x1a, 0x69, 0x71, 0x70,
+	0x30, 0x0a, 0x34, 0x34, 0x34, 0x34, 0x30, 0x39, 0xb9, 0x46, 0x39, 0xa7, 0x67, 0x96, 0x64, 0x94,
+	0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xe7, 0x24, 0xe6, 0xa5, 0xeb, 0x83, 0x4d, 0x48,
+	0x2a, 0x4d, 0x83, 0x30, 0x92, 0x75, 0xd3, 0x53, 0xf3, 0x74, 0xd3, 0xf3, 0xf5, 0x41, 0x46, 0xa6,
+	0x24, 0x96, 0x24, 0xea, 0x63, 0x58, 0x0f, 0x08, 0x00, 0x00, 0xff, 0xff, 0x87, 0x44, 0x22, 0x2d,
+	0x92, 0x00, 0x00, 0x00,
 }
diff --git a/protoc-gen-go/testdata/import_public/sub/b.proto b/protoc-gen-go/testdata/import_public/sub/b.proto
index c7299e0..0b1b27c 100644
--- a/protoc-gen-go/testdata/import_public/sub/b.proto
+++ b/protoc-gen-go/testdata/import_public/sub/b.proto
@@ -29,11 +29,12 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-syntax = "proto3";
+syntax = "proto2";
 
 package goproto.test.import_public.sub;
 
 option go_package = "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub";
 
 message M2 {
+  extensions 1 to max;
 }
diff --git a/protoc-gen-go/testdata/import_public_test.go b/protoc-gen-go/testdata/import_public_test.go
index 7ef776b..e3cbc89 100644
--- a/protoc-gen-go/testdata/import_public_test.go
+++ b/protoc-gen-go/testdata/import_public_test.go
@@ -46,18 +46,18 @@
 	var _ mainpb.E = subpb.E(0)
 	_ = &mainpb.Public{
 		M: &mainpb.M{},
-		E: mainpb.E_ZERO,
+		E: mainpb.E_ZERO.Enum(),
 		Local: &mainpb.Local{
 			M: &mainpb.M{},
-			E: mainpb.E_ZERO,
+			E: mainpb.E_ZERO.Enum(),
 		},
 	}
 	_ = &mainpb.Public{
 		M: &subpb.M{},
-		E: subpb.E_ZERO,
+		E: subpb.E_ZERO.Enum(),
 		Local: &mainpb.Local{
 			M: &subpb.M{},
-			E: subpb.E_ZERO,
+			E: subpb.E_ZERO.Enum(),
 		},
 	}
 	_ = &mainpb.M{
diff --git a/protoc-gen-go/testdata/imports/fmt/m.pb.go b/protoc-gen-go/testdata/imports/fmt/m.pb.go
index ca312d6..9f774fe 100644
--- a/protoc-gen-go/testdata/imports/fmt/m.pb.go
+++ b/protoc-gen-go/testdata/imports/fmt/m.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: imports/fmt/m.proto
 
-package fmt // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/fmt"
+package fmt
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type M struct {
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -28,16 +30,17 @@
 func (m *M) String() string { return proto.CompactTextString(m) }
 func (*M) ProtoMessage()    {}
 func (*M) Descriptor() ([]byte, []int) {
-	return fileDescriptor_m_867dd34c461422b8, []int{0}
+	return fileDescriptor_72c126fcd452e392, []int{0}
 }
+
 func (m *M) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_M.Unmarshal(m, b)
 }
 func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_M.Marshal(b, m, deterministic)
 }
-func (dst *M) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_M.Merge(dst, src)
+func (m *M) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_M.Merge(m, src)
 }
 func (m *M) XXX_Size() int {
 	return xxx_messageInfo_M.Size(m)
@@ -52,9 +55,9 @@
 	proto.RegisterType((*M)(nil), "fmt.M")
 }
 
-func init() { proto.RegisterFile("imports/fmt/m.proto", fileDescriptor_m_867dd34c461422b8) }
+func init() { proto.RegisterFile("imports/fmt/m.proto", fileDescriptor_72c126fcd452e392) }
 
-var fileDescriptor_m_867dd34c461422b8 = []byte{
+var fileDescriptor_72c126fcd452e392 = []byte{
 	// 109 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xce, 0xcc, 0x2d, 0xc8,
 	0x2f, 0x2a, 0x29, 0xd6, 0x4f, 0xcb, 0x2d, 0xd1, 0xcf, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17,
diff --git a/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go b/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go
index 963f7c7..1cec006 100644
--- a/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go
+++ b/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: imports/test_a_1/m1.proto
 
-package test_a_1 // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1"
+package test_a_1
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type E1 int32
 
@@ -27,6 +29,7 @@
 var E1_name = map[int32]string{
 	0: "E1_ZERO",
 }
+
 var E1_value = map[string]int32{
 	"E1_ZERO": 0,
 }
@@ -34,8 +37,9 @@
 func (x E1) String() string {
 	return proto.EnumName(E1_name, int32(x))
 }
+
 func (E1) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_m1_56a2598431d21e61, []int{0}
+	return fileDescriptor_c1091de3fa870a14, []int{0}
 }
 
 type M1 struct {
@@ -48,16 +52,17 @@
 func (m *M1) String() string { return proto.CompactTextString(m) }
 func (*M1) ProtoMessage()    {}
 func (*M1) Descriptor() ([]byte, []int) {
-	return fileDescriptor_m1_56a2598431d21e61, []int{0}
+	return fileDescriptor_c1091de3fa870a14, []int{0}
 }
+
 func (m *M1) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_M1.Unmarshal(m, b)
 }
 func (m *M1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_M1.Marshal(b, m, deterministic)
 }
-func (dst *M1) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_M1.Merge(dst, src)
+func (m *M1) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_M1.Merge(m, src)
 }
 func (m *M1) XXX_Size() int {
 	return xxx_messageInfo_M1.Size(m)
@@ -79,16 +84,17 @@
 func (m *M1_1) String() string { return proto.CompactTextString(m) }
 func (*M1_1) ProtoMessage()    {}
 func (*M1_1) Descriptor() ([]byte, []int) {
-	return fileDescriptor_m1_56a2598431d21e61, []int{1}
+	return fileDescriptor_c1091de3fa870a14, []int{1}
 }
+
 func (m *M1_1) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_M1_1.Unmarshal(m, b)
 }
 func (m *M1_1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_M1_1.Marshal(b, m, deterministic)
 }
-func (dst *M1_1) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_M1_1.Merge(dst, src)
+func (m *M1_1) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_M1_1.Merge(m, src)
 }
 func (m *M1_1) XXX_Size() int {
 	return xxx_messageInfo_M1_1.Size(m)
@@ -107,14 +113,14 @@
 }
 
 func init() {
+	proto.RegisterEnum("test.a.E1", E1_name, E1_value)
 	proto.RegisterType((*M1)(nil), "test.a.M1")
 	proto.RegisterType((*M1_1)(nil), "test.a.M1_1")
-	proto.RegisterEnum("test.a.E1", E1_name, E1_value)
 }
 
-func init() { proto.RegisterFile("imports/test_a_1/m1.proto", fileDescriptor_m1_56a2598431d21e61) }
+func init() { proto.RegisterFile("imports/test_a_1/m1.proto", fileDescriptor_c1091de3fa870a14) }
 
-var fileDescriptor_m1_56a2598431d21e61 = []byte{
+var fileDescriptor_c1091de3fa870a14 = []byte{
 	// 165 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8,
 	0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd4, 0xcf, 0x35, 0xd4,
diff --git a/protoc-gen-go/testdata/imports/test_a_1/m2.pb.go b/protoc-gen-go/testdata/imports/test_a_1/m2.pb.go
index 1b629bf..0563d58 100644
--- a/protoc-gen-go/testdata/imports/test_a_1/m2.pb.go
+++ b/protoc-gen-go/testdata/imports/test_a_1/m2.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: imports/test_a_1/m2.proto
 
-package test_a_1 // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1"
+package test_a_1
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type M2 struct {
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -28,16 +30,17 @@
 func (m *M2) String() string { return proto.CompactTextString(m) }
 func (*M2) ProtoMessage()    {}
 func (*M2) Descriptor() ([]byte, []int) {
-	return fileDescriptor_m2_ccd6356c045a9ac3, []int{0}
+	return fileDescriptor_20cf27515c0d621c, []int{0}
 }
+
 func (m *M2) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_M2.Unmarshal(m, b)
 }
 func (m *M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_M2.Marshal(b, m, deterministic)
 }
-func (dst *M2) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_M2.Merge(dst, src)
+func (m *M2) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_M2.Merge(m, src)
 }
 func (m *M2) XXX_Size() int {
 	return xxx_messageInfo_M2.Size(m)
@@ -52,9 +55,9 @@
 	proto.RegisterType((*M2)(nil), "test.a.M2")
 }
 
-func init() { proto.RegisterFile("imports/test_a_1/m2.proto", fileDescriptor_m2_ccd6356c045a9ac3) }
+func init() { proto.RegisterFile("imports/test_a_1/m2.proto", fileDescriptor_20cf27515c0d621c) }
 
-var fileDescriptor_m2_ccd6356c045a9ac3 = []byte{
+var fileDescriptor_20cf27515c0d621c = []byte{
 	// 114 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8,
 	0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd4, 0xcf, 0x35, 0xd2,
diff --git a/protoc-gen-go/testdata/imports/test_a_2/m3.pb.go b/protoc-gen-go/testdata/imports/test_a_2/m3.pb.go
index e3895d2..cbc8430 100644
--- a/protoc-gen-go/testdata/imports/test_a_2/m3.pb.go
+++ b/protoc-gen-go/testdata/imports/test_a_2/m3.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: imports/test_a_2/m3.proto
 
-package test_a_2 // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_2"
+package test_a_2
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type M3 struct {
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -28,16 +30,17 @@
 func (m *M3) String() string { return proto.CompactTextString(m) }
 func (*M3) ProtoMessage()    {}
 func (*M3) Descriptor() ([]byte, []int) {
-	return fileDescriptor_m3_de310e87d08d4216, []int{0}
+	return fileDescriptor_ff9d8f834875c9c5, []int{0}
 }
+
 func (m *M3) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_M3.Unmarshal(m, b)
 }
 func (m *M3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_M3.Marshal(b, m, deterministic)
 }
-func (dst *M3) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_M3.Merge(dst, src)
+func (m *M3) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_M3.Merge(m, src)
 }
 func (m *M3) XXX_Size() int {
 	return xxx_messageInfo_M3.Size(m)
@@ -52,9 +55,9 @@
 	proto.RegisterType((*M3)(nil), "test.a.M3")
 }
 
-func init() { proto.RegisterFile("imports/test_a_2/m3.proto", fileDescriptor_m3_de310e87d08d4216) }
+func init() { proto.RegisterFile("imports/test_a_2/m3.proto", fileDescriptor_ff9d8f834875c9c5) }
 
-var fileDescriptor_m3_de310e87d08d4216 = []byte{
+var fileDescriptor_ff9d8f834875c9c5 = []byte{
 	// 114 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8,
 	0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd2, 0xcf, 0x35, 0xd6,
diff --git a/protoc-gen-go/testdata/imports/test_a_2/m4.pb.go b/protoc-gen-go/testdata/imports/test_a_2/m4.pb.go
index 65a3bad..2771b83 100644
--- a/protoc-gen-go/testdata/imports/test_a_2/m4.pb.go
+++ b/protoc-gen-go/testdata/imports/test_a_2/m4.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: imports/test_a_2/m4.proto
 
-package test_a_2 // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_2"
+package test_a_2
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type M4 struct {
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -28,16 +30,17 @@
 func (m *M4) String() string { return proto.CompactTextString(m) }
 func (*M4) ProtoMessage()    {}
 func (*M4) Descriptor() ([]byte, []int) {
-	return fileDescriptor_m4_da12b386229f3791, []int{0}
+	return fileDescriptor_fdd24f82f6c5a786, []int{0}
 }
+
 func (m *M4) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_M4.Unmarshal(m, b)
 }
 func (m *M4) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_M4.Marshal(b, m, deterministic)
 }
-func (dst *M4) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_M4.Merge(dst, src)
+func (m *M4) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_M4.Merge(m, src)
 }
 func (m *M4) XXX_Size() int {
 	return xxx_messageInfo_M4.Size(m)
@@ -52,9 +55,9 @@
 	proto.RegisterType((*M4)(nil), "test.a.M4")
 }
 
-func init() { proto.RegisterFile("imports/test_a_2/m4.proto", fileDescriptor_m4_da12b386229f3791) }
+func init() { proto.RegisterFile("imports/test_a_2/m4.proto", fileDescriptor_fdd24f82f6c5a786) }
 
-var fileDescriptor_m4_da12b386229f3791 = []byte{
+var fileDescriptor_fdd24f82f6c5a786 = []byte{
 	// 114 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8,
 	0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd2, 0xcf, 0x35, 0xd1,
diff --git a/protoc-gen-go/testdata/imports/test_b_1/m1.pb.go b/protoc-gen-go/testdata/imports/test_b_1/m1.pb.go
index 831f414..51592e7 100644
--- a/protoc-gen-go/testdata/imports/test_b_1/m1.pb.go
+++ b/protoc-gen-go/testdata/imports/test_b_1/m1.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: imports/test_b_1/m1.proto
 
-package beta // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_b_1"
+package beta
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type M1 struct {
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -28,16 +30,17 @@
 func (m *M1) String() string { return proto.CompactTextString(m) }
 func (*M1) ProtoMessage()    {}
 func (*M1) Descriptor() ([]byte, []int) {
-	return fileDescriptor_m1_aff127b054aec649, []int{0}
+	return fileDescriptor_7f49573d035512a8, []int{0}
 }
+
 func (m *M1) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_M1.Unmarshal(m, b)
 }
 func (m *M1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_M1.Marshal(b, m, deterministic)
 }
-func (dst *M1) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_M1.Merge(dst, src)
+func (m *M1) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_M1.Merge(m, src)
 }
 func (m *M1) XXX_Size() int {
 	return xxx_messageInfo_M1.Size(m)
@@ -52,9 +55,9 @@
 	proto.RegisterType((*M1)(nil), "test.b.part1.M1")
 }
 
-func init() { proto.RegisterFile("imports/test_b_1/m1.proto", fileDescriptor_m1_aff127b054aec649) }
+func init() { proto.RegisterFile("imports/test_b_1/m1.proto", fileDescriptor_7f49573d035512a8) }
 
-var fileDescriptor_m1_aff127b054aec649 = []byte{
+var fileDescriptor_7f49573d035512a8 = []byte{
 	// 125 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8,
 	0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8a, 0x37, 0xd4, 0xcf, 0x35, 0xd4,
diff --git a/protoc-gen-go/testdata/imports/test_b_1/m2.pb.go b/protoc-gen-go/testdata/imports/test_b_1/m2.pb.go
index bc74105..f31fb0d 100644
--- a/protoc-gen-go/testdata/imports/test_b_1/m2.pb.go
+++ b/protoc-gen-go/testdata/imports/test_b_1/m2.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: imports/test_b_1/m2.proto
 
-package beta // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_b_1"
+package beta
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type M2 struct {
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -28,16 +30,17 @@
 func (m *M2) String() string { return proto.CompactTextString(m) }
 func (*M2) ProtoMessage()    {}
 func (*M2) Descriptor() ([]byte, []int) {
-	return fileDescriptor_m2_0c59cab35ba1b0d8, []int{0}
+	return fileDescriptor_a1becddceeb586f2, []int{0}
 }
+
 func (m *M2) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_M2.Unmarshal(m, b)
 }
 func (m *M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_M2.Marshal(b, m, deterministic)
 }
-func (dst *M2) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_M2.Merge(dst, src)
+func (m *M2) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_M2.Merge(m, src)
 }
 func (m *M2) XXX_Size() int {
 	return xxx_messageInfo_M2.Size(m)
@@ -52,9 +55,9 @@
 	proto.RegisterType((*M2)(nil), "test.b.part2.M2")
 }
 
-func init() { proto.RegisterFile("imports/test_b_1/m2.proto", fileDescriptor_m2_0c59cab35ba1b0d8) }
+func init() { proto.RegisterFile("imports/test_b_1/m2.proto", fileDescriptor_a1becddceeb586f2) }
 
-var fileDescriptor_m2_0c59cab35ba1b0d8 = []byte{
+var fileDescriptor_a1becddceeb586f2 = []byte{
 	// 125 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8,
 	0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8a, 0x37, 0xd4, 0xcf, 0x35, 0xd2,
diff --git a/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go b/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go
index 4f79694..1fef9ea 100644
--- a/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go
+++ b/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go
@@ -1,12 +1,14 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: imports/test_import_a1m1.proto
 
-package imports // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports"
+package imports
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -17,7 +19,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type A1M1 struct {
 	F                    *test_a_1.M1 `protobuf:"bytes,1,opt,name=f,proto3" json:"f,omitempty"`
@@ -30,16 +32,17 @@
 func (m *A1M1) String() string { return proto.CompactTextString(m) }
 func (*A1M1) ProtoMessage()    {}
 func (*A1M1) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_import_a1m1_d7f2b5c638a69f6e, []int{0}
+	return fileDescriptor_3b904a47327455f3, []int{0}
 }
+
 func (m *A1M1) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_A1M1.Unmarshal(m, b)
 }
 func (m *A1M1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_A1M1.Marshal(b, m, deterministic)
 }
-func (dst *A1M1) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_A1M1.Merge(dst, src)
+func (m *A1M1) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_A1M1.Merge(m, src)
 }
 func (m *A1M1) XXX_Size() int {
 	return xxx_messageInfo_A1M1.Size(m)
@@ -61,11 +64,9 @@
 	proto.RegisterType((*A1M1)(nil), "test.A1M1")
 }
 
-func init() {
-	proto.RegisterFile("imports/test_import_a1m1.proto", fileDescriptor_test_import_a1m1_d7f2b5c638a69f6e)
-}
+func init() { proto.RegisterFile("imports/test_import_a1m1.proto", fileDescriptor_3b904a47327455f3) }
 
-var fileDescriptor_test_import_a1m1_d7f2b5c638a69f6e = []byte{
+var fileDescriptor_3b904a47327455f3 = []byte{
 	// 149 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0xcc, 0x2d, 0xc8,
 	0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x87, 0x70, 0xe2, 0x13, 0x0d, 0x73, 0x0d,
diff --git a/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go b/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go
index f5aa2e8..13d5dd6 100644
--- a/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go
+++ b/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go
@@ -1,12 +1,14 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: imports/test_import_a1m2.proto
 
-package imports // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports"
+package imports
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -17,7 +19,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type A1M2 struct {
 	F                    *test_a_1.M2 `protobuf:"bytes,1,opt,name=f,proto3" json:"f,omitempty"`
@@ -30,16 +32,17 @@
 func (m *A1M2) String() string { return proto.CompactTextString(m) }
 func (*A1M2) ProtoMessage()    {}
 func (*A1M2) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_import_a1m2_9a3281ce9464e116, []int{0}
+	return fileDescriptor_bdb27b114687957d, []int{0}
 }
+
 func (m *A1M2) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_A1M2.Unmarshal(m, b)
 }
 func (m *A1M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_A1M2.Marshal(b, m, deterministic)
 }
-func (dst *A1M2) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_A1M2.Merge(dst, src)
+func (m *A1M2) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_A1M2.Merge(m, src)
 }
 func (m *A1M2) XXX_Size() int {
 	return xxx_messageInfo_A1M2.Size(m)
@@ -61,11 +64,9 @@
 	proto.RegisterType((*A1M2)(nil), "test.A1M2")
 }
 
-func init() {
-	proto.RegisterFile("imports/test_import_a1m2.proto", fileDescriptor_test_import_a1m2_9a3281ce9464e116)
-}
+func init() { proto.RegisterFile("imports/test_import_a1m2.proto", fileDescriptor_bdb27b114687957d) }
 
-var fileDescriptor_test_import_a1m2_9a3281ce9464e116 = []byte{
+var fileDescriptor_bdb27b114687957d = []byte{
 	// 149 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0xcc, 0x2d, 0xc8,
 	0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x87, 0x70, 0xe2, 0x13, 0x0d, 0x73, 0x8d,
diff --git a/protoc-gen-go/testdata/imports/test_import_all.pb.go b/protoc-gen-go/testdata/imports/test_import_all.pb.go
index 4f9fd04..4670517 100644
--- a/protoc-gen-go/testdata/imports/test_import_all.pb.go
+++ b/protoc-gen-go/testdata/imports/test_import_all.pb.go
@@ -1,15 +1,17 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: imports/test_import_all.proto
 
-package imports // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports"
+package imports
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import fmt1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/fmt"
-import test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1"
-import test_a_2 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_2"
-import test_b_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_b_1"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	fmt1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/fmt"
+	test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1"
+	test_a_2 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_2"
+	test_b_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_b_1"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -20,7 +22,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type All struct {
 	Am1                  *test_a_1.M1 `protobuf:"bytes,1,opt,name=am1,proto3" json:"am1,omitempty"`
@@ -39,16 +41,17 @@
 func (m *All) String() string { return proto.CompactTextString(m) }
 func (*All) ProtoMessage()    {}
 func (*All) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_import_all_b41dc4592e4a4f3b, []int{0}
+	return fileDescriptor_324466f0afc16f77, []int{0}
 }
+
 func (m *All) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_All.Unmarshal(m, b)
 }
 func (m *All) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_All.Marshal(b, m, deterministic)
 }
-func (dst *All) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_All.Merge(dst, src)
+func (m *All) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_All.Merge(m, src)
 }
 func (m *All) XXX_Size() int {
 	return xxx_messageInfo_All.Size(m)
@@ -112,11 +115,9 @@
 	proto.RegisterType((*All)(nil), "test.All")
 }
 
-func init() {
-	proto.RegisterFile("imports/test_import_all.proto", fileDescriptor_test_import_all_b41dc4592e4a4f3b)
-}
+func init() { proto.RegisterFile("imports/test_import_all.proto", fileDescriptor_324466f0afc16f77) }
 
-var fileDescriptor_test_import_all_b41dc4592e4a4f3b = []byte{
+var fileDescriptor_324466f0afc16f77 = []byte{
 	// 258 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd0, 0xb1, 0x4e, 0xc3, 0x30,
 	0x10, 0x06, 0x60, 0x15, 0x97, 0x20, 0x99, 0x05, 0x85, 0xc5, 0x20, 0x90, 0x50, 0x27, 0x96, 0xda,
diff --git a/protoc-gen-go/testdata/issue780_oneof_conflict/test.pb.go b/protoc-gen-go/testdata/issue780_oneof_conflict/test.pb.go
new file mode 100644
index 0000000..c39404e
--- /dev/null
+++ b/protoc-gen-go/testdata/issue780_oneof_conflict/test.pb.go
@@ -0,0 +1,103 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: issue780_oneof_conflict/test.proto
+
+package oneoftest
+
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+type Foo struct {
+	// Types that are valid to be assigned to Bar:
+	//	*Foo_GetBar
+	Bar                  isFoo_Bar `protobuf_oneof:"bar"`
+	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
+	XXX_unrecognized     []byte    `json:"-"`
+	XXX_sizecache        int32     `json:"-"`
+}
+
+func (m *Foo) Reset()         { *m = Foo{} }
+func (m *Foo) String() string { return proto.CompactTextString(m) }
+func (*Foo) ProtoMessage()    {}
+func (*Foo) Descriptor() ([]byte, []int) {
+	return fileDescriptor_48462cafc802a68e, []int{0}
+}
+
+func (m *Foo) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Foo.Unmarshal(m, b)
+}
+func (m *Foo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Foo.Marshal(b, m, deterministic)
+}
+func (m *Foo) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Foo.Merge(m, src)
+}
+func (m *Foo) XXX_Size() int {
+	return xxx_messageInfo_Foo.Size(m)
+}
+func (m *Foo) XXX_DiscardUnknown() {
+	xxx_messageInfo_Foo.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Foo proto.InternalMessageInfo
+
+type isFoo_Bar interface {
+	isFoo_Bar()
+}
+
+type Foo_GetBar struct {
+	GetBar string `protobuf:"bytes,1,opt,name=get_bar,json=getBar,oneof"`
+}
+
+func (*Foo_GetBar) isFoo_Bar() {}
+
+func (m *Foo) GetBar() isFoo_Bar {
+	if m != nil {
+		return m.Bar
+	}
+	return nil
+}
+
+func (m *Foo) GetGetBar() string {
+	if x, ok := m.GetBar().(*Foo_GetBar); ok {
+		return x.GetBar
+	}
+	return ""
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*Foo) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
+		(*Foo_GetBar)(nil),
+	}
+}
+
+func init() {
+	proto.RegisterType((*Foo)(nil), "oneoftest.Foo")
+}
+
+func init() { proto.RegisterFile("issue780_oneof_conflict/test.proto", fileDescriptor_48462cafc802a68e) }
+
+var fileDescriptor_48462cafc802a68e = []byte{
+	// 107 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xca, 0x2c, 0x2e, 0x2e,
+	0x4d, 0x35, 0xb7, 0x30, 0x88, 0xcf, 0xcf, 0x4b, 0xcd, 0x4f, 0x8b, 0x4f, 0xce, 0xcf, 0x4b, 0xcb,
+	0xc9, 0x4c, 0x2e, 0xd1, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2,
+	0x04, 0x4b, 0x81, 0x04, 0x94, 0xd4, 0xb9, 0x98, 0xdd, 0xf2, 0xf3, 0x85, 0x24, 0xb9, 0xd8, 0xd3,
+	0x53, 0x4b, 0xe2, 0x93, 0x12, 0x8b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x3d, 0x18, 0x82, 0xd8,
+	0xd2, 0x53, 0x4b, 0x9c, 0x12, 0x8b, 0x9c, 0x58, 0xb9, 0x98, 0x93, 0x12, 0x8b, 0x00, 0x01, 0x00,
+	0x00, 0xff, 0xff, 0x12, 0x66, 0x0c, 0x02, 0x58, 0x00, 0x00, 0x00,
+}
diff --git a/protoc-gen-go/testdata/issue780_oneof_conflict/test.proto b/protoc-gen-go/testdata/issue780_oneof_conflict/test.proto
new file mode 100644
index 0000000..07879c9
--- /dev/null
+++ b/protoc-gen-go/testdata/issue780_oneof_conflict/test.proto
@@ -0,0 +1,9 @@
+syntax = "proto2";
+
+package oneoftest;
+
+message Foo {
+	oneof bar {
+		string get_bar = 1;
+	}
+}
diff --git a/protoc-gen-go/testdata/multi/multi1.pb.go b/protoc-gen-go/testdata/multi/multi1.pb.go
index da0fdf8..6ff8dd6 100644
--- a/protoc-gen-go/testdata/multi/multi1.pb.go
+++ b/protoc-gen-go/testdata/multi/multi1.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: multi/multi1.proto
 
-package multitest // import "github.com/golang/protobuf/protoc-gen-go/testdata/multi"
+package multitest
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type Multi1 struct {
 	Multi2               *Multi2         `protobuf:"bytes,1,req,name=multi2" json:"multi2,omitempty"`
@@ -31,16 +33,17 @@
 func (m *Multi1) String() string { return proto.CompactTextString(m) }
 func (*Multi1) ProtoMessage()    {}
 func (*Multi1) Descriptor() ([]byte, []int) {
-	return fileDescriptor_multi1_08e50c6822e808b8, []int{0}
+	return fileDescriptor_e0bffc140cd1b1d9, []int{0}
 }
+
 func (m *Multi1) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Multi1.Unmarshal(m, b)
 }
 func (m *Multi1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Multi1.Marshal(b, m, deterministic)
 }
-func (dst *Multi1) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Multi1.Merge(dst, src)
+func (m *Multi1) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Multi1.Merge(m, src)
 }
 func (m *Multi1) XXX_Size() int {
 	return xxx_messageInfo_Multi1.Size(m)
@@ -76,9 +79,9 @@
 	proto.RegisterType((*Multi1)(nil), "multitest.Multi1")
 }
 
-func init() { proto.RegisterFile("multi/multi1.proto", fileDescriptor_multi1_08e50c6822e808b8) }
+func init() { proto.RegisterFile("multi/multi1.proto", fileDescriptor_e0bffc140cd1b1d9) }
 
-var fileDescriptor_multi1_08e50c6822e808b8 = []byte{
+var fileDescriptor_e0bffc140cd1b1d9 = []byte{
 	// 200 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0xcd, 0x29,
 	0xc9, 0xd4, 0x07, 0x93, 0x86, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c, 0x60, 0x5e, 0x49,
diff --git a/protoc-gen-go/testdata/multi/multi2.pb.go b/protoc-gen-go/testdata/multi/multi2.pb.go
index b66ce79..2eb07ad 100644
--- a/protoc-gen-go/testdata/multi/multi2.pb.go
+++ b/protoc-gen-go/testdata/multi/multi2.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: multi/multi2.proto
 
-package multitest // import "github.com/golang/protobuf/protoc-gen-go/testdata/multi"
+package multitest
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type Multi2_Color int32
 
@@ -31,6 +33,7 @@
 	2: "GREEN",
 	3: "RED",
 }
+
 var Multi2_Color_value = map[string]int32{
 	"BLUE":  1,
 	"GREEN": 2,
@@ -42,9 +45,11 @@
 	*p = x
 	return p
 }
+
 func (x Multi2_Color) String() string {
 	return proto.EnumName(Multi2_Color_name, int32(x))
 }
+
 func (x *Multi2_Color) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(Multi2_Color_value, data, "Multi2_Color")
 	if err != nil {
@@ -53,8 +58,9 @@
 	*x = Multi2_Color(value)
 	return nil
 }
+
 func (Multi2_Color) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_multi2_c47490ad66d93e67, []int{0, 0}
+	return fileDescriptor_a2aebe588a0b2853, []int{0, 0}
 }
 
 type Multi2 struct {
@@ -69,16 +75,17 @@
 func (m *Multi2) String() string { return proto.CompactTextString(m) }
 func (*Multi2) ProtoMessage()    {}
 func (*Multi2) Descriptor() ([]byte, []int) {
-	return fileDescriptor_multi2_c47490ad66d93e67, []int{0}
+	return fileDescriptor_a2aebe588a0b2853, []int{0}
 }
+
 func (m *Multi2) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Multi2.Unmarshal(m, b)
 }
 func (m *Multi2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Multi2.Marshal(b, m, deterministic)
 }
-func (dst *Multi2) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Multi2.Merge(dst, src)
+func (m *Multi2) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Multi2.Merge(m, src)
 }
 func (m *Multi2) XXX_Size() int {
 	return xxx_messageInfo_Multi2.Size(m)
@@ -104,13 +111,13 @@
 }
 
 func init() {
-	proto.RegisterType((*Multi2)(nil), "multitest.Multi2")
 	proto.RegisterEnum("multitest.Multi2_Color", Multi2_Color_name, Multi2_Color_value)
+	proto.RegisterType((*Multi2)(nil), "multitest.Multi2")
 }
 
-func init() { proto.RegisterFile("multi/multi2.proto", fileDescriptor_multi2_c47490ad66d93e67) }
+func init() { proto.RegisterFile("multi/multi2.proto", fileDescriptor_a2aebe588a0b2853) }
 
-var fileDescriptor_multi2_c47490ad66d93e67 = []byte{
+var fileDescriptor_a2aebe588a0b2853 = []byte{
 	// 202 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0xcd, 0x29,
 	0xc9, 0xd4, 0x07, 0x93, 0x46, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c, 0x60, 0x5e, 0x49,
diff --git a/protoc-gen-go/testdata/multi/multi3.pb.go b/protoc-gen-go/testdata/multi/multi3.pb.go
index f03c350..9fb771f 100644
--- a/protoc-gen-go/testdata/multi/multi3.pb.go
+++ b/protoc-gen-go/testdata/multi/multi3.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: multi/multi3.proto
 
-package multitest // import "github.com/golang/protobuf/protoc-gen-go/testdata/multi"
+package multitest
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type Multi3_HatType int32
 
@@ -29,6 +31,7 @@
 	1: "FEDORA",
 	2: "FEZ",
 }
+
 var Multi3_HatType_value = map[string]int32{
 	"FEDORA": 1,
 	"FEZ":    2,
@@ -39,9 +42,11 @@
 	*p = x
 	return p
 }
+
 func (x Multi3_HatType) String() string {
 	return proto.EnumName(Multi3_HatType_name, int32(x))
 }
+
 func (x *Multi3_HatType) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(Multi3_HatType_value, data, "Multi3_HatType")
 	if err != nil {
@@ -50,8 +55,9 @@
 	*x = Multi3_HatType(value)
 	return nil
 }
+
 func (Multi3_HatType) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_multi3_d55a72b4628b7875, []int{0, 0}
+	return fileDescriptor_580398fc0bbeeaa7, []int{0, 0}
 }
 
 type Multi3 struct {
@@ -65,16 +71,17 @@
 func (m *Multi3) String() string { return proto.CompactTextString(m) }
 func (*Multi3) ProtoMessage()    {}
 func (*Multi3) Descriptor() ([]byte, []int) {
-	return fileDescriptor_multi3_d55a72b4628b7875, []int{0}
+	return fileDescriptor_580398fc0bbeeaa7, []int{0}
 }
+
 func (m *Multi3) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Multi3.Unmarshal(m, b)
 }
 func (m *Multi3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Multi3.Marshal(b, m, deterministic)
 }
-func (dst *Multi3) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Multi3.Merge(dst, src)
+func (m *Multi3) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Multi3.Merge(m, src)
 }
 func (m *Multi3) XXX_Size() int {
 	return xxx_messageInfo_Multi3.Size(m)
@@ -93,13 +100,13 @@
 }
 
 func init() {
-	proto.RegisterType((*Multi3)(nil), "multitest.Multi3")
 	proto.RegisterEnum("multitest.Multi3_HatType", Multi3_HatType_name, Multi3_HatType_value)
+	proto.RegisterType((*Multi3)(nil), "multitest.Multi3")
 }
 
-func init() { proto.RegisterFile("multi/multi3.proto", fileDescriptor_multi3_d55a72b4628b7875) }
+func init() { proto.RegisterFile("multi/multi3.proto", fileDescriptor_580398fc0bbeeaa7) }
 
-var fileDescriptor_multi3_d55a72b4628b7875 = []byte{
+var fileDescriptor_580398fc0bbeeaa7 = []byte{
 	// 170 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0xcd, 0x29,
 	0xc9, 0xd4, 0x07, 0x93, 0xc6, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c, 0x60, 0x5e, 0x49,
diff --git a/protoc-gen-go/testdata/my_test/test.pb.go b/protoc-gen-go/testdata/my_test/test.pb.go
index 8cf6a69..92d456b 100644
--- a/protoc-gen-go/testdata/my_test/test.pb.go
+++ b/protoc-gen-go/testdata/my_test/test.pb.go
@@ -1,16 +1,16 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: my_test/test.proto
 
-package test // import "github.com/golang/protobuf/protoc-gen-go/testdata/my_test"
+// This package holds interesting messages.
 
-/*
-This package holds interesting messages.
-*/
+package test
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import _ "github.com/golang/protobuf/protoc-gen-go/testdata/multi"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	_ "github.com/golang/protobuf/protoc-gen-go/testdata/multi"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -21,7 +21,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type HatType int32
 
@@ -35,6 +35,7 @@
 	1: "FEDORA",
 	2: "FEZ",
 }
+
 var HatType_value = map[string]int32{
 	"FEDORA": 1,
 	"FEZ":    2,
@@ -45,9 +46,11 @@
 	*p = x
 	return p
 }
+
 func (x HatType) String() string {
 	return proto.EnumName(HatType_name, int32(x))
 }
+
 func (x *HatType) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(HatType_value, data, "HatType")
 	if err != nil {
@@ -56,8 +59,9 @@
 	*x = HatType(value)
 	return nil
 }
+
 func (HatType) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_test_2309d445eee26af7, []int{0}
+	return fileDescriptor_2c9b60a40d5131b9, []int{0}
 }
 
 // This enum represents days of the week.
@@ -74,6 +78,7 @@
 	2: "TUESDAY",
 	// Duplicate value: 1: "LUNDI",
 }
+
 var Days_value = map[string]int32{
 	"MONDAY":  1,
 	"TUESDAY": 2,
@@ -85,9 +90,11 @@
 	*p = x
 	return p
 }
+
 func (x Days) String() string {
 	return proto.EnumName(Days_name, int32(x))
 }
+
 func (x *Days) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(Days_value, data, "Days")
 	if err != nil {
@@ -96,8 +103,9 @@
 	*x = Days(value)
 	return nil
 }
+
 func (Days) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_test_2309d445eee26af7, []int{1}
+	return fileDescriptor_2c9b60a40d5131b9, []int{1}
 }
 
 type Request_Color int32
@@ -113,6 +121,7 @@
 	1: "GREEN",
 	2: "BLUE",
 }
+
 var Request_Color_value = map[string]int32{
 	"RED":   0,
 	"GREEN": 1,
@@ -124,9 +133,11 @@
 	*p = x
 	return p
 }
+
 func (x Request_Color) String() string {
 	return proto.EnumName(Request_Color_name, int32(x))
 }
+
 func (x *Request_Color) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(Request_Color_value, data, "Request_Color")
 	if err != nil {
@@ -135,8 +146,9 @@
 	*x = Request_Color(value)
 	return nil
 }
+
 func (Request_Color) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_test_2309d445eee26af7, []int{0, 0}
+	return fileDescriptor_2c9b60a40d5131b9, []int{0, 0}
 }
 
 type Reply_Entry_Game int32
@@ -150,6 +162,7 @@
 	1: "FOOTBALL",
 	2: "TENNIS",
 }
+
 var Reply_Entry_Game_value = map[string]int32{
 	"FOOTBALL": 1,
 	"TENNIS":   2,
@@ -160,9 +173,11 @@
 	*p = x
 	return p
 }
+
 func (x Reply_Entry_Game) String() string {
 	return proto.EnumName(Reply_Entry_Game_name, int32(x))
 }
+
 func (x *Reply_Entry_Game) UnmarshalJSON(data []byte) error {
 	value, err := proto.UnmarshalJSONEnum(Reply_Entry_Game_value, data, "Reply_Entry_Game")
 	if err != nil {
@@ -171,8 +186,9 @@
 	*x = Reply_Entry_Game(value)
 	return nil
 }
+
 func (Reply_Entry_Game) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_test_2309d445eee26af7, []int{1, 0, 0}
+	return fileDescriptor_2c9b60a40d5131b9, []int{1, 0, 0}
 }
 
 // This is a message that might be sent somewhere.
@@ -191,6 +207,12 @@
 	Reset_     *int32           `protobuf:"varint,12,opt,name=reset" json:"reset,omitempty"`
 	// This field should not conflict with any getters.
 	GetKey_              *string  `protobuf:"bytes,16,opt,name=get_key,json=getKey" json:"get_key,omitempty"`
+	FloatNinf            *float32 `protobuf:"fixed32,20,opt,name=float_ninf,json=floatNinf,def=-inf" json:"float_ninf,omitempty"`
+	FloatPinf            *float32 `protobuf:"fixed32,21,opt,name=float_pinf,json=floatPinf,def=inf" json:"float_pinf,omitempty"`
+	FloatExp             *float32 `protobuf:"fixed32,22,opt,name=float_exp,json=floatExp,def=1e+09" json:"float_exp,omitempty"`
+	DoubleNinf           *float64 `protobuf:"fixed64,23,opt,name=double_ninf,json=doubleNinf,def=-inf" json:"double_ninf,omitempty"`
+	DoublePinf           *float64 `protobuf:"fixed64,24,opt,name=double_pinf,json=doublePinf,def=inf" json:"double_pinf,omitempty"`
+	DoubleExp            *float64 `protobuf:"fixed64,25,opt,name=double_exp,json=doubleExp,def=1e+09" json:"double_exp,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
 	XXX_sizecache        int32    `json:"-"`
@@ -200,16 +222,17 @@
 func (m *Request) String() string { return proto.CompactTextString(m) }
 func (*Request) ProtoMessage()    {}
 func (*Request) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_2309d445eee26af7, []int{0}
+	return fileDescriptor_2c9b60a40d5131b9, []int{0}
 }
+
 func (m *Request) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Request.Unmarshal(m, b)
 }
 func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Request.Marshal(b, m, deterministic)
 }
-func (dst *Request) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Request.Merge(dst, src)
+func (m *Request) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Request.Merge(m, src)
 }
 func (m *Request) XXX_Size() int {
 	return xxx_messageInfo_Request.Size(m)
@@ -223,6 +246,15 @@
 const Default_Request_Hat HatType = HatType_FEDORA
 
 var Default_Request_Deadline float32 = float32(math.Inf(1))
+var Default_Request_FloatNinf float32 = float32(math.Inf(-1))
+var Default_Request_FloatPinf float32 = float32(math.Inf(1))
+
+const Default_Request_FloatExp float32 = 1e+09
+
+var Default_Request_DoubleNinf float64 = math.Inf(-1)
+var Default_Request_DoublePinf float64 = math.Inf(1)
+
+const Default_Request_DoubleExp float64 = 1e+09
 
 func (m *Request) GetKey() []int64 {
 	if m != nil {
@@ -287,6 +319,48 @@
 	return ""
 }
 
+func (m *Request) GetFloatNinf() float32 {
+	if m != nil && m.FloatNinf != nil {
+		return *m.FloatNinf
+	}
+	return Default_Request_FloatNinf
+}
+
+func (m *Request) GetFloatPinf() float32 {
+	if m != nil && m.FloatPinf != nil {
+		return *m.FloatPinf
+	}
+	return Default_Request_FloatPinf
+}
+
+func (m *Request) GetFloatExp() float32 {
+	if m != nil && m.FloatExp != nil {
+		return *m.FloatExp
+	}
+	return Default_Request_FloatExp
+}
+
+func (m *Request) GetDoubleNinf() float64 {
+	if m != nil && m.DoubleNinf != nil {
+		return *m.DoubleNinf
+	}
+	return Default_Request_DoubleNinf
+}
+
+func (m *Request) GetDoublePinf() float64 {
+	if m != nil && m.DoublePinf != nil {
+		return *m.DoublePinf
+	}
+	return Default_Request_DoublePinf
+}
+
+func (m *Request) GetDoubleExp() float64 {
+	if m != nil && m.DoubleExp != nil {
+		return *m.DoubleExp
+	}
+	return Default_Request_DoubleExp
+}
+
 type Request_SomeGroup struct {
 	GroupField           *int32   `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -298,16 +372,17 @@
 func (m *Request_SomeGroup) String() string { return proto.CompactTextString(m) }
 func (*Request_SomeGroup) ProtoMessage()    {}
 func (*Request_SomeGroup) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_2309d445eee26af7, []int{0, 0}
+	return fileDescriptor_2c9b60a40d5131b9, []int{0, 0}
 }
+
 func (m *Request_SomeGroup) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Request_SomeGroup.Unmarshal(m, b)
 }
 func (m *Request_SomeGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Request_SomeGroup.Marshal(b, m, deterministic)
 }
-func (dst *Request_SomeGroup) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Request_SomeGroup.Merge(dst, src)
+func (m *Request_SomeGroup) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Request_SomeGroup.Merge(m, src)
 }
 func (m *Request_SomeGroup) XXX_Size() int {
 	return xxx_messageInfo_Request_SomeGroup.Size(m)
@@ -338,7 +413,7 @@
 func (m *Reply) String() string { return proto.CompactTextString(m) }
 func (*Reply) ProtoMessage()    {}
 func (*Reply) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_2309d445eee26af7, []int{1}
+	return fileDescriptor_2c9b60a40d5131b9, []int{1}
 }
 
 var extRange_Reply = []proto.ExtensionRange{
@@ -348,14 +423,15 @@
 func (*Reply) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_Reply
 }
+
 func (m *Reply) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Reply.Unmarshal(m, b)
 }
 func (m *Reply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Reply.Marshal(b, m, deterministic)
 }
-func (dst *Reply) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Reply.Merge(dst, src)
+func (m *Reply) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Reply.Merge(m, src)
 }
 func (m *Reply) XXX_Size() int {
 	return xxx_messageInfo_Reply.Size(m)
@@ -393,16 +469,17 @@
 func (m *Reply_Entry) String() string { return proto.CompactTextString(m) }
 func (*Reply_Entry) ProtoMessage()    {}
 func (*Reply_Entry) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_2309d445eee26af7, []int{1, 0}
+	return fileDescriptor_2c9b60a40d5131b9, []int{1, 0}
 }
+
 func (m *Reply_Entry) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Reply_Entry.Unmarshal(m, b)
 }
 func (m *Reply_Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Reply_Entry.Marshal(b, m, deterministic)
 }
-func (dst *Reply_Entry) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Reply_Entry.Merge(dst, src)
+func (m *Reply_Entry) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Reply_Entry.Merge(m, src)
 }
 func (m *Reply_Entry) XXX_Size() int {
 	return xxx_messageInfo_Reply_Entry.Size(m)
@@ -448,7 +525,7 @@
 func (m *OtherBase) String() string { return proto.CompactTextString(m) }
 func (*OtherBase) ProtoMessage()    {}
 func (*OtherBase) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_2309d445eee26af7, []int{2}
+	return fileDescriptor_2c9b60a40d5131b9, []int{2}
 }
 
 var extRange_OtherBase = []proto.ExtensionRange{
@@ -458,14 +535,15 @@
 func (*OtherBase) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_OtherBase
 }
+
 func (m *OtherBase) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_OtherBase.Unmarshal(m, b)
 }
 func (m *OtherBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_OtherBase.Marshal(b, m, deterministic)
 }
-func (dst *OtherBase) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_OtherBase.Merge(dst, src)
+func (m *OtherBase) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OtherBase.Merge(m, src)
 }
 func (m *OtherBase) XXX_Size() int {
 	return xxx_messageInfo_OtherBase.Size(m)
@@ -493,16 +571,17 @@
 func (m *ReplyExtensions) String() string { return proto.CompactTextString(m) }
 func (*ReplyExtensions) ProtoMessage()    {}
 func (*ReplyExtensions) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_2309d445eee26af7, []int{3}
+	return fileDescriptor_2c9b60a40d5131b9, []int{3}
 }
+
 func (m *ReplyExtensions) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_ReplyExtensions.Unmarshal(m, b)
 }
 func (m *ReplyExtensions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_ReplyExtensions.Marshal(b, m, deterministic)
 }
-func (dst *ReplyExtensions) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ReplyExtensions.Merge(dst, src)
+func (m *ReplyExtensions) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ReplyExtensions.Merge(m, src)
 }
 func (m *ReplyExtensions) XXX_Size() int {
 	return xxx_messageInfo_ReplyExtensions.Size(m)
@@ -551,16 +630,17 @@
 func (m *OtherReplyExtensions) String() string { return proto.CompactTextString(m) }
 func (*OtherReplyExtensions) ProtoMessage()    {}
 func (*OtherReplyExtensions) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_2309d445eee26af7, []int{4}
+	return fileDescriptor_2c9b60a40d5131b9, []int{4}
 }
+
 func (m *OtherReplyExtensions) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_OtherReplyExtensions.Unmarshal(m, b)
 }
 func (m *OtherReplyExtensions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_OtherReplyExtensions.Marshal(b, m, deterministic)
 }
-func (dst *OtherReplyExtensions) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_OtherReplyExtensions.Merge(dst, src)
+func (m *OtherReplyExtensions) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OtherReplyExtensions.Merge(m, src)
 }
 func (m *OtherReplyExtensions) XXX_Size() int {
 	return xxx_messageInfo_OtherReplyExtensions.Size(m)
@@ -589,14 +669,7 @@
 func (m *OldReply) String() string { return proto.CompactTextString(m) }
 func (*OldReply) ProtoMessage()    {}
 func (*OldReply) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_2309d445eee26af7, []int{5}
-}
-
-func (m *OldReply) MarshalJSON() ([]byte, error) {
-	return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions)
-}
-func (m *OldReply) UnmarshalJSON(buf []byte) error {
-	return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)
+	return fileDescriptor_2c9b60a40d5131b9, []int{5}
 }
 
 var extRange_OldReply = []proto.ExtensionRange{
@@ -606,14 +679,15 @@
 func (*OldReply) ExtensionRangeArray() []proto.ExtensionRange {
 	return extRange_OldReply
 }
+
 func (m *OldReply) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_OldReply.Unmarshal(m, b)
 }
 func (m *OldReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_OldReply.Marshal(b, m, deterministic)
 }
-func (dst *OldReply) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_OldReply.Merge(dst, src)
+func (m *OldReply) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OldReply.Merge(m, src)
 }
 func (m *OldReply) XXX_Size() int {
 	return xxx_messageInfo_OldReply.Size(m)
@@ -649,16 +723,17 @@
 func (m *Communique) String() string { return proto.CompactTextString(m) }
 func (*Communique) ProtoMessage()    {}
 func (*Communique) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_2309d445eee26af7, []int{6}
+	return fileDescriptor_2c9b60a40d5131b9, []int{6}
 }
+
 func (m *Communique) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Communique.Unmarshal(m, b)
 }
 func (m *Communique) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Communique.Marshal(b, m, deterministic)
 }
-func (dst *Communique) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Communique.Merge(dst, src)
+func (m *Communique) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Communique.Merge(m, src)
 }
 func (m *Communique) XXX_Size() int {
 	return xxx_messageInfo_Communique.Size(m)
@@ -669,6 +744,13 @@
 
 var xxx_messageInfo_Communique proto.InternalMessageInfo
 
+func (m *Communique) GetMakeMeCry() bool {
+	if m != nil && m.MakeMeCry != nil {
+		return *m.MakeMeCry
+	}
+	return false
+}
+
 type isCommunique_Union interface {
 	isCommunique_Union()
 }
@@ -676,43 +758,61 @@
 type Communique_Number struct {
 	Number int32 `protobuf:"varint,5,opt,name=number,oneof"`
 }
+
 type Communique_Name struct {
 	Name string `protobuf:"bytes,6,opt,name=name,oneof"`
 }
+
 type Communique_Data struct {
 	Data []byte `protobuf:"bytes,7,opt,name=data,oneof"`
 }
+
 type Communique_TempC struct {
 	TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"`
 }
+
 type Communique_Height struct {
 	Height float32 `protobuf:"fixed32,9,opt,name=height,oneof"`
 }
+
 type Communique_Today struct {
 	Today Days `protobuf:"varint,10,opt,name=today,enum=my.test.Days,oneof"`
 }
+
 type Communique_Maybe struct {
 	Maybe bool `protobuf:"varint,11,opt,name=maybe,oneof"`
 }
+
 type Communique_Delta_ struct {
 	Delta int32 `protobuf:"zigzag32,12,opt,name=delta,oneof"`
 }
+
 type Communique_Msg struct {
 	Msg *Reply `protobuf:"bytes,16,opt,name=msg,oneof"`
 }
+
 type Communique_Somegroup struct {
 	Somegroup *Communique_SomeGroup `protobuf:"group,14,opt,name=SomeGroup,json=somegroup,oneof"`
 }
 
-func (*Communique_Number) isCommunique_Union()    {}
-func (*Communique_Name) isCommunique_Union()      {}
-func (*Communique_Data) isCommunique_Union()      {}
-func (*Communique_TempC) isCommunique_Union()     {}
-func (*Communique_Height) isCommunique_Union()    {}
-func (*Communique_Today) isCommunique_Union()     {}
-func (*Communique_Maybe) isCommunique_Union()     {}
-func (*Communique_Delta_) isCommunique_Union()    {}
-func (*Communique_Msg) isCommunique_Union()       {}
+func (*Communique_Number) isCommunique_Union() {}
+
+func (*Communique_Name) isCommunique_Union() {}
+
+func (*Communique_Data) isCommunique_Union() {}
+
+func (*Communique_TempC) isCommunique_Union() {}
+
+func (*Communique_Height) isCommunique_Union() {}
+
+func (*Communique_Today) isCommunique_Union() {}
+
+func (*Communique_Maybe) isCommunique_Union() {}
+
+func (*Communique_Delta_) isCommunique_Union() {}
+
+func (*Communique_Msg) isCommunique_Union() {}
+
 func (*Communique_Somegroup) isCommunique_Union() {}
 
 func (m *Communique) GetUnion() isCommunique_Union {
@@ -722,13 +822,6 @@
 	return nil
 }
 
-func (m *Communique) GetMakeMeCry() bool {
-	if m != nil && m.MakeMeCry != nil {
-		return *m.MakeMeCry
-	}
-	return false
-}
-
 func (m *Communique) GetNumber() int32 {
 	if x, ok := m.GetUnion().(*Communique_Number); ok {
 		return x.Number
@@ -799,9 +892,9 @@
 	return nil
 }
 
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
-	return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*Communique) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
 		(*Communique_Number)(nil),
 		(*Communique_Name)(nil),
 		(*Communique_Data)(nil),
@@ -815,182 +908,6 @@
 	}
 }
 
-func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
-	m := msg.(*Communique)
-	// union
-	switch x := m.Union.(type) {
-	case *Communique_Number:
-		b.EncodeVarint(5<<3 | proto.WireVarint)
-		b.EncodeVarint(uint64(x.Number))
-	case *Communique_Name:
-		b.EncodeVarint(6<<3 | proto.WireBytes)
-		b.EncodeStringBytes(x.Name)
-	case *Communique_Data:
-		b.EncodeVarint(7<<3 | proto.WireBytes)
-		b.EncodeRawBytes(x.Data)
-	case *Communique_TempC:
-		b.EncodeVarint(8<<3 | proto.WireFixed64)
-		b.EncodeFixed64(math.Float64bits(x.TempC))
-	case *Communique_Height:
-		b.EncodeVarint(9<<3 | proto.WireFixed32)
-		b.EncodeFixed32(uint64(math.Float32bits(x.Height)))
-	case *Communique_Today:
-		b.EncodeVarint(10<<3 | proto.WireVarint)
-		b.EncodeVarint(uint64(x.Today))
-	case *Communique_Maybe:
-		t := uint64(0)
-		if x.Maybe {
-			t = 1
-		}
-		b.EncodeVarint(11<<3 | proto.WireVarint)
-		b.EncodeVarint(t)
-	case *Communique_Delta_:
-		b.EncodeVarint(12<<3 | proto.WireVarint)
-		b.EncodeZigzag32(uint64(x.Delta))
-	case *Communique_Msg:
-		b.EncodeVarint(16<<3 | proto.WireBytes)
-		if err := b.EncodeMessage(x.Msg); err != nil {
-			return err
-		}
-	case *Communique_Somegroup:
-		b.EncodeVarint(14<<3 | proto.WireStartGroup)
-		if err := b.Marshal(x.Somegroup); err != nil {
-			return err
-		}
-		b.EncodeVarint(14<<3 | proto.WireEndGroup)
-	case nil:
-	default:
-		return fmt.Errorf("Communique.Union has unexpected type %T", x)
-	}
-	return nil
-}
-
-func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
-	m := msg.(*Communique)
-	switch tag {
-	case 5: // union.number
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.Union = &Communique_Number{int32(x)}
-		return true, err
-	case 6: // union.name
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeStringBytes()
-		m.Union = &Communique_Name{x}
-		return true, err
-	case 7: // union.data
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeRawBytes(true)
-		m.Union = &Communique_Data{x}
-		return true, err
-	case 8: // union.temp_c
-		if wire != proto.WireFixed64 {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeFixed64()
-		m.Union = &Communique_TempC{math.Float64frombits(x)}
-		return true, err
-	case 9: // union.height
-		if wire != proto.WireFixed32 {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeFixed32()
-		m.Union = &Communique_Height{math.Float32frombits(uint32(x))}
-		return true, err
-	case 10: // union.today
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.Union = &Communique_Today{Days(x)}
-		return true, err
-	case 11: // union.maybe
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.Union = &Communique_Maybe{x != 0}
-		return true, err
-	case 12: // union.delta
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeZigzag32()
-		m.Union = &Communique_Delta_{int32(x)}
-		return true, err
-	case 16: // union.msg
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		msg := new(Reply)
-		err := b.DecodeMessage(msg)
-		m.Union = &Communique_Msg{msg}
-		return true, err
-	case 14: // union.somegroup
-		if wire != proto.WireStartGroup {
-			return true, proto.ErrInternalBadWireType
-		}
-		msg := new(Communique_SomeGroup)
-		err := b.DecodeGroup(msg)
-		m.Union = &Communique_Somegroup{msg}
-		return true, err
-	default:
-		return false, nil
-	}
-}
-
-func _Communique_OneofSizer(msg proto.Message) (n int) {
-	m := msg.(*Communique)
-	// union
-	switch x := m.Union.(type) {
-	case *Communique_Number:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(x.Number))
-	case *Communique_Name:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.Name)))
-		n += len(x.Name)
-	case *Communique_Data:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.Data)))
-		n += len(x.Data)
-	case *Communique_TempC:
-		n += 1 // tag and wire
-		n += 8
-	case *Communique_Height:
-		n += 1 // tag and wire
-		n += 4
-	case *Communique_Today:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(x.Today))
-	case *Communique_Maybe:
-		n += 1 // tag and wire
-		n += 1
-	case *Communique_Delta_:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64((uint32(x.Delta) << 1) ^ uint32((int32(x.Delta) >> 31))))
-	case *Communique_Msg:
-		s := proto.Size(x.Msg)
-		n += 2 // tag and wire
-		n += proto.SizeVarint(uint64(s))
-		n += s
-	case *Communique_Somegroup:
-		n += 1 // tag and wire
-		n += proto.Size(x.Somegroup)
-		n += 1 // tag and wire
-	case nil:
-	default:
-		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
-	}
-	return n
-}
-
 type Communique_SomeGroup struct {
 	Member               *string  `protobuf:"bytes,15,opt,name=member" json:"member,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -1002,16 +919,17 @@
 func (m *Communique_SomeGroup) String() string { return proto.CompactTextString(m) }
 func (*Communique_SomeGroup) ProtoMessage()    {}
 func (*Communique_SomeGroup) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_2309d445eee26af7, []int{6, 0}
+	return fileDescriptor_2c9b60a40d5131b9, []int{6, 0}
 }
+
 func (m *Communique_SomeGroup) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Communique_SomeGroup.Unmarshal(m, b)
 }
 func (m *Communique_SomeGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Communique_SomeGroup.Marshal(b, m, deterministic)
 }
-func (dst *Communique_SomeGroup) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Communique_SomeGroup.Merge(dst, src)
+func (m *Communique_SomeGroup) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Communique_SomeGroup.Merge(m, src)
 }
 func (m *Communique_SomeGroup) XXX_Size() int {
 	return xxx_messageInfo_Communique_SomeGroup.Size(m)
@@ -1039,16 +957,17 @@
 func (m *Communique_Delta) String() string { return proto.CompactTextString(m) }
 func (*Communique_Delta) ProtoMessage()    {}
 func (*Communique_Delta) Descriptor() ([]byte, []int) {
-	return fileDescriptor_test_2309d445eee26af7, []int{6, 1}
+	return fileDescriptor_2c9b60a40d5131b9, []int{6, 1}
 }
+
 func (m *Communique_Delta) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Communique_Delta.Unmarshal(m, b)
 }
 func (m *Communique_Delta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Communique_Delta.Marshal(b, m, deterministic)
 }
-func (dst *Communique_Delta) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Communique_Delta.Merge(dst, src)
+func (m *Communique_Delta) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Communique_Delta.Merge(m, src)
 }
 func (m *Communique_Delta) XXX_Size() int {
 	return xxx_messageInfo_Communique_Delta.Size(m)
@@ -1078,6 +997,10 @@
 }
 
 func init() {
+	proto.RegisterEnum("my.test.HatType", HatType_name, HatType_value)
+	proto.RegisterEnum("my.test.Days", Days_name, Days_value)
+	proto.RegisterEnum("my.test.Request_Color", Request_Color_name, Request_Color_value)
+	proto.RegisterEnum("my.test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value)
 	proto.RegisterType((*Request)(nil), "my.test.Request")
 	proto.RegisterMapType((map[int64]*Reply)(nil), "my.test.Request.MsgMappingEntry")
 	proto.RegisterMapType((map[int32]string)(nil), "my.test.Request.NameMappingEntry")
@@ -1085,90 +1008,93 @@
 	proto.RegisterType((*Reply)(nil), "my.test.Reply")
 	proto.RegisterType((*Reply_Entry)(nil), "my.test.Reply.Entry")
 	proto.RegisterType((*OtherBase)(nil), "my.test.OtherBase")
+	proto.RegisterExtension(E_ReplyExtensions_Time)
+	proto.RegisterExtension(E_ReplyExtensions_Carrot)
+	proto.RegisterExtension(E_ReplyExtensions_Donut)
 	proto.RegisterType((*ReplyExtensions)(nil), "my.test.ReplyExtensions")
 	proto.RegisterType((*OtherReplyExtensions)(nil), "my.test.OtherReplyExtensions")
 	proto.RegisterType((*OldReply)(nil), "my.test.OldReply")
 	proto.RegisterType((*Communique)(nil), "my.test.Communique")
 	proto.RegisterType((*Communique_SomeGroup)(nil), "my.test.Communique.SomeGroup")
 	proto.RegisterType((*Communique_Delta)(nil), "my.test.Communique.Delta")
-	proto.RegisterEnum("my.test.HatType", HatType_name, HatType_value)
-	proto.RegisterEnum("my.test.Days", Days_name, Days_value)
-	proto.RegisterEnum("my.test.Request_Color", Request_Color_name, Request_Color_value)
-	proto.RegisterEnum("my.test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value)
-	proto.RegisterExtension(E_ReplyExtensions_Time)
-	proto.RegisterExtension(E_ReplyExtensions_Carrot)
-	proto.RegisterExtension(E_ReplyExtensions_Donut)
 	proto.RegisterExtension(E_Tag)
 	proto.RegisterExtension(E_Donut)
 }
 
-func init() { proto.RegisterFile("my_test/test.proto", fileDescriptor_test_2309d445eee26af7) }
+func init() { proto.RegisterFile("my_test/test.proto", fileDescriptor_2c9b60a40d5131b9) }
 
-var fileDescriptor_test_2309d445eee26af7 = []byte{
-	// 1033 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x55, 0xdd, 0x6e, 0xe3, 0x44,
-	0x14, 0xce, 0xd8, 0x71, 0x7e, 0x4e, 0x42, 0x6b, 0x46, 0x55, 0x6b, 0x05, 0xed, 0xd6, 0x04, 0x8a,
-	0x4c, 0xc5, 0xa6, 0xda, 0x80, 0xc4, 0x2a, 0x88, 0xd5, 0x36, 0x3f, 0x6d, 0xaa, 0x6d, 0x12, 0x69,
-	0xda, 0x5e, 0xb0, 0x37, 0xd6, 0x34, 0x9e, 0x3a, 0xa6, 0x19, 0x3b, 0x6b, 0x8f, 0x11, 0xbe, 0xeb,
-	0x53, 0xc0, 0x6b, 0x70, 0xcf, 0x0b, 0xf1, 0x16, 0x45, 0x33, 0x0e, 0x49, 0xda, 0xa0, 0xbd, 0xb1,
-	0x7c, 0xce, 0xf9, 0xce, 0xe7, 0x39, 0x3f, 0xfe, 0x06, 0x30, 0xcf, 0x5c, 0xc1, 0x12, 0x71, 0x22,
-	0x1f, 0xad, 0x45, 0x1c, 0x89, 0x08, 0x97, 0x79, 0xd6, 0x92, 0x66, 0x03, 0xf3, 0x74, 0x2e, 0x82,
-	0x13, 0xf5, 0x7c, 0x9d, 0x07, 0x9b, 0xff, 0x14, 0xa1, 0x4c, 0xd8, 0xc7, 0x94, 0x25, 0x02, 0x9b,
-	0xa0, 0xdf, 0xb3, 0xcc, 0x42, 0xb6, 0xee, 0xe8, 0x44, 0xbe, 0x62, 0x07, 0xf4, 0x59, 0xca, 0x2c,
-	0x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x85, 0x0d, 0x11, 0x6d, 0x7c, 0xb5, 0x29, 0x46, 0xfb, 0x50, 0xe2, 0x4c, 0xf5, 0x6f, 0x37,
-	0x57, 0xac, 0xdc, 0x6a, 0x94, 0xc1, 0xe8, 0xcb, 0x03, 0x75, 0xcb, 0x60, 0xa4, 0x61, 0x10, 0x85,
-	0xc7, 0x2f, 0xa1, 0xbc, 0x94, 0x7b, 0xb9, 0xe6, 0xb9, 0xe0, 0x9b, 0x48, 0x8a, 0xc2, 0xd9, 0xe0,
-	0x83, 0xa9, 0x1d, 0xb7, 0xa0, 0x28, 0x4b, 0x97, 0xc1, 0xd1, 0x64, 0xdc, 0x3f, 0xfd, 0xc5, 0x44,
-	0xb8, 0x06, 0xe5, 0xeb, 0x9b, 0xc1, 0x95, 0x34, 0x34, 0xa9, 0x1a, 0x97, 0x37, 0xe3, 0xfe, 0x85,
-	0x89, 0x1a, 0x9a, 0x89, 0x3a, 0x36, 0xe8, 0x82, 0xfa, 0x5b, 0xfb, 0xea, 0xab, 0x63, 0xc8, 0x50,
-	0xa7, 0xf7, 0xdf, 0x4a, 0x3e, 0xc7, 0xfc, 0xaa, 0xba, 0xf3, 0xe2, 0xe9, 0xa2, 0xfe, 0xff, 0x4e,
-	0x76, 0xdf, 0x7d, 0x78, 0xeb, 0x07, 0x62, 0x96, 0xde, 0xb6, 0xa6, 0x11, 0x3f, 0xf1, 0xa3, 0x39,
-	0x0d, 0xfd, 0x13, 0x75, 0x39, 0xde, 0xa6, 0x77, 0xf9, 0xcb, 0xf4, 0x95, 0xcf, 0xc2, 0x57, 0x7e,
-	0xa4, 0x6e, 0x55, 0xb9, 0x0f, 0x27, 0xcb, 0x6b, 0xf6, 0x27, 0xf9, 0xf8, 0x37, 0x00, 0x00, 0xff,
-	0xff, 0x12, 0xd5, 0x46, 0x00, 0x75, 0x07, 0x00, 0x00,
+var fileDescriptor_2c9b60a40d5131b9 = []byte{
+	// 1148 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8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 0xf3, 0xe0, 0x6e, 0xa3, 0xfe,
+	0x7b, 0x4f, 0x76, 0x5e, 0x7d, 0x78, 0x19, 0x84, 0x72, 0x9c, 0x5d, 0x36, 0x07, 0xb1, 0xd8, 0x0f,
+	0xe2, 0x09, 0x8b, 0x82, 0x7d, 0xfc, 0x03, 0xb8, 0xcc, 0x46, 0xfa, 0x63, 0xf0, 0x2c, 0xe0, 0xd1,
+	0xb3, 0x20, 0xc6, 0x5f, 0x07, 0xd5, 0x0f, 0xfb, 0xb3, 0x7f, 0x89, 0x1f, 0xd5, 0xeb, 0x9f, 0x00,
+	0x00, 0x00, 0xff, 0xff, 0x31, 0xff, 0x4e, 0x30, 0x5a, 0x08, 0x00, 0x00,
 }
diff --git a/protoc-gen-go/testdata/my_test/test.proto b/protoc-gen-go/testdata/my_test/test.proto
index 1ef3fd0..64fcdca 100644
--- a/protoc-gen-go/testdata/my_test/test.proto
+++ b/protoc-gen-go/testdata/my_test/test.proto
@@ -85,6 +85,13 @@
   optional int32 reset = 12;
   // This field should not conflict with any getters.
   optional string get_key = 16;
+
+  optional float float_ninf = 20 [default=-inf];
+  optional float float_pinf = 21 [default=inf];
+  optional float float_exp = 22 [default=1e9];
+  optional double double_ninf = 23 [default=-inf];
+  optional double double_pinf = 24 [default=inf];
+  optional double double_exp = 25 [default=1e9];
 }
 
 message Reply {
diff --git a/protoc-gen-go/testdata/proto3/proto3.pb.go b/protoc-gen-go/testdata/proto3/proto3.pb.go
index 1ad010a..a816962 100644
--- a/protoc-gen-go/testdata/proto3/proto3.pb.go
+++ b/protoc-gen-go/testdata/proto3/proto3.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: proto3/proto3.proto
 
-package proto3 // import "github.com/golang/protobuf/protoc-gen-go/testdata/proto3"
+package proto3
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type Request_Flavour int32
 
@@ -33,6 +35,7 @@
 	2: "UMAMI",
 	3: "GOPHERLICIOUS",
 }
+
 var Request_Flavour_value = map[string]int32{
 	"SWEET":         0,
 	"SOUR":          1,
@@ -43,8 +46,9 @@
 func (x Request_Flavour) String() string {
 	return proto.EnumName(Request_Flavour_name, int32(x))
 }
+
 func (Request_Flavour) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_proto3_a752e09251f17e01, []int{0, 0}
+	return fileDescriptor_ab04eb4084a521db, []int{0, 0}
 }
 
 type Request struct {
@@ -62,16 +66,17 @@
 func (m *Request) String() string { return proto.CompactTextString(m) }
 func (*Request) ProtoMessage()    {}
 func (*Request) Descriptor() ([]byte, []int) {
-	return fileDescriptor_proto3_a752e09251f17e01, []int{0}
+	return fileDescriptor_ab04eb4084a521db, []int{0}
 }
+
 func (m *Request) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Request.Unmarshal(m, b)
 }
 func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Request.Marshal(b, m, deterministic)
 }
-func (dst *Request) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Request.Merge(dst, src)
+func (m *Request) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Request.Merge(m, src)
 }
 func (m *Request) XXX_Size() int {
 	return xxx_messageInfo_Request.Size(m)
@@ -129,16 +134,17 @@
 func (m *Book) String() string { return proto.CompactTextString(m) }
 func (*Book) ProtoMessage()    {}
 func (*Book) Descriptor() ([]byte, []int) {
-	return fileDescriptor_proto3_a752e09251f17e01, []int{1}
+	return fileDescriptor_ab04eb4084a521db, []int{1}
 }
+
 func (m *Book) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Book.Unmarshal(m, b)
 }
 func (m *Book) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Book.Marshal(b, m, deterministic)
 }
-func (dst *Book) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Book.Merge(dst, src)
+func (m *Book) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Book.Merge(m, src)
 }
 func (m *Book) XXX_Size() int {
 	return xxx_messageInfo_Book.Size(m)
@@ -164,14 +170,14 @@
 }
 
 func init() {
+	proto.RegisterEnum("proto3.Request_Flavour", Request_Flavour_name, Request_Flavour_value)
 	proto.RegisterType((*Request)(nil), "proto3.Request")
 	proto.RegisterType((*Book)(nil), "proto3.Book")
-	proto.RegisterEnum("proto3.Request_Flavour", Request_Flavour_name, Request_Flavour_value)
 }
 
-func init() { proto.RegisterFile("proto3/proto3.proto", fileDescriptor_proto3_a752e09251f17e01) }
+func init() { proto.RegisterFile("proto3/proto3.proto", fileDescriptor_ab04eb4084a521db) }
 
-var fileDescriptor_proto3_a752e09251f17e01 = []byte{
+var fileDescriptor_ab04eb4084a521db = []byte{
 	// 306 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x90, 0xcf, 0x4e, 0xf2, 0x40,
 	0x14, 0xc5, 0x99, 0xfe, 0xf9, 0x80, 0xfb, 0xa1, 0x19, 0xaf, 0x26, 0x8e, 0x1b, 0x33, 0x61, 0xd5,
diff --git a/ptypes/any/any.pb.go b/ptypes/any/any.pb.go
index e3c56d3..78ee523 100644
--- a/ptypes/any/any.pb.go
+++ b/ptypes/any/any.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: google/protobuf/any.proto
 
-package any // import "github.com/golang/protobuf/ptypes/any"
+package any
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 // `Any` contains an arbitrary serialized protocol buffer message along with a
 // URL that describes the type of the serialized message.
@@ -99,17 +101,18 @@
 //     }
 //
 type Any struct {
-	// A URL/resource name whose content describes the type of the
-	// serialized protocol buffer message.
+	// A URL/resource name that uniquely identifies the type of the serialized
+	// protocol buffer message. The last segment of the URL's path must represent
+	// the fully qualified name of the type (as in
+	// `path/google.protobuf.Duration`). The name should be in a canonical form
+	// (e.g., leading "." is not accepted).
 	//
-	// For URLs which use the scheme `http`, `https`, or no scheme, the
-	// following restrictions and interpretations apply:
+	// In practice, teams usually precompile into the binary all types that they
+	// expect it to use in the context of Any. However, for URLs which use the
+	// scheme `http`, `https`, or no scheme, one can optionally set up a type
+	// server that maps type URLs to message definitions as follows:
 	//
 	// * If no scheme is provided, `https` is assumed.
-	// * The last segment of the URL's path must represent the fully
-	//   qualified name of the type (as in `path/google.protobuf.Duration`).
-	//   The name should be in a canonical form (e.g., leading "." is
-	//   not accepted).
 	// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
 	//   value in binary format, or produce an error.
 	// * Applications are allowed to cache lookup results based on the
@@ -118,6 +121,10 @@
 	//   on changes to types. (Use versioned type names to manage
 	//   breaking changes.)
 	//
+	// Note: this functionality is not currently available in the official
+	// protobuf release, and it is not used for type URLs beginning with
+	// type.googleapis.com.
+	//
 	// Schemes other than `http`, `https` (or the empty scheme) might be
 	// used with implementation specific semantics.
 	//
@@ -133,17 +140,19 @@
 func (m *Any) String() string { return proto.CompactTextString(m) }
 func (*Any) ProtoMessage()    {}
 func (*Any) Descriptor() ([]byte, []int) {
-	return fileDescriptor_any_744b9ca530f228db, []int{0}
+	return fileDescriptor_b53526c13ae22eb4, []int{0}
 }
+
 func (*Any) XXX_WellKnownType() string { return "Any" }
+
 func (m *Any) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Any.Unmarshal(m, b)
 }
 func (m *Any) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Any.Marshal(b, m, deterministic)
 }
-func (dst *Any) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Any.Merge(dst, src)
+func (m *Any) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Any.Merge(m, src)
 }
 func (m *Any) XXX_Size() int {
 	return xxx_messageInfo_Any.Size(m)
@@ -172,9 +181,9 @@
 	proto.RegisterType((*Any)(nil), "google.protobuf.Any")
 }
 
-func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor_any_744b9ca530f228db) }
+func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor_b53526c13ae22eb4) }
 
-var fileDescriptor_any_744b9ca530f228db = []byte{
+var fileDescriptor_b53526c13ae22eb4 = []byte{
 	// 185 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xcf, 0xcf, 0x4f,
 	0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0xd4,
diff --git a/ptypes/any/any.proto b/ptypes/any/any.proto
index c748667..4932942 100644
--- a/ptypes/any/any.proto
+++ b/ptypes/any/any.proto
@@ -120,17 +120,18 @@
 //     }
 //
 message Any {
-  // A URL/resource name whose content describes the type of the
-  // serialized protocol buffer message.
+  // A URL/resource name that uniquely identifies the type of the serialized
+  // protocol buffer message. The last segment of the URL's path must represent
+  // the fully qualified name of the type (as in
+  // `path/google.protobuf.Duration`). The name should be in a canonical form
+  // (e.g., leading "." is not accepted).
   //
-  // For URLs which use the scheme `http`, `https`, or no scheme, the
-  // following restrictions and interpretations apply:
+  // In practice, teams usually precompile into the binary all types that they
+  // expect it to use in the context of Any. However, for URLs which use the
+  // scheme `http`, `https`, or no scheme, one can optionally set up a type
+  // server that maps type URLs to message definitions as follows:
   //
   // * If no scheme is provided, `https` is assumed.
-  // * The last segment of the URL's path must represent the fully
-  //   qualified name of the type (as in `path/google.protobuf.Duration`).
-  //   The name should be in a canonical form (e.g., leading "." is
-  //   not accepted).
   // * An HTTP GET on the URL must yield a [google.protobuf.Type][]
   //   value in binary format, or produce an error.
   // * Applications are allowed to cache lookup results based on the
@@ -139,6 +140,10 @@
   //   on changes to types. (Use versioned type names to manage
   //   breaking changes.)
   //
+  // Note: this functionality is not currently available in the official
+  // protobuf release, and it is not used for type URLs beginning with
+  // type.googleapis.com.
+  //
   // Schemes other than `http`, `https` (or the empty scheme) might be
   // used with implementation specific semantics.
   //
diff --git a/ptypes/duration.go b/ptypes/duration.go
index 65cb0f8..26d1ca2 100644
--- a/ptypes/duration.go
+++ b/ptypes/duration.go
@@ -82,7 +82,7 @@
 		return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p)
 	}
 	if p.Nanos != 0 {
-		d += time.Duration(p.Nanos)
+		d += time.Duration(p.Nanos) * time.Nanosecond
 		if (d < 0) != (p.Nanos < 0) {
 			return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p)
 		}
diff --git a/ptypes/duration/duration.pb.go b/ptypes/duration/duration.pb.go
index a7beb2c..0d681ee 100644
--- a/ptypes/duration/duration.pb.go
+++ b/ptypes/duration/duration.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: google/protobuf/duration.proto
 
-package duration // import "github.com/golang/protobuf/ptypes/duration"
+package duration
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 // A Duration represents a signed, fixed-length span of time represented
 // as a count of seconds and fractions of seconds at nanosecond
@@ -99,17 +101,19 @@
 func (m *Duration) String() string { return proto.CompactTextString(m) }
 func (*Duration) ProtoMessage()    {}
 func (*Duration) Descriptor() ([]byte, []int) {
-	return fileDescriptor_duration_e7d612259e3f0613, []int{0}
+	return fileDescriptor_23597b2ebd7ac6c5, []int{0}
 }
+
 func (*Duration) XXX_WellKnownType() string { return "Duration" }
+
 func (m *Duration) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Duration.Unmarshal(m, b)
 }
 func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Duration.Marshal(b, m, deterministic)
 }
-func (dst *Duration) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Duration.Merge(dst, src)
+func (m *Duration) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Duration.Merge(m, src)
 }
 func (m *Duration) XXX_Size() int {
 	return xxx_messageInfo_Duration.Size(m)
@@ -138,11 +142,9 @@
 	proto.RegisterType((*Duration)(nil), "google.protobuf.Duration")
 }
 
-func init() {
-	proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor_duration_e7d612259e3f0613)
-}
+func init() { proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor_23597b2ebd7ac6c5) }
 
-var fileDescriptor_duration_e7d612259e3f0613 = []byte{
+var fileDescriptor_23597b2ebd7ac6c5 = []byte{
 	// 190 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f,
 	0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0x29, 0x2d, 0x4a,
diff --git a/ptypes/empty/empty.pb.go b/ptypes/empty/empty.pb.go
index a69b403..b4eb03e 100644
--- a/ptypes/empty/empty.pb.go
+++ b/ptypes/empty/empty.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: google/protobuf/empty.proto
 
-package empty // import "github.com/golang/protobuf/ptypes/empty"
+package empty
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 // A generic empty message that you can re-use to avoid defining duplicated
 // empty messages in your APIs. A typical example is to use it as the request
@@ -37,17 +39,19 @@
 func (m *Empty) String() string { return proto.CompactTextString(m) }
 func (*Empty) ProtoMessage()    {}
 func (*Empty) Descriptor() ([]byte, []int) {
-	return fileDescriptor_empty_39e6d6db0632e5b2, []int{0}
+	return fileDescriptor_900544acb223d5b8, []int{0}
 }
+
 func (*Empty) XXX_WellKnownType() string { return "Empty" }
+
 func (m *Empty) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Empty.Unmarshal(m, b)
 }
 func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Empty.Marshal(b, m, deterministic)
 }
-func (dst *Empty) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Empty.Merge(dst, src)
+func (m *Empty) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Empty.Merge(m, src)
 }
 func (m *Empty) XXX_Size() int {
 	return xxx_messageInfo_Empty.Size(m)
@@ -62,9 +66,9 @@
 	proto.RegisterType((*Empty)(nil), "google.protobuf.Empty")
 }
 
-func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor_empty_39e6d6db0632e5b2) }
+func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor_900544acb223d5b8) }
 
-var fileDescriptor_empty_39e6d6db0632e5b2 = []byte{
+var fileDescriptor_900544acb223d5b8 = []byte{
 	// 148 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f,
 	0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcd, 0x2d, 0x28,
diff --git a/ptypes/struct/struct.pb.go b/ptypes/struct/struct.pb.go
index 2ac3e65..33daa73 100644
--- a/ptypes/struct/struct.pb.go
+++ b/ptypes/struct/struct.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: google/protobuf/struct.proto
 
-package structpb // import "github.com/golang/protobuf/ptypes/struct"
+package structpb
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 // `NullValue` is a singleton enumeration to represent the null value for the
 // `Value` type union.
@@ -32,6 +34,7 @@
 var NullValue_name = map[int32]string{
 	0: "NULL_VALUE",
 }
+
 var NullValue_value = map[string]int32{
 	"NULL_VALUE": 0,
 }
@@ -39,9 +42,11 @@
 func (x NullValue) String() string {
 	return proto.EnumName(NullValue_name, int32(x))
 }
+
 func (NullValue) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_struct_3a5a94e0c7801b27, []int{0}
+	return fileDescriptor_df322afd6c9fb402, []int{0}
 }
+
 func (NullValue) XXX_WellKnownType() string { return "NullValue" }
 
 // `Struct` represents a structured data value, consisting of fields
@@ -64,17 +69,19 @@
 func (m *Struct) String() string { return proto.CompactTextString(m) }
 func (*Struct) ProtoMessage()    {}
 func (*Struct) Descriptor() ([]byte, []int) {
-	return fileDescriptor_struct_3a5a94e0c7801b27, []int{0}
+	return fileDescriptor_df322afd6c9fb402, []int{0}
 }
+
 func (*Struct) XXX_WellKnownType() string { return "Struct" }
+
 func (m *Struct) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Struct.Unmarshal(m, b)
 }
 func (m *Struct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Struct.Marshal(b, m, deterministic)
 }
-func (dst *Struct) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Struct.Merge(dst, src)
+func (m *Struct) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Struct.Merge(m, src)
 }
 func (m *Struct) XXX_Size() int {
 	return xxx_messageInfo_Struct.Size(m)
@@ -118,17 +125,19 @@
 func (m *Value) String() string { return proto.CompactTextString(m) }
 func (*Value) ProtoMessage()    {}
 func (*Value) Descriptor() ([]byte, []int) {
-	return fileDescriptor_struct_3a5a94e0c7801b27, []int{1}
+	return fileDescriptor_df322afd6c9fb402, []int{1}
 }
+
 func (*Value) XXX_WellKnownType() string { return "Value" }
+
 func (m *Value) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Value.Unmarshal(m, b)
 }
 func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Value.Marshal(b, m, deterministic)
 }
-func (dst *Value) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Value.Merge(dst, src)
+func (m *Value) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Value.Merge(m, src)
 }
 func (m *Value) XXX_Size() int {
 	return xxx_messageInfo_Value.Size(m)
@@ -146,28 +155,38 @@
 type Value_NullValue struct {
 	NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof"`
 }
+
 type Value_NumberValue struct {
 	NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,proto3,oneof"`
 }
+
 type Value_StringValue struct {
 	StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof"`
 }
+
 type Value_BoolValue struct {
 	BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"`
 }
+
 type Value_StructValue struct {
 	StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,proto3,oneof"`
 }
+
 type Value_ListValue struct {
 	ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,proto3,oneof"`
 }
 
-func (*Value_NullValue) isValue_Kind()   {}
+func (*Value_NullValue) isValue_Kind() {}
+
 func (*Value_NumberValue) isValue_Kind() {}
+
 func (*Value_StringValue) isValue_Kind() {}
-func (*Value_BoolValue) isValue_Kind()   {}
+
+func (*Value_BoolValue) isValue_Kind() {}
+
 func (*Value_StructValue) isValue_Kind() {}
-func (*Value_ListValue) isValue_Kind()   {}
+
+func (*Value_ListValue) isValue_Kind() {}
 
 func (m *Value) GetKind() isValue_Kind {
 	if m != nil {
@@ -218,9 +237,9 @@
 	return nil
 }
 
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*Value) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
-	return _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*Value) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
 		(*Value_NullValue)(nil),
 		(*Value_NumberValue)(nil),
 		(*Value_StringValue)(nil),
@@ -230,129 +249,6 @@
 	}
 }
 
-func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
-	m := msg.(*Value)
-	// kind
-	switch x := m.Kind.(type) {
-	case *Value_NullValue:
-		b.EncodeVarint(1<<3 | proto.WireVarint)
-		b.EncodeVarint(uint64(x.NullValue))
-	case *Value_NumberValue:
-		b.EncodeVarint(2<<3 | proto.WireFixed64)
-		b.EncodeFixed64(math.Float64bits(x.NumberValue))
-	case *Value_StringValue:
-		b.EncodeVarint(3<<3 | proto.WireBytes)
-		b.EncodeStringBytes(x.StringValue)
-	case *Value_BoolValue:
-		t := uint64(0)
-		if x.BoolValue {
-			t = 1
-		}
-		b.EncodeVarint(4<<3 | proto.WireVarint)
-		b.EncodeVarint(t)
-	case *Value_StructValue:
-		b.EncodeVarint(5<<3 | proto.WireBytes)
-		if err := b.EncodeMessage(x.StructValue); err != nil {
-			return err
-		}
-	case *Value_ListValue:
-		b.EncodeVarint(6<<3 | proto.WireBytes)
-		if err := b.EncodeMessage(x.ListValue); err != nil {
-			return err
-		}
-	case nil:
-	default:
-		return fmt.Errorf("Value.Kind has unexpected type %T", x)
-	}
-	return nil
-}
-
-func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
-	m := msg.(*Value)
-	switch tag {
-	case 1: // kind.null_value
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.Kind = &Value_NullValue{NullValue(x)}
-		return true, err
-	case 2: // kind.number_value
-		if wire != proto.WireFixed64 {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeFixed64()
-		m.Kind = &Value_NumberValue{math.Float64frombits(x)}
-		return true, err
-	case 3: // kind.string_value
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeStringBytes()
-		m.Kind = &Value_StringValue{x}
-		return true, err
-	case 4: // kind.bool_value
-		if wire != proto.WireVarint {
-			return true, proto.ErrInternalBadWireType
-		}
-		x, err := b.DecodeVarint()
-		m.Kind = &Value_BoolValue{x != 0}
-		return true, err
-	case 5: // kind.struct_value
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		msg := new(Struct)
-		err := b.DecodeMessage(msg)
-		m.Kind = &Value_StructValue{msg}
-		return true, err
-	case 6: // kind.list_value
-		if wire != proto.WireBytes {
-			return true, proto.ErrInternalBadWireType
-		}
-		msg := new(ListValue)
-		err := b.DecodeMessage(msg)
-		m.Kind = &Value_ListValue{msg}
-		return true, err
-	default:
-		return false, nil
-	}
-}
-
-func _Value_OneofSizer(msg proto.Message) (n int) {
-	m := msg.(*Value)
-	// kind
-	switch x := m.Kind.(type) {
-	case *Value_NullValue:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(x.NullValue))
-	case *Value_NumberValue:
-		n += 1 // tag and wire
-		n += 8
-	case *Value_StringValue:
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(len(x.StringValue)))
-		n += len(x.StringValue)
-	case *Value_BoolValue:
-		n += 1 // tag and wire
-		n += 1
-	case *Value_StructValue:
-		s := proto.Size(x.StructValue)
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(s))
-		n += s
-	case *Value_ListValue:
-		s := proto.Size(x.ListValue)
-		n += 1 // tag and wire
-		n += proto.SizeVarint(uint64(s))
-		n += s
-	case nil:
-	default:
-		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
-	}
-	return n
-}
-
 // `ListValue` is a wrapper around a repeated field of values.
 //
 // The JSON representation for `ListValue` is JSON array.
@@ -368,17 +264,19 @@
 func (m *ListValue) String() string { return proto.CompactTextString(m) }
 func (*ListValue) ProtoMessage()    {}
 func (*ListValue) Descriptor() ([]byte, []int) {
-	return fileDescriptor_struct_3a5a94e0c7801b27, []int{2}
+	return fileDescriptor_df322afd6c9fb402, []int{2}
 }
+
 func (*ListValue) XXX_WellKnownType() string { return "ListValue" }
+
 func (m *ListValue) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_ListValue.Unmarshal(m, b)
 }
 func (m *ListValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_ListValue.Marshal(b, m, deterministic)
 }
-func (dst *ListValue) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ListValue.Merge(dst, src)
+func (m *ListValue) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ListValue.Merge(m, src)
 }
 func (m *ListValue) XXX_Size() int {
 	return xxx_messageInfo_ListValue.Size(m)
@@ -397,18 +295,16 @@
 }
 
 func init() {
+	proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value)
 	proto.RegisterType((*Struct)(nil), "google.protobuf.Struct")
 	proto.RegisterMapType((map[string]*Value)(nil), "google.protobuf.Struct.FieldsEntry")
 	proto.RegisterType((*Value)(nil), "google.protobuf.Value")
 	proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue")
-	proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value)
 }
 
-func init() {
-	proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor_struct_3a5a94e0c7801b27)
-}
+func init() { proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor_df322afd6c9fb402) }
 
-var fileDescriptor_struct_3a5a94e0c7801b27 = []byte{
+var fileDescriptor_df322afd6c9fb402 = []byte{
 	// 417 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x41, 0x8b, 0xd3, 0x40,
 	0x14, 0xc7, 0x3b, 0xc9, 0x36, 0x98, 0x17, 0x59, 0x97, 0x11, 0xb4, 0xac, 0xa2, 0xa1, 0x7b, 0x09,
diff --git a/ptypes/timestamp.go b/ptypes/timestamp.go
index 47f10db..8da0df0 100644
--- a/ptypes/timestamp.go
+++ b/ptypes/timestamp.go
@@ -111,11 +111,9 @@
 // TimestampProto converts the time.Time to a google.protobuf.Timestamp proto.
 // It returns an error if the resulting Timestamp is invalid.
 func TimestampProto(t time.Time) (*tspb.Timestamp, error) {
-	seconds := t.Unix()
-	nanos := int32(t.Sub(time.Unix(seconds, 0)))
 	ts := &tspb.Timestamp{
-		Seconds: seconds,
-		Nanos:   nanos,
+		Seconds: t.Unix(),
+		Nanos:   int32(t.Nanosecond()),
 	}
 	if err := validateTimestamp(ts); err != nil {
 		return nil, err
diff --git a/ptypes/timestamp/timestamp.pb.go b/ptypes/timestamp/timestamp.pb.go
index 8e76ae9..31cd846 100644
--- a/ptypes/timestamp/timestamp.pb.go
+++ b/ptypes/timestamp/timestamp.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: google/protobuf/timestamp.proto
 
-package timestamp // import "github.com/golang/protobuf/ptypes/timestamp"
+package timestamp
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 // A Timestamp represents a point in time independent of any time zone
 // or calendar, represented as seconds and fractions of seconds at
@@ -81,7 +83,9 @@
 // {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
 // seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
 // are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
-// is required, though only UTC (as indicated by "Z") is presently supported.
+// is required. A proto3 JSON serializer should always use UTC (as indicated by
+// "Z") when printing the Timestamp type and a proto3 JSON parser should be
+// able to accept both UTC and other timezones (as indicated by an offset).
 //
 // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
 // 01:30 UTC on January 15, 2017.
@@ -92,8 +96,8 @@
 // to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
 // with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
 // can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
-// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--)
-// to obtain a formatter capable of generating timestamps in this format.
+// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
+// ) to obtain a formatter capable of generating timestamps in this format.
 //
 //
 type Timestamp struct {
@@ -115,17 +119,19 @@
 func (m *Timestamp) String() string { return proto.CompactTextString(m) }
 func (*Timestamp) ProtoMessage()    {}
 func (*Timestamp) Descriptor() ([]byte, []int) {
-	return fileDescriptor_timestamp_b826e8e5fba671a8, []int{0}
+	return fileDescriptor_292007bbfe81227e, []int{0}
 }
+
 func (*Timestamp) XXX_WellKnownType() string { return "Timestamp" }
+
 func (m *Timestamp) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Timestamp.Unmarshal(m, b)
 }
 func (m *Timestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Timestamp.Marshal(b, m, deterministic)
 }
-func (dst *Timestamp) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Timestamp.Merge(dst, src)
+func (m *Timestamp) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Timestamp.Merge(m, src)
 }
 func (m *Timestamp) XXX_Size() int {
 	return xxx_messageInfo_Timestamp.Size(m)
@@ -154,11 +160,9 @@
 	proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp")
 }
 
-func init() {
-	proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor_timestamp_b826e8e5fba671a8)
-}
+func init() { proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor_292007bbfe81227e) }
 
-var fileDescriptor_timestamp_b826e8e5fba671a8 = []byte{
+var fileDescriptor_292007bbfe81227e = []byte{
 	// 191 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcf, 0xcf, 0x4f,
 	0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xc9, 0xcc, 0x4d,
diff --git a/ptypes/timestamp/timestamp.proto b/ptypes/timestamp/timestamp.proto
index 06750ab..eafb3fa 100644
--- a/ptypes/timestamp/timestamp.proto
+++ b/ptypes/timestamp/timestamp.proto
@@ -103,7 +103,9 @@
 // {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
 // seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
 // are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
-// is required, though only UTC (as indicated by "Z") is presently supported.
+// is required. A proto3 JSON serializer should always use UTC (as indicated by
+// "Z") when printing the Timestamp type and a proto3 JSON parser should be
+// able to accept both UTC and other timezones (as indicated by an offset).
 //
 // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
 // 01:30 UTC on January 15, 2017.
@@ -114,8 +116,8 @@
 // to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
 // with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
 // can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
-// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--)
-// to obtain a formatter capable of generating timestamps in this format.
+// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
+// ) to obtain a formatter capable of generating timestamps in this format.
 //
 //
 message Timestamp {
diff --git a/ptypes/wrappers/wrappers.pb.go b/ptypes/wrappers/wrappers.pb.go
index 0f0fa83..add19a1 100644
--- a/ptypes/wrappers/wrappers.pb.go
+++ b/ptypes/wrappers/wrappers.pb.go
@@ -1,11 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: google/protobuf/wrappers.proto
 
-package wrappers // import "github.com/golang/protobuf/ptypes/wrappers"
+package wrappers
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -16,7 +18,7 @@
 // is compatible with the proto package it is being compiled against.
 // A compilation error at this line likely means your copy of the
 // proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 // Wrapper message for `double`.
 //
@@ -33,17 +35,19 @@
 func (m *DoubleValue) String() string { return proto.CompactTextString(m) }
 func (*DoubleValue) ProtoMessage()    {}
 func (*DoubleValue) Descriptor() ([]byte, []int) {
-	return fileDescriptor_wrappers_16c7c35c009f3253, []int{0}
+	return fileDescriptor_5377b62bda767935, []int{0}
 }
+
 func (*DoubleValue) XXX_WellKnownType() string { return "DoubleValue" }
+
 func (m *DoubleValue) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_DoubleValue.Unmarshal(m, b)
 }
 func (m *DoubleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_DoubleValue.Marshal(b, m, deterministic)
 }
-func (dst *DoubleValue) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_DoubleValue.Merge(dst, src)
+func (m *DoubleValue) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_DoubleValue.Merge(m, src)
 }
 func (m *DoubleValue) XXX_Size() int {
 	return xxx_messageInfo_DoubleValue.Size(m)
@@ -76,17 +80,19 @@
 func (m *FloatValue) String() string { return proto.CompactTextString(m) }
 func (*FloatValue) ProtoMessage()    {}
 func (*FloatValue) Descriptor() ([]byte, []int) {
-	return fileDescriptor_wrappers_16c7c35c009f3253, []int{1}
+	return fileDescriptor_5377b62bda767935, []int{1}
 }
+
 func (*FloatValue) XXX_WellKnownType() string { return "FloatValue" }
+
 func (m *FloatValue) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_FloatValue.Unmarshal(m, b)
 }
 func (m *FloatValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_FloatValue.Marshal(b, m, deterministic)
 }
-func (dst *FloatValue) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_FloatValue.Merge(dst, src)
+func (m *FloatValue) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_FloatValue.Merge(m, src)
 }
 func (m *FloatValue) XXX_Size() int {
 	return xxx_messageInfo_FloatValue.Size(m)
@@ -119,17 +125,19 @@
 func (m *Int64Value) String() string { return proto.CompactTextString(m) }
 func (*Int64Value) ProtoMessage()    {}
 func (*Int64Value) Descriptor() ([]byte, []int) {
-	return fileDescriptor_wrappers_16c7c35c009f3253, []int{2}
+	return fileDescriptor_5377b62bda767935, []int{2}
 }
+
 func (*Int64Value) XXX_WellKnownType() string { return "Int64Value" }
+
 func (m *Int64Value) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Int64Value.Unmarshal(m, b)
 }
 func (m *Int64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Int64Value.Marshal(b, m, deterministic)
 }
-func (dst *Int64Value) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Int64Value.Merge(dst, src)
+func (m *Int64Value) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Int64Value.Merge(m, src)
 }
 func (m *Int64Value) XXX_Size() int {
 	return xxx_messageInfo_Int64Value.Size(m)
@@ -162,17 +170,19 @@
 func (m *UInt64Value) String() string { return proto.CompactTextString(m) }
 func (*UInt64Value) ProtoMessage()    {}
 func (*UInt64Value) Descriptor() ([]byte, []int) {
-	return fileDescriptor_wrappers_16c7c35c009f3253, []int{3}
+	return fileDescriptor_5377b62bda767935, []int{3}
 }
+
 func (*UInt64Value) XXX_WellKnownType() string { return "UInt64Value" }
+
 func (m *UInt64Value) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_UInt64Value.Unmarshal(m, b)
 }
 func (m *UInt64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_UInt64Value.Marshal(b, m, deterministic)
 }
-func (dst *UInt64Value) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_UInt64Value.Merge(dst, src)
+func (m *UInt64Value) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_UInt64Value.Merge(m, src)
 }
 func (m *UInt64Value) XXX_Size() int {
 	return xxx_messageInfo_UInt64Value.Size(m)
@@ -205,17 +215,19 @@
 func (m *Int32Value) String() string { return proto.CompactTextString(m) }
 func (*Int32Value) ProtoMessage()    {}
 func (*Int32Value) Descriptor() ([]byte, []int) {
-	return fileDescriptor_wrappers_16c7c35c009f3253, []int{4}
+	return fileDescriptor_5377b62bda767935, []int{4}
 }
+
 func (*Int32Value) XXX_WellKnownType() string { return "Int32Value" }
+
 func (m *Int32Value) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Int32Value.Unmarshal(m, b)
 }
 func (m *Int32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Int32Value.Marshal(b, m, deterministic)
 }
-func (dst *Int32Value) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Int32Value.Merge(dst, src)
+func (m *Int32Value) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Int32Value.Merge(m, src)
 }
 func (m *Int32Value) XXX_Size() int {
 	return xxx_messageInfo_Int32Value.Size(m)
@@ -248,17 +260,19 @@
 func (m *UInt32Value) String() string { return proto.CompactTextString(m) }
 func (*UInt32Value) ProtoMessage()    {}
 func (*UInt32Value) Descriptor() ([]byte, []int) {
-	return fileDescriptor_wrappers_16c7c35c009f3253, []int{5}
+	return fileDescriptor_5377b62bda767935, []int{5}
 }
+
 func (*UInt32Value) XXX_WellKnownType() string { return "UInt32Value" }
+
 func (m *UInt32Value) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_UInt32Value.Unmarshal(m, b)
 }
 func (m *UInt32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_UInt32Value.Marshal(b, m, deterministic)
 }
-func (dst *UInt32Value) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_UInt32Value.Merge(dst, src)
+func (m *UInt32Value) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_UInt32Value.Merge(m, src)
 }
 func (m *UInt32Value) XXX_Size() int {
 	return xxx_messageInfo_UInt32Value.Size(m)
@@ -291,17 +305,19 @@
 func (m *BoolValue) String() string { return proto.CompactTextString(m) }
 func (*BoolValue) ProtoMessage()    {}
 func (*BoolValue) Descriptor() ([]byte, []int) {
-	return fileDescriptor_wrappers_16c7c35c009f3253, []int{6}
+	return fileDescriptor_5377b62bda767935, []int{6}
 }
+
 func (*BoolValue) XXX_WellKnownType() string { return "BoolValue" }
+
 func (m *BoolValue) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_BoolValue.Unmarshal(m, b)
 }
 func (m *BoolValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_BoolValue.Marshal(b, m, deterministic)
 }
-func (dst *BoolValue) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_BoolValue.Merge(dst, src)
+func (m *BoolValue) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_BoolValue.Merge(m, src)
 }
 func (m *BoolValue) XXX_Size() int {
 	return xxx_messageInfo_BoolValue.Size(m)
@@ -334,17 +350,19 @@
 func (m *StringValue) String() string { return proto.CompactTextString(m) }
 func (*StringValue) ProtoMessage()    {}
 func (*StringValue) Descriptor() ([]byte, []int) {
-	return fileDescriptor_wrappers_16c7c35c009f3253, []int{7}
+	return fileDescriptor_5377b62bda767935, []int{7}
 }
+
 func (*StringValue) XXX_WellKnownType() string { return "StringValue" }
+
 func (m *StringValue) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_StringValue.Unmarshal(m, b)
 }
 func (m *StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_StringValue.Marshal(b, m, deterministic)
 }
-func (dst *StringValue) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_StringValue.Merge(dst, src)
+func (m *StringValue) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_StringValue.Merge(m, src)
 }
 func (m *StringValue) XXX_Size() int {
 	return xxx_messageInfo_StringValue.Size(m)
@@ -377,17 +395,19 @@
 func (m *BytesValue) String() string { return proto.CompactTextString(m) }
 func (*BytesValue) ProtoMessage()    {}
 func (*BytesValue) Descriptor() ([]byte, []int) {
-	return fileDescriptor_wrappers_16c7c35c009f3253, []int{8}
+	return fileDescriptor_5377b62bda767935, []int{8}
 }
+
 func (*BytesValue) XXX_WellKnownType() string { return "BytesValue" }
+
 func (m *BytesValue) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_BytesValue.Unmarshal(m, b)
 }
 func (m *BytesValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_BytesValue.Marshal(b, m, deterministic)
 }
-func (dst *BytesValue) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_BytesValue.Merge(dst, src)
+func (m *BytesValue) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_BytesValue.Merge(m, src)
 }
 func (m *BytesValue) XXX_Size() int {
 	return xxx_messageInfo_BytesValue.Size(m)
@@ -417,11 +437,9 @@
 	proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue")
 }
 
-func init() {
-	proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor_wrappers_16c7c35c009f3253)
-}
+func init() { proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor_5377b62bda767935) }
 
-var fileDescriptor_wrappers_16c7c35c009f3253 = []byte{
+var fileDescriptor_5377b62bda767935 = []byte{
 	// 259 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f,
 	0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x2f, 0x4a, 0x2c,