auto_route_library
auto_route_library copied to clipboard
update analyzer dependency constraints to ^2.0.0
Looks like auto_route is not compatible with the latest "analyzer" library:
Because auto_route_generator >=0.6.10 depends on analyzer >=0.40.0 <2.0.0 and json_serializable >=5.0.0 depends on analyzer ^2.0.0
Please consider update this dependency constraints, thanks.
Yes please. I am still on analyzer 1.5.0 because of the following auto route generator error:
QueryParams must be nullable or have default value
@QueryParam('location') this.location = '1',
Have to write complex json loader and dumper of class without json_serializable by now, really looking forward to this update.
On it
@Bryant-Yang @dokinkon the new flutter version still constrained to meta 1.3.0, analyzer 2.0.0 depends on meta 1.7.0. you can always override the analyzer dependency in your pubspec.
@Milad-Akarie thanks. BTW: Is it possible to make the generated router config file more clean and readable?
@Bryant-Yang could you give an example?
@Milad-Akarie I mean the generated router file imports all files as alias, it's not a big deal.
@Bryant-Yang @dokinkon the new flutter version still constrained to meta 1.3.0, analyzer 2.0.0 depends on meta 1.7.0. you can always override the analyzer dependency in your pubspec.
how can we do that?
@arafaysaleem
how can we do that?
in your pubspec file
dependency_overrides:
analyzer: 1.5.0
@arafaysaleem
how can we do that?
in your pubspec file
dependency_overrides: analyzer: 1.5.0
this throws an error regarding flutter_test
depending on meta 1.3.0
@arafaysaleem
how can we do that?
in your pubspec file
dependency_overrides: analyzer: 1.5.0
this throws an error regarding
flutter_test
depending on meta 1.3.0
dependency_overrides:
analyzer: 1.5.0
meta: 1.3.0
Same issue.
And dependency overrides
will not work in all situations. Because the analyzer has some breaking changes. I have some conflict with json_serializable
, freezed
and sealed_generator
.
@payam-zahedi do all of these packages depend on analyzer 2.0.0?
@NarHakobyan try this
dependency_overrides:
meta: 1.7.0
@Milad-Akarie thanks, but I'll be waiting for new version of auto_route, in new version of analyzer they have breaking changes, so it's not possible to use autoroute with the dependency overrides.
@NarHakobyan the latest version of FLUTTER still constrained to meta 1.3.0, I can't simply upgrade.
@Milad-Akarie what about of having an alpha branch for it and update it in separate branch? I don't know why, but freezed and json_annotation updated their libs to analizer's new version.
@NarHakobyan ya I still have no idea how they got it to work with analyzer 2.0. I must be missing something.
@Milad-Akarie this override is working for me, but autoroute gives us an error because of analyzer's breaking change (they removed one of their fields).
dependency_overrides:
analyzer: 2.0.0
meta: 1.7.0
@payam-zahedi do all of these packages depend on analyzer 2.0.0?
Yes they are.
for conflict of the meta
package, I think you should only upgrade the analyzer.
json_serialiable and freezed have kept their meta dependency on 1.3.0
version.
@NarHakobyan what field?
@payam-zahedi I'm not directly depending on meta
package, analyzer
is.
@Milad-Akarie they removed FunctionType.element and FunctionType.typeArguments. 😄
Hi @NarHakobyan, seems that I've occur the same issues with the analyzer 2.0.0, json_serializable 5.0.0 and meta 1.7.0
Trying to find a workaround for this issue while waiting any patch from @Milad-Akarie
Update: you can refer on this #648
Hello,
I think this issue can be closed.
Now the migration must be to analyzer v4.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions