k-paxian / dart-json-mapper

Serialize / Deserialize Dart Objects to / from JSON
https://pub.dev/packages/dart_json_mapper
Other
400 stars 33 forks source link

dart_json_mapper 2.2.10 depends on analyzer ^5.4.0 #222

Closed matt-hall-zory closed 6 months ago

matt-hall-zory commented 8 months ago

analyzer is currently at version 6.4.0 while dart_json_mapper depends on ^5.4.0. This has made it impossible to keep riverpod up to date (which depends on ^6.0.0). Any chance of upgrading the dependency on analyzer to at least 6.0.0?

k-paxian commented 8 months ago

Unfortunately it depends on reflectable library from Google which is not up to date with the latest analyzer. So you should probably chase the reflectable project author's

matt-hall-zory commented 8 months ago

Ah yes. There is a PR for this to be reviewed. https://github.com/google/reflectable.dart/pull/326

matt-hall-zory commented 7 months ago

Reflectable has been updated to 4.0.6 https://pub.dev/packages/reflectable

k-paxian commented 7 months ago

Awesome, thanks for letting me know. I'll try to keep up shortly

k-paxian commented 6 months ago

Should be there, let me know if anything else needed 😉

matt-hall-zory commented 6 months ago

Thanks, but I still can't resolve. Similar issue to what happened in reflectable. I use integration_test which is lagging. Because every version of integration_test from sdk depends on meta 1.11.0 and dart_json_mapper >=2.2.11 depends on meta ^1.12.0, integration_test from sdk is incompatible with dart_json_mapper >=2.2.11.

k-paxian commented 6 months ago

In such cases when version discrepancy is not critical, you could temporarily use https://dart.dev/tools/pub/dependencies#dependency-overrides

like

...
dependency_overrides:
  meta: '1.11.0'

OR you can use mapper 2.2.12+1 version where I've downgraded meta package requirement