internal/fileinit: add scary warnings about compatibility
Change-Id: I4c2f06ed5b06bf481b585ed58ed1c54647843c79
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/171466
Reviewed-by: Herbie Ong <herbie@google.com>
diff --git a/internal/fileinit/desc.go b/internal/fileinit/desc.go
index 73004d3..b53a90f 100644
--- a/internal/fileinit/desc.go
+++ b/internal/fileinit/desc.go
@@ -371,6 +371,9 @@
// IsMessageSet is a pseudo-internal API for checking whether a message
// should serialize in the proto1 message format.
+//
+// WARNING: This method is exempt from the compatibility promise and may be
+// removed in the future without warning.
func (md *messageDesc) IsMessageSet() bool {
return md.lazyInit().isMessageSet
}
@@ -483,7 +486,12 @@
// ProtoLegacyExtensionDesc is a pseudo-internal API for allowing the v1 code
// to be able to retrieve a v1 ExtensionDesc.
-func (xd *extensionDesc) ProtoLegacyExtensionDesc() *piface.ExtensionDescV1 { return xd.legacyDesc }
+//
+// WARNING: This method is exempt from the compatibility promise and may be
+// removed in the future without warning.
+func (xd *extensionDesc) ProtoLegacyExtensionDesc() *piface.ExtensionDescV1 {
+ return xd.legacyDesc
+}
type (
serviceDesc struct {