Hive: built_value codegen support

Created on 5 Jan 2021  路  4Comments  路  Source: hivedb/hive

Is your feature request related to a problem? Please describe.
I want to start using built_value from now on on my projects, and a big thing that needs adressing is hive support, as i do not want to write TypeAdapter s manually.

Describe the solution you'd like
TypeAdapter codegen being built_value aware, being able to properly read and write like regular classes. Although, full proper support with HiveLists is a whole other beast because of the mutability of the structure

Describe alternatives you've considered
Im preparing the described feature, but i wanted to know if it is an welcome addition to hive in general or if i should keep my changes local.

Version

  • Platform: iOS, Android, Mac, Windows, Linux, Web
  • Hive version: any
enhancement

Most helpful comment

Alright, my draft should support most built_value features, ill open an wip pr while i implement the remaining (EnumClass)

All 4 comments

I haven't tried built_value yet. So I don't know how does it works. We haven't planned to extend code generator library to support value builders. But any contributions are welcome if you want to add build_value support to hive. 馃榿

Alright, my draft should support most built_value features, ill open an wip pr while i implement the remaining (EnumClass)

This is great. Worked a treat with my existing BuiltValue classes.

Was this page helpful?
0 / 5 - 0 ratings