rrousselGit / freezed

Code generation for immutable classes that has a simple syntax/API without compromising on the features.
https://pub.dev/packages/freezed
1.94k stars 237 forks source link

Support both analyzer versions #1090

Closed CodeDoctorDE closed 6 months ago

CodeDoctorDE commented 6 months ago

Is your feature request related to a problem? Please describe. Cannot use the latest freezed version.

Because freezed >=2.5.3 depends on analyzer ^6.5.0 which depends on meta ^1.14.0, freezed >=2.5.3 requires meta ^1.14.0.
And because every version of flutter_driver from sdk depends on meta 1.12.0, freezed >=2.5.3 is incompatible with flutter_driver from sdk.
So, because butterfly depends on both flutter_driver from sdk and freezed ^2.5.3, version solving failed.

Describe the solution you'd like Add both constraints meta: ">=1.12.0 < 1.15.0

Describe alternatives you've considered -

Additional context Neither flutter 3.19 nor the newest flutter 3.22 has the newest meta version. To support flutter really, we need to use an older meta dependency

xuegao-tzx commented 6 months ago

I also have this problem

rrousselGit commented 6 months ago

That is not feasible. The new version introduced various depreciations along with new APIs. Freezed uses those new APIs.

If you want Freezed to be compatible with older analyzer versions, use an older Freezed version.