Angular: [Feature request] Upgrade `source_gen` to version 0.9.0

Created on 25 Jul 2018  ·  6Comments  ·  Source: angulardart/angular

  • [x] Dart SDK : 2.0.0-dev.69.2 (Mon Jul 23 17:10:56 2018 +0200) on "windows_x64"
  • [x] AngularDart : ^5.0.0-beta+2

I'm using packages json_annotation v1.0.0 and json_serializable v1.0.0 to add JSON support to some model classes (i.e. not services, not components, just plain Dart objects). This is very convenient for instantiating the models from the JSON responses of my backend.

These packages rely on source_gen v0.9.0 but AngularDart rely on v0.8.0. So I can't install the project dependencies :

$ pub get
Resolving dependencies...
Because json_serializable >=1.0.0 depends on source_gen ^0.9.0 and angular 5.0.0-beta+2 depends on source_gen ^0.8.0, json_serializable >=1.0.0 is incompatible with angular 5.0.0-beta+2.
And because no versions of angular match >5.0.0-beta+2 <6.0.0, json_serializable >=1.0.0 is incompatible with angular ^5.0.0-beta+2.
So, because my_app depends on both angular ^5.0.0-beta+2 and json_serializable ^1.0.0, version solving failed.
♻️ chore ⚠ PRIORITY

Most helpful comment

Careful w/ the overrides. source_gen had API changes. Doing this might break things!

All 6 comments

@cedx While you wait for the AngularDart team, here's a temporary workaround that may help you at least get dependencies installed and play around with it (can't speak to whether there are breaking changes or not). Add this to your pubspec.yaml:

dependency_overrides:
  source_gen: ^0.9.0

😄

@4cm4k1 Thanks for the tip!

Careful w/ the overrides. source_gen had API changes. Doing this might break things!

This is fixed at HEAD, but we have not published yet.

Closed at HEAD. We will publish this week.

Yeah! Thanks @matanlurey

Was this page helpful?
0 / 5 - 0 ratings