Update annotation rendering in diagnostics

Disable annotation rendering in default type and descriptor renderers.
Preserve annotations in Android and Serialization plugins.
Update error texts in ide tests.
Nullability annotations in Java descriptors are rendered with context-dependent renderer.

#KT-20258 Fixed
This commit is contained in:
Pavel Kirpichenkov
2019-09-20 17:01:09 +03:00
parent 2a99687a95
commit b7e5d9faae
54 changed files with 1047 additions and 46 deletions
@@ -45,13 +45,13 @@ object SerializationPluginErrorsRendering : DefaultErrorMessages.Extension {
SerializationErrors.SERIALIZER_NOT_FOUND,
"Serializer has not been found for type ''{0}''. " +
"To use context serializer as fallback, explicitly annotate type or property with @ContextualSerialization",
Renderers.RENDER_TYPE
Renderers.RENDER_TYPE_WITH_ANNOTATIONS
)
MAP.put(
SerializationErrors.SERIALIZER_NULLABILITY_INCOMPATIBLE,
"Type ''{1}'' is non-nullable and therefore can not be serialized with serializer for nullable type ''{0}''",
Renderers.RENDER_TYPE,
Renderers.RENDER_TYPE
Renderers.RENDER_TYPE_WITH_ANNOTATIONS,
Renderers.RENDER_TYPE_WITH_ANNOTATIONS
)
MAP.put(
SerializationErrors.TRANSIENT_MISSING_INITIALIZER,