Open aardrop opened 2 years ago
same problem :(
Hi. I had the same issues recently, and managed to solve it by reordering the builder sequence so hive_generator will run after freezed but before json_serializable.
# build.yaml
global_options:
freezed:freezed:
runs_before:
- hive_generator:hive_generator
hive_generator:hive_generator:
runs_before:
- json_serializable:json_serializable
though I'm not sure if it'll bring another issues to the table or not.
This should be in the readme
Using freezed 2.4.3 with Hive now generates ObjectImplAdapter
instead of ObjectAdapter
in the .g.dart
file and breaks existing imports.
Breaking change in Freezed 2.4.3
This is supposed to be intended behavior, and hive is not supposed to be using the internal Impl
class as per Remi.
Importing the new ObjectImplAdapter
still works though, for now.
Steps to Reproduce We use Hive for our settings and we have it attached to a Freezed class as well. We are on the most recent version of both platforms. The freezer generator file builds without fail but the hive file does not. Actually, it only will build if I add or remove the 'abstract' keyword. Once I change the 'abstract' (either adding or removing it) it will build the generator file BUT the next time the generator runs it will remove the file again and I will have to change it again to trigger a rebuild.
``
Code sample
Version