Skip to content

Roll engine with rolled dart #14538

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

Merged
merged 14 commits into from
Feb 9, 2018
Merged

Conversation

aam
Copy link
Member

@aam aam commented Feb 8, 2018

No description provided.

@aam
Copy link
Member Author

aam commented Feb 8, 2018

AppVeyor builder is not happy:

⏩ RUNNING: cd .; bin\flutter.bat analyze --flutter-repo
Analyzing 1395 files...
[warning] Missing concrete implementations of 'Map.addEntries', 'Map.cast', 'Map.map', 'Map.removeWhere' and 3 more. (packages\flutter_tools\lib\src\vmservice.dart, line 1235, col 7)
[warning] Inconsistent declarations of 'update' are inherited from (Map<String, dynamic>) → void, (String, (dynamic) → dynamic, {ifAbsent: () → dynamic}) → dynamic. (packages\flutter_tools\lib\src\vmservice.dart, line 1235, col 7)
[error] Base class introduces an invalid override. The type of 'ServiceObject.update' ('(Map<String, dynamic>) → void') isn't a subtype of 'Map<String, dynamic>.update' ('(String, (dynamic) → dynamic, {ifAbsent: () → dynamic}) → dynamic'). (packages\flutter_tools\lib\src\vmservice.dart, line 1235, col 18)
[lint] 7 public members lack documentation (ran in 51.2s)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ERROR: Last command exited with 1 (expected: zero).

@devoncarew have you seen this? cc @leafpetersen too

@aam
Copy link
Member Author

aam commented Feb 8, 2018

cc @jason-simmons

@jason-simmons
Copy link
Member

Some changes to the Map interface landed today:
dart-lang/sdk@6f78471

ServiceMap in flutter_tools/lib/src/vmservice.dart needs to be updated

@devoncarew
Copy link
Member

I think @jason-simmons is right in that we'll need to update the flutter repo a bit in response to these changes (/cc @leafpetersen)

@aam
Copy link
Member Author

aam commented Feb 8, 2018

After moving to dev.22 and fixing few analysis issues I'm seeing new ones:

╰─➤  bin/flutter analyze --flutter-repo                                                                                                                                              1 ↵
Analyzing 1401 files...
[error] Evaluation of this constant expression throws an exception. (packages/flutter/test/painting/decoration_test.dart, line 340, col 28)
[error] Evaluation of this constant expression throws an exception. (packages/flutter/test/painting/decoration_test.dart, line 341, col 28)
[error] Evaluation of this constant expression throws an exception. (packages/flutter/test/painting/decoration_test.dart, line 342, col 28)
[error] Evaluation of this constant expression throws an exception. (packages/flutter/test/painting/decoration_test.dart, line 339, col 28)
[error] Evaluation of this constant expression throws an exception. (packages/flutter/test/widgets/list_wheel_scroll_view_test.dart, line 17, col 9)
[error] Type parameters could not be inferred for the mixin 'AutomaticKeepAliveClientMixin' because the base class implements the mixin's supertype constraint 'State<StatefulWidget>' in multiple conflicting ways (packages/flutter/lib/src/widgets/dismissible.dart, line 192, col 83)
[lint] 7 public members lack documentation (ran in 45.8s)

@devoncarew
Copy link
Member

/cc'ing @bwilkerson for the Evaluation of this constant expression throws an exception errors. It's likely that that test code will need to be updated.

@jason-simmons
Copy link
Member

In _DismissibleState, AutomaticKeepAliveClientMixin needs to be AutomaticKeepAliveClientMixin<Dismissible>

The decoration_test lines are failing because the analyzer is rejecting this line in the FlutterLogoDecoration ctor:
_position = style == FlutterLogoStyle.markOnly ? 0.0 : style == FlutterLogoStyle.horizontal ? 1.0 : -1.0,

This line isn't valid in a const constructor. Previously the code had an ignore: CONST_EVAL_TYPE_BOOL_NUM_STRING directive to work around this, but the current analyzer doesn't accept that. Does the constructor need to be changed to non-const?

The test in list_wheel_scroll_view_test is trying to validate that the constructor raises an assertion for invalid arguments. The analyzer wants the constructor to be invoked as const, and then it's seeing the assertion during analysis.
Is there a directive that can disable the const warning? If not, then I guess this test can be deleted.

@Hixie
Copy link
Contributor

Hixie commented Feb 8, 2018

We're probably hitting dart-lang/sdk#26980. It may be time to fix that bug.

@aam
Copy link
Member Author

aam commented Feb 8, 2018

In _DismissibleState, AutomaticKeepAliveClientMixin needs to be AutomaticKeepAliveClientMixin<Dismissible>

AutomaticKeepAliveClientMixin type parameter was removed in e122d5d

@aam
Copy link
Member Author

aam commented Feb 8, 2018

AutomaticKeepAliveClientMixin type parameter was removed in e122d5d

@a-siva @mraleph any thoughts on whether we can revert #14544 to keep analyzer happy about mixin-inheritance type conflicts?

@a-siva
Copy link
Contributor

a-siva commented Feb 8, 2018

regarding reverting #14544 this was done to avoid getting runtime errors in --preview-dart-2 mode as the front end is not ready yet for it. We should be getting a fix soon from the front end team which will enable us to reland those changes.

@aam
Copy link
Member Author

aam commented Feb 8, 2018

Okay alternative approach is what 08f754e is doing which is to silence analyzer warnings

@aam
Copy link
Member Author

aam commented Feb 9, 2018

Travis build passes but now flutter gallery run with --preview-dart-2 fails

─➤  ../../bin/flutter run --preview-dart-2

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...                                1.9s
Resolving dependencies...                             2.2s
Running 'gradlew assembleDebug'...                   18.5s
Built build/app/outputs/apk/debug/app-debug.apk (36.7MB).
Installing build/app/outputs/apk/app.apk...           3.5s
I/FlutterActivityDelegate( 3298): onResume setting current activity to this
E/flutter ( 3298): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter ( 3298): type '(ByteData) => Future' is not a subtype of type '(ByteData) => Future<ByteData>' of 'value'
E/flutter ( 3298): #0      ___HashVMBase&MapMixin&_LinkedHashMapMixin^^#T0&#T1^#T0&#T1.[]= (file:///b/build/slave/Linux_Engine/build/src/third_party/dart/runtime/lib/compact_hash.dart)
E/flutter ( 3298): #1      BinaryMessages.setMessageHandler (package:flutter/src/services/platform_messages.dart:103:16)
E/flutter ( 3298): #2      BasicMessageChannel.setMessageHandler (package:flutter/src/services/platform_channel.dart:64:22)
E/flutter ( 3298): #3      ___BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.initInstances (package:flutter/src/scheduler/binding.dart:200:30)
E/flutter ( 3298): #4      ____BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding.initInstances (package:flutter/src/painting/binding.dart:22:11)
E/flutter ( 3298): #5      _____BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding.initInstances (package:flutter/src/rendering/binding.dart:31:11)
E/flutter ( 3298): #6      ______BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.initInstances (package:flutter/src/widgets/binding.dart:241:11)
E/flutter ( 3298): #7      new BindingBase (package:flutter/src/foundation/binding.dart:51:5)
E/flutter ( 3298): #8      new _BindingBase&GestureBinding (package:flutter/src/widgets/binding.dart)
E/flutter ( 3298): #9      new __BindingBase&GestureBinding&ServicesBinding (package:flutter/src/widgets/binding.dart)
E/flutter ( 3298): #10     new ___BindingBase&GestureBinding&ServicesBinding&SchedulerBinding (package:flutter/src/widgets/binding.dart)
E/flutter ( 3298): #11     new ____BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding (package:flutter/src/widgets/binding.dart)
E/flutter ( 3298): #12     new _____BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding (package:flutter/src/widgets/binding.dart)
E/flutter ( 3298): #13     new ______BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding (package:flutter/src/widgets/binding.dart)
E/flutter ( 3298): #14     new WidgetsFlutterBinding (package:flutter/src/widgets/binding.dart)
E/flutter ( 3298): #15     WidgetsFlutterBinding.ensureInitialized (package:flutter/src/widgets/binding.dart:906:11)
E/flutter ( 3298): #16     runApp (package:flutter/src/widgets/binding.dart:698:25)
E/flutter ( 3298): #17     main (file:///Users/aam/projects/flutter/test_root6/flutter/flutter/examples/flutter_gallery/lib/main.dart:13:3)
E/flutter ( 3298): #18     _startIsolate.<anonymous closure> (file:///b/build/slave/Linux_Engine/build/src/third_party/dart/runtime/lib/isolate_patch.dart:278:19)
E/flutter ( 3298): #19     _RawReceivePortImpl._handleMessage (file:///b/build/slave/Linux_Engine/build/src/third_party/dart/runtime/lib/isolate_patch.dart:164:12)
Syncing files to device Android SDK built for x86...  6.4s

@mraleph
Copy link
Member

mraleph commented Feb 9, 2018

@aam this looks like a type inference bug, let dig into it.

@mraleph
Copy link
Member

mraleph commented Feb 9, 2018

@aam I think you need to purge your build folder and delete any dill files left out.

Something is broken in the rebuild logic. I have noticed it occasionally before - dill files are not properly rebuild on engine upgrades.

# In ~/src/flutter/flutter/examples/flutter_gallery
$ rm -rf build && find . -iname '*.dill' -exec rm '{}' ';'

This should fix it. However it might be worth looking into why dill is not regenerated for you.

@@ -14,10 +14,10 @@ void main() {
group('construction check', () {
testWidgets('ListWheelScrollView needs positive diameter ratio', (WidgetTester tester) async {
try {
new ListWheelScrollView(
new ListWheelScrollView( // ignore: prefer_const_constructors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use nonconst() on one of the arguments to fix this more cleanly

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good to know. Done.

@aam
Copy link
Member Author

aam commented Feb 9, 2018

@aam I think you need to purge your build folder and delete any dill files left out.

You are right, that fixed the problem.

Something is broken in the rebuild logic. I have noticed it occasionally before - dill files are not properly rebuild on engine upgrades.

I see. One thing that is missing is deps file generation when kernel file(rather than snapshot) is generated. Not sure if it could cause stale builds though.

@aam aam merged commit 0f3aa50 into flutter:master Feb 9, 2018
@aam aam deleted the roll-engine-dart-20180207 branch February 9, 2018 18:33
srawlins added a commit to srawlins/flutter that referenced this pull request Feb 9, 2018
* master: (88 commits)
  Upgrade dartdoc to 0.16.0. (flutter#14602)
  Reduce noise in xcodebuild stdout (flutter#14586)
  Add annotations to ignore analyzer errors on pre-dev.22 SDKs (flutter#14599)
  Roll engine to 337764e (flutter#14597)
  Roll engine with rolled dart (flutter#14538)
  Upgrade packages (flutter#14588)
  Change GlobalObjectKey.toString to strip away State<StatefulWidget>. (flutter#14558)
  Disable selection of the Android ARM64 target platform based on the attached device (flutter#14581)
  Add a flutter run option that can override the default target platform (flutter#14537)
  Fix message channel usage in few tests. (flutter#14557)
  Update documentation on how to test flutter_tools (flutter#14567)
  Fix text_style_text.dart to be Dart 2 compliant. (flutter#14559)
  Hide the NDK warning that should never happen with a regexp (flutter#14503)
  Fix iOS build which broke after the change to fuse --strong option into --preview-dart-2.
  Mark run_machine_concurrent_hot_reload as flaky (flutter#14563)
  Fuse --strong into --preview-dart-2 option.
  Partially fix Dart 2 issues in animated_icons.test. (flutter#14531)
  Strong mode fixes in tests (flutter#14520)
  Fix typo.
  Fix issues.
  ...
@Hixie
Copy link
Contributor

Hixie commented Feb 12, 2018

This patch had a very regressive impact on a wide number of benchmarks, notably dart2 aot snapshot size, and release size. It also caused the dart2 ios benchmarks to stop reporting.

Edit: See below, this PR had a regression in aot_snapshot size metrics, separate from the regression this comment originally mentioned.

@mraleph
Copy link
Member

mraleph commented Feb 12, 2018

I think the regressions come from 83e0ca2, not from this patch per se. We are investigating why iOS benchmark stopped reporting.

@Hixie
Copy link
Contributor

Hixie commented Feb 12, 2018

Sorry, my bad. This patch had a minor regressive impact on the aot_snapshot size metrics. I just got confused as to which PR I was commenting on.

DaveShuckerow pushed a commit to DaveShuckerow/flutter that referenced this pull request May 14, 2018
* Roll engine to pre-dart roll

* Roll engine to pick up updated dart

* Apply Map changes

* Move to dev.22

* Fix some analysis issues

* Silent analyzer

* More consts

* More const massaging

* Yet more const massaging

* Yet more const massaging

* Use nonconst()
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants