Skip to content

Moshi code gen should warn about referencing an Enum that does not have @JsonClass to avoid R8 issues #1910

@yogurtearl

Description

@yogurtearl

When using R8 we want to keep everything that is used by code gen'd adapters, including all the value of enums referenced.

This works fine if you put @JsonClass on all the enums used in JSON, but it is easy to miss that.

I propose that Moshi code gen issue a warning or and error if any @JsonClass references an enum that is not marked with @JsonClass

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions