Skip to content

Analyzer fails Flutter with [error] The class ... cannot implement both 'State<...>' and 'State<StatefulWidget>' because the type arguments are different. #32421

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aam opened this issue Mar 5, 2018 · 29 comments
Labels
customer-flutter legacy-area-analyzer Use area-devexp instead. P0 A serious issue requiring immediate resolution
Milestone

Comments

@aam
Copy link
Contributor

aam commented Mar 5, 2018

Between ee15c8e and a4c69b7 analyzer seems to have implemented analysis rules that flag existing Flutter framework codebase erroneous:

╰─➤  bin/flutter analyze --flutter-repo                                                                                                                                Analyzing 1412 files...
[error] The class '_FuzzerState' cannot implement both 'State<Fuzzer>' and 'State<StatefulWidget>' because the type arguments are different. (dev/manual_tests/lib/text.dart, line 119, col 1)
[error] The class '_ZalgoState' cannot implement both 'State<Zalgo>' and 'State<StatefulWidget>' because the type arguments are different. (dev/manual_tests/lib/text.dart, line 793, col 1)
[error] The class '_PaintingState' cannot implement both 'State<Painting>' and 'State<StatefulWidget>' because the type arguments are different. (dev/manual_tests/lib/text.dart, line 900, col 1)
[error] The class '_AnimationDemoState' cannot implement both 'State<AnimationDemo>' and 'State<StatefulWidget>' because the type arguments are different. (dev/manual_tests/lib/material_arc.dart, line 419, col 1)
[error] The class 'IconSampleRowState' cannot implement both 'State<IconSampleRow>' and 'State<StatefulWidget>' because the type arguments are different. (dev/manual_tests/lib/animated_icons.dart, line 39, col 1)
[error] The class 'MyAppState' cannot implement both 'State<MyApp>' and 'State<StatefulWidget>' because the type arguments are different. (dev/integration_tests/external_ui/lib/main.dart, line 26, col 1)
[error] The class '_SpinningSquareState' cannot implement both 'State<SpinningSquare>' and 'State<StatefulWidget>' because the type arguments are different. (examples/layers/widgets/spinning_square.dart, line 12, col 1)
[error] The class '_AppBarBottomSampleState' cannot implement both 'State<AppBarBottomSample>' and 'State<StatefulWidget>' because the type arguments are different. (examples/catalog/lib/app_bar_bottom.dart, line 12, col 1)
[error] The class 'GalleryHomeState' cannot implement both 'State<GalleryHome>' and 'State<StatefulWidget>' because the type arguments are different. (examples/flutter_gallery/lib/gallery/home.dart, line 116, col 1)
[error] The class '_VideoDemoState' cannot implement both 'State<VideoDemo>' and 'State<StatefulWidget>' because the type arguments are different. (examples/flutter_gallery/lib/demo/video_demo.dart, line 355, col 1)
[error] The class '_FadeAnimationState' cannot implement both 'State<FadeAnimation>' and 'State<StatefulWidget>' because the type arguments are different. (examples/flutter_gallery/lib/demo/video_demo.dart, line 219, col 1)
[error] The class '_TabsFabDemoState' cannot implement both 'State<TabsFabDemo>' and 'State<StatefulWidget>' because the type arguments are different. (examples/flutter_gallery/lib/demo/material/tabs_fab_demo.dart, line 42, col 1)
[error] The class '_DrawerDemoState' cannot implement both 'State<DrawerDemo>' and 'State<StatefulWidget>' because the type arguments are different. (examples/flutter_gallery/lib/demo/material/drawer_demo.dart, line 19, col 1)
[error] The class 'ScrollableTabsDemoState' cannot implement both 'State<ScrollableTabsDemo>' and 'State<StatefulWidget>' because the type arguments are different. (examples/flutter_gallery/lib/demo/material/scrollable_tabs_demo.dart, line 43, col 1)
[error] The class '_BottomNavigationDemoState' cannot implement both 'State<BottomNavigationDemo>' and 'State<StatefulWidget>' because the type arguments are different. (examples/flutter_gallery/lib/demo/material/bottom_navigation_demo.dart, line 91, col 1)
[error] The class '_GridPhotoViewerState' cannot implement both 'State<GridPhotoViewer>' and 'State<StatefulWidget>' because the type arguments are different. (examples/flutter_gallery/lib/demo/material/grid_list_demo.dart, line 63, col 1)
[error] The class '_ProgressIndicatorDemoState' cannot implement both 'State<ProgressIndicatorDemo>' and 'State<StatefulWidget>' because the type arguments are different. (examples/flutter_gallery/lib/demo/material/progress_indicator_demo.dart, line 14, col 1)
[error] The class '_MyHomePageState' cannot implement both 'State<MyHomePage>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/test/material/tabbed_scrollview_warp_test.dart, line 31, col 1)
[error] The class 'TabControllerFrameState' cannot implement both 'State<TabControllerFrame>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/test/material/tabs_test.dart, line 87, col 1)
[error] The class '_BoringTickerTestState' cannot implement both 'State<BoringTickerTest>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/test/widgets/ticker_provider_test.dart, line 72, col 1)
[error] The class '_TickerWatchingWidgetState' cannot implement both 'State<_TickerWatchingWidget>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/test/widgets/animated_cross_fade_test.dart, line 373, col 1)
[error] The class '_CupertinoActivityIndicatorState' cannot implement both 'State<CupertinoActivityIndicator>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/cupertino/activity_indicator.dart, line 36, col 1)
[error] The class '_CupertinoButtonState' cannot implement both 'State<CupertinoButton>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/cupertino/button.dart, line 114, col 1)
[error] The class '_CupertinoSwitchState' cannot implement both 'State<CupertinoSwitch>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/cupertino/switch.dart, line 98, col 1)
[error] The class '_CupertinoScrollbarState' cannot implement both 'State<CupertinoScrollbar>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/cupertino/scrollbar.dart, line 54, col 1)
[error] The class '_CupertinoSliderState' cannot implement both 'State<CupertinoSlider>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/cupertino/slider.dart, line 122, col 1)
[error] The class '_OutlineButtonState' cannot implement both 'State<OutlineButton>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/outline_button.dart, line 260, col 1)
[error] The class '_CheckboxState' cannot implement both 'State<Checkbox>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/checkbox.dart, line 124, col 1)
[error] The class '_SliverAppBarState' cannot implement both 'State<SliverAppBar>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/app_bar.dart, line 922, col 1)
[error] The class '_HelperErrorState' cannot implement both 'State<_HelperError>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/input_decorator.dart, line 239, col 1)
[error] The class '_InputDecoratorState' cannot implement both 'State<InputDecorator>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/input_decorator.dart, line 1331, col 1)
[error] The class '_BorderContainerState' cannot implement both 'State<_BorderContainer>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/input_decorator.dart, line 125, col 1)
[error] The class '_TwoLevelSublistState' cannot implement both 'State<TwoLevelSublist>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/two_level_list.dart, line 149, col 1)
[error] The class '_StepperState' cannot implement both 'State<Stepper>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/stepper.dart, line 182, col 1)
[error] The class 'RefreshIndicatorState' cannot implement both 'State<RefreshIndicator>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/refresh_indicator.dart, line 134, col 1)
[error] The class '_ExpansionTileState' cannot implement both 'State<ExpansionTile>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/expansion_tile.dart, line 82, col 1)
[error] The class '_InkResponseState' cannot implement both 'State<T>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/ink_well.dart, line 387, col 1)
[error] The class '_ExpandIconState' cannot implement both 'State<ExpandIcon>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/expand_icon.dart, line 61, col 1)
[error] The class '_SortArrowState' cannot implement both 'State<_SortArrow>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/data_table.dart, line 682, col 1)
[error] The class '_TooltipState' cannot implement both 'State<Tooltip>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/tooltip.dart, line 103, col 1)
[error] The class '_SwitchState' cannot implement both 'State<Switch>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/switch.dart, line 126, col 1)
[error] The class '_MergeableMaterialState' cannot implement both 'State<MergeableMaterial>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/mergeable_material.dart, line 153, col 1)
[error] The class '_MaterialState' cannot implement both 'State<Material>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/material.dart, line 276, col 1)
[error] The class '_MaterialInteriorState' cannot implement both 'State<_MaterialInterior>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/material.dart, line 630, col 1)
[error] The class '_DefaultTabControllerState' cannot implement both 'State<DefaultTabController>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/tab_controller.dart, line 288, col 1)
[error] The class '_TextFieldState' cannot implement both 'State<TextField>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/text_field.dart, line 282, col 1)
[error] The class '_BottomNavigationBarState' cannot implement both 'State<BottomNavigationBar>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/bottom_navigation_bar.dart, line 274, col 1)
[error] The class 'DrawerControllerState' cannot implement both 'State<DrawerController>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/drawer.dart, line 158, col 1)
[error] The class '_ScrollbarState' cannot implement both 'State<Scrollbar>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/scrollbar.dart, line 55, col 1)
[error] The class '_SliderState' cannot implement both 'State<Slider>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/slider.dart, line 207, col 1)
[error] The class '_CheckedPopupMenuItemState' cannot implement both 'State<CheckedPopupMenuItem<T>>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/popup_menu.dart, line 352, col 1)
[error] The class '_AnimatedThemeState' cannot implement both 'State<AnimatedTheme>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/theme.dart, line 232, col 1)
[error] The class '_DialState' cannot implement both 'State<_Dial>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/time_picker.dart, line 1001, col 1)
[error] The class '_LinearProgressIndicatorState' cannot implement both 'State<LinearProgressIndicator>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/progress_indicator.dart, line 172, col 1)
[error] The class '_CircularProgressIndicatorState' cannot implement both 'State<CircularProgressIndicator>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/progress_indicator.dart, line 352, col 1)
[error] The class '_RefreshProgressIndicatorState' cannot implement both 'State<CircularProgressIndicator>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/progress_indicator.dart, line 502, col 1)
[error] The class 'ScaffoldState' cannot implement both 'State<Scaffold>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/scaffold.dart, line 808, col 1)
[error] The class '_FloatingActionButtonTransitionState' cannot implement both 'State<_FloatingActionButtonTransition>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/scaffold.dart, line 355, col 1)
[error] The class '_RadioState' cannot implement both 'State<Radio<T>>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/material/radio.dart, line 104, col 1)
[error] The class '_AnimatedCrossFadeState' cannot implement both 'State<AnimatedCrossFade>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/animated_cross_fade.dart, line 232, col 1)
[error] The class 'AnimatedListState' cannot implement both 'State<AnimatedList>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/animated_list.dart, line 185, col 1)
[error] The class '_AnimatedOpacityState' cannot implement both 'State<AnimatedOpacity>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/implicit_animations.dart, line 981, col 1)
[error] The class '_AnimatedDefaultTextStyleState' cannot implement both 'State<AnimatedDefaultTextStyle>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/implicit_animations.dart, line 1077, col 1)
[error] The class '_AnimatedAlignState' cannot implement both 'State<AnimatedAlign>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/implicit_animations.dart, line 618, col 1)
[error] The class '_AnimatedPositionedDirectionalState' cannot implement both 'State<AnimatedPositionedDirectional>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/implicit_animations.dart, line 859, col 1)
[error] The class 'AnimatedWidgetBaseState' cannot implement both 'State<T>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/implicit_animations.dart, line 231, col 1)
[error] The class '_AnimatedContainerState' cannot implement both 'State<AnimatedContainer>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/implicit_animations.dart, line 456, col 1)
[error] The class '_AnimatedPaddingState' cannot implement both 'State<AnimatedPadding>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/implicit_animations.dart, line 542, col 1)
[error] The class '_AnimatedPhysicalModelState' cannot implement both 'State<AnimatedPhysicalModel>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/implicit_animations.dart, line 1183, col 1)
[error] The class '_AnimatedPositionedState' cannot implement both 'State<AnimatedPositioned>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/implicit_animations.dart, line 736, col 1)
[error] The class 'NavigatorState' cannot implement both 'State<Navigator>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/navigator.dart, line 739, col 1)
[error] The class 'ScrollableState' cannot implement both 'State<Scrollable>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/scrollable.dart, line 242, col 1)
[error] The class '_FixedExtentScrollableState' cannot implement both 'State<Scrollable>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart, line 274, col 1)
[error] The class '_FadeInImageState' cannot implement both 'State<FadeInImage>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/fade_in_image.dart, line 351, col 1)
[error] The class '_DismissibleState' cannot implement both 'State<Dismissible>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/dismissible.dart, line 192, col 1)
[error] The class 'EditableTextState' cannot implement both 'State<EditableText>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/editable_text.dart, line 310, col 1)
[error] The class 'OverlayState' cannot implement both 'State<Overlay>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/overlay.dart, line 262, col 1)
[error] The class '_GlowingOverscrollIndicatorState' cannot implement both 'State<GlowingOverscrollIndicator>' and 'State<StatefulWidget>' because the type arguments are different. (packages/flutter/lib/src/widgets/overscroll_indicator.dart, line 131, col 1)
[lint] 18 public members lack documentation (ran in 42.9s)
@aam
Copy link
Contributor Author

