rharter / auto-value-gson

AutoValue Extension to add Gson De/Serializer support
Apache License 2.0
607 stars 103 forks source link

Report errors eagerly for missing (applicable) AutoValue models in factory generation #194

Closed ZacSweers closed 5 years ago

ZacSweers commented 5 years ago

This resolves a couple issues around missing error reporting for two cases:

1 - No AutoValue models found 2 - AutoValue models found, but none have a static typeAdapter method

Resolves #171 Resolves #170

While reported as different issues, I'm fairly certain they're the same issue. The two tests I added would only repro #170, but that was also because some of the way the logic on master was set up, it would basically just quietly refuse to generate the factory rather than error during generation. The logic changes here to record factory counts early account for that as well