dart-archive / dart2_fix

A tool to migrate API usage to Dart 2
https://pub.dartlang.org/packages/dart2_fix
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

dart2_fix doesn't seem to support super mixins #35

Open leafpetersen opened 6 years ago

leafpetersen commented 6 years ago

Attempting to fix an external flutter package, I see:

leafp-macbookpro:particledesigner leafp$ ~/src/flutter/bin/flutter packages pub global run dart2_fix lib/
Checking lib/...

error - lib/particle_designer.dart:27 - The class 'SingleTickerProviderStateMixin' can't be used as a mixin because it extends a class other than Object

Found 1 analysis error (in 5.2s).
pub finished with exit code 1
devoncarew commented 6 years ago

I should respect any setting in the analysis options file for the project; does if have the super mixins setting enabled?

devoncarew commented 6 years ago

Hmm, but w/o an explicit analysis options file, it should pick up the setting from flutter, which does enable super mixins.

leafpetersen commented 6 years ago

Yes, this is a flutter project (spritewidget). There's no explicit .analysis_options file.

leafp-macbookpro:particledesigner leafp$ pwd
/Users/leafp/src/spritewidget/example/particledesigner
leafp-macbookpro:particledesigner leafp$ ~/src/flutter/bin/flutter packages pub global run dart2_fix --apply lib
Updating lib...

error - lib/particle_designer.dart:27 - The class 'SingleTickerProviderStateMixin' can't be used as a mixin because it extends a class other than Object

Found 1 analysis error; no changes applied (in 2.4s).
pub finished with exit code 1