aam commented Mar 5, 2018

This blocks Flutter engine roll.
cc @devoncarew @a-siva @mraleph @alexmarkov

@mraleph mraleph added the P0 A serious issue requiring immediate resolution label Mar 5, 2018
@mraleph mraleph added this to the I/O Beta 2 milestone Mar 5, 2018
@bwilkerson
Copy link
Member

@stereotype441

@bwilkerson bwilkerson added the legacy-area-analyzer Use area-devexp instead. label Mar 5, 2018
@bwilkerson
Copy link
Member

We can temporarily disable the error if necessary, but it's my understanding that this is disallowed in Dart 2.

@bwilkerson bwilkerson added area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). and removed legacy-area-analyzer Use area-devexp instead. labels Mar 5, 2018
@bwilkerson bwilkerson removed their assignment Mar 5, 2018
@aam aam changed the title Analyzer fails Flutter with [error] The class ... cannot implement both 'State<AnimatedPhysicalModel>' and 'State<StatefulWidget>' because the type arguments are different. Analyzer fails Flutter with [error] The class ... cannot implement both 'State<...>' and 'State<StatefulWidget>' because the type arguments are different. Mar 5, 2018
@leafpetersen
Copy link
Member

leafpetersen commented Mar 5, 2018

At first glance this looks like a bug in mixin inference in the analyzer. I believe that the flutter code is already passing the new front end checks, which include the restriction on implementing multiple interfaces. I will work on getting a repro, but if I'm reading the flutter source correctly, the analyzer is incorrectly inferring StatefulWidget as the type argument to SingleTickerProviderStateMixin.

@leafpetersen
Copy link
Member

How does flutter use the analyzer? Are they an analysis context consumer or a driver consumer?

I cannot reproduce this with command line bleeding edge analyzer.

leafp-macbookpro:manual_tests leafp$ ~/src/dart-repo/sdk/xcodebuild/ReleaseX64/dart-sdk/bin/dartanalyzer --strong --preview-dart-2 --supermixin  lib/text.dart 
Analyzing lib/text.dart...
No issues found!

With a small repro as follows:

abstract class StatefulWidget {}
abstract class State<T extends StatefulWidget > {}
class SingleTickerProviderStateMixin<T extends StatefulWidget> extends State<T> {}

class Fuzzer extends StatefulWidget {}

class _FuzzerState extends State<Fuzzer> with SingleTickerProviderStateMixin {}

void main() {

}

I see:

  • No errors with bleeding edge analyzer CLI
  • No errors with dartdevk
  • Errors as follows with dartdevc:
leafp-macbookpro:sdk leafp$ ~/src/dart-repo/sdk/xcodebuild/ReleaseX64/dart-sdk/bin/dartdevc --supermixin -o out.js ~/tmp/ddctest.dart
[error] The class '_FuzzerState' cannot implement both 'State<Fuzzer>' and 'State<StatefulWidget>' because the type arguments are different. (../../../tmp/ddctest.dart, line 7, col 1)

Please fix all errors before compiling (warnings are okay).

@leafpetersen leafpetersen added legacy-area-analyzer Use area-devexp instead. and removed area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). labels Mar 5, 2018
@leafpetersen
Copy link
Member

Note that dartdevc uses the analysis context path, hence my question about analysis context vs driver.

@leafpetersen
Copy link
Member

Also, I confirmed that both the analyzer CLI and dartdevk will complain if I manually instantiate SingleTickerStateProviderMixin with StatefulWidget in that example, so I think they are both correctly doing the inference. This really looks like an analysis context issue.

@devoncarew
Copy link
Member

From looking, flutter analyze uses the analysis server (driver based) when run with the --watch flag, and uses dartanalyzer for some runs of the regular (non-watch) flutter analyze command. For others, it creates an analysis context and analyzes using that. So, those uses are on the older, context-based, code path.

@danrubel, I had thought that we'd transitioned flutter analyze ontp just using dartanalyzer and the analysis server only, and not a package:analyzer based implementation. We'll likely want to do that to help unblock the roll.

@devoncarew
Copy link
Member

It looks like we only use the context based analysis when analyzing the code in the flutter repo itself, in non-watch mode.

@devoncarew
Copy link
Member

@danrubel, is this something you can take a look at?

@leafpetersen
Copy link
Member

It's fine by me if you want to roll back this restriction for a bit to unblock the roll, but we should get that out there pretty soon to be sure that nothing incompatible with the CFE implementation creeps in.

@aam
Copy link
Contributor Author

aam commented Mar 6, 2018

@leafpetersen wrote

It's fine by me if you want to roll back this restriction for a bit to unblock the roll

Do you mean this https://dart-review.googlesource.com/c/sdk/+/45142 ?

@a-siva
Copy link
Contributor

a-siva commented Mar 6, 2018

@leafp if this is a temporary roll back does that imply changes to the flutter framework code base needs to be made? If so can you loop in @Hixie to review these Analyzer warnings so that the Flutter team is in the loop regarding potential changes to the framework code.

@leafpetersen
Copy link
Member

@leafp if this is a temporary roll back does that imply changes to the flutter framework code base needs to be made?

No, at least as I understand it. My understanding is that @mraleph already verified that the flutter code base is clean with this restriction (the new front end already implements it). The problem is that flutter analyze seems to be using a deprecated analyzer code path when analyzing the flutter repo, and that code path doesn't support mixin inference which is what makes this restriction work with flutter code.

@stereotype441
Copy link
Member

As an alternative to rolling back https://dart-review.googlesource.com/c/sdk/+/45142, consider this more targeted workaround, which merely disables the error when using the old task model: https://dart-review.googlesource.com/c/sdk/+/45200.

The advantage of the more targeted workaround would be that users of the command-line analyzer and analysis server would continue seeing the error message.

dart-bot pushed a commit that referenced this issue Mar 6, 2018
This is necessary since the old task model doesn't implement mixin
type inference properly.

Works around bug #32421.

Change-Id: I6d7873d658d9d0fd8ea6aa5d2452bf9e92947032
Reviewed-on: https://dart-review.googlesource.com/45200
Reviewed-by: Alexander Aprelev <[email protected]>
Commit-Queue: Paul Berry <[email protected]>
@bwilkerson
Copy link
Member

I think it would be better to only disable the error in the task model (though that also means disabling it for ddc) rather than to disable it everywhere.

@bwilkerson
Copy link
Member

@stereotype441 I have no context for fixing this. Is this something you can look at before the end of the week, or should we schedule a time to discuss what needs to be done?

@leafpetersen
Copy link
Member

The CL disabling this check in the task model has landed, so I believe this unblocks the roll. @aam can you confirm?

@bwilkerson it wasn't clear to me whether this should be fixed in the analysis context path or whether flutter analyze should just be taken off of the analysis context. I definitely feel like the latter is something we really should do at some point soon, but you all have a better handle on the dependencies and timing.

@aam
Copy link
Contributor Author

aam commented Mar 6, 2018

@leafpetersen wrote

The CL disabling this check in the task model has landed, so I believe this unblocks the roll. @aam can you confirm?

Yes, that's right.

@bwilkerson
Copy link
Member

it wasn't clear to me whether this should be fixed in the analysis context path or whether flutter analyze should just be taken off of the analysis context.

Yes, we need to move flutter analyze off the task model. I'm working on a replacement API (for both task model and analysis driver) that should make it easier for clients to get analysis results and protect them from the changes coming when analyzer is ported to the CFE.

As far as I know, whether it needs to be fixed in the task model depends on whether ddc needs this error to be supported.

@leafpetersen
Copy link
Member

As far as I know, whether it needs to be fixed in the task model depends on whether ddc needs this error to be supported.

Good point. @vsmenon thoughts? Since dart2js has never supported this, presumably all web code is clean and will remain so.

Is analysis of internal code during builds done using the task model or not? I think probably DDC support is not critical, but I'm a little worried if all of the non-DDC internal code doesn't get checked for this at least relatively soon.

@aam
Copy link
Contributor Author

aam commented Mar 6, 2018

Feel free to close this issue as Flutter is unblocked.

@stereotype441
Copy link
Member

@leafpetersen FWIW I believe that DDC does not need this error to be reported, since it has never had the restriction that a given generic interface may only be implemented in one way. As for analysis of internal code during builds, I can confirm that this is done using the analysis driver. So even with the workaround we've landed, internal code will still be checked to make sure it's clean.

@leafpetersen
Copy link
Member

FWIW I believe that DDC does not need this error to be reported, since it has never had the restriction that a given generic interface may only be implemented in one way.

Right, but once it switches to kernel, it will have that restriction, and we want to know about that earlier rather than later, but...

As for analysis of internal code during builds, I can confirm that this is done using the analysis driver.

... as long is this is true, then we will know about it earlier rather than later, so I'm happy.

@devoncarew
Copy link
Member

We need to move this specific use case of flutter analyze - analyzing the flutter repo itself once - off the task model. We should do that by moving it to using the command line analyzer - like the rest of the use cases for flutter analyze - or move it to the analysis server. I really don't think we should be using package:analyzer here, and having three different code paths to analyze flutter code is too many.

@dgrove
Copy link
Contributor

dgrove commented Mar 8, 2018

@devoncarew who will move analyzing the flutter repo itself off of the task model?

@dgrove
Copy link
Contributor

dgrove commented Mar 8, 2018

Also, @devoncarew does this have additional work required for the 2.0-beta2 milestone?

@devoncarew
Copy link
Member

From talking with Paul, his workaround did land. There's no additional work here for beta2. We will want to move flutter analyze off the task model; I'll track that work in a separate issue.

@tewshi

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-flutter legacy-area-analyzer Use area-devexp instead. P0 A serious issue requiring immediate resolution
Projects
None yet
Development

No branches or pull requests

9 participants