Skip to content

Conversation

@goderbauer
Copy link
Member

@goderbauer goderbauer commented Sep 11, 2023

New feature in upcoming Dart 3.2. See dart-lang/language#2020. Feature is enabled by bumping the min SDK version to 3.2.

Part of #134476.

@github-actions github-actions bot added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc. f: cupertino flutter/packages/flutter/cupertino repository f: routes Navigator, Router, and related APIs. labels Sep 11, 2023
Copy link
Member Author

Choose a reason for hiding this comment

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

The web compiler is unhappy about the removal of ! here and below:

/b/s/w/ir/x/w/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /b/s/w/ir/x/w/flutter/bin/cache/dart-sdk/bin/snapshots/frontend_server.dart.snapshot --sdk-root /b/s/w/ir/x/w/flutter/bin/cache/flutter_web_sdk/ --incremental --target=dartdevc --experimental-emit-debug-metadata -DDART_HHH_BOT=false -DFLUTTER_WEB_AUTO_DETECT=false -DFLUTTER_WEB_USE_SKIA=true --output-dill /b/s/w/ir/x/t/flutter_tools.VOZITK/flutter_test.PPUCHG/out --packages /b/s/w/ir/x/w/flutter/packages/flutter/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-root /b/s/w/ir/x/w/flutter/packages/flutter/test --filesystem-root /b/s/w/ir/x/t/flutter_tools.VOZITK/flutter_test.PPUCHG/ --filesystem-scheme org-dartlang-app --initialize-from-dill build/a2632b1a2d119a1f9ce340959afb28ff.cache.dill.track.dill --platform file:///b/s/w/ir/x/w/flutter/bin/cache/flutter_web_sdk/kernel/ddc_outline_sound.dill --verbosity=error --sound-null-safety
[  +16 ms] <- compile org-dartlang-app:///main.dart
[+11509 ms] lib/src/rendering/error.dart:160:20: Error: Method 'layout' cannot be called on 'Paragraph?' because it is potentially null.
[   +2 ms]  - 'Paragraph' is from 'dart:ui'.
[        ] Try calling using ?. instead.
[        ]         _paragraph.layout(ui.ParagraphConstraints(width: width));
[        ]                    ^^^^^^
[   +6 ms] lib/src/rendering/error.dart:161:52: Error: Property 'height' cannot be accessed on 'Paragraph?' because it is potentially null.
[        ]  - 'Paragraph' is from 'dart:ui'.
[        ] Try accessing using ?. instead.
[        ]         if (size.height > padding.top + _paragraph.height + padding.bottom) {
[        ]                                                    ^^^^^^
[        ] lib/src/rendering/error.dart:61:28: Context: '_paragraph' refers to a property so it couldn't be promoted.
[        ] See http://dart.dev/go/non-promo-property
[        ]   late final ui.Paragraph? _paragraph;
[        ]                            ^
[   +1 ms] lib/src/rendering/error.dart:164:38: Error: The argument type 'Paragraph?' can't be assigned to the parameter type 'Paragraph' because 'Paragraph?' is nullable and 'Paragraph' isn't.
[        ]  - 'Paragraph' is from 'dart:ui'.
[        ]         context.canvas.drawParagraph(_paragraph, offset + Offset(left, top));

(from https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8770206943273787297/+/u/run_test.dart_for_web_canvaskit_tests_shard_and_subshard_0/test_stdout)

Copy link
Member Author

Choose a reason for hiding this comment

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

The ! should be removable because of if (_paragraph != null) in line 152, though. This issue also only surfaces on the web. When running in the VM, the removal of the ! is not causing any trouble. Presumably, there is a bug somewhere in the web compilation pipeline?

@stereotype441 Any idea what may be going on here? If necessary, I can try to boil this down to a smaller repro case.

Copy link
Member Author

Choose a reason for hiding this comment

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

We likely have to wait for dart-lang/sdk@1da590f to roll into Flutter, which is expected to fix this problem.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fix rolled in with #134763.

Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

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

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@goderbauer goderbauer added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 14, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Sep 15, 2023

auto label is removed for flutter/flutter/134473, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 15, 2023
@goderbauer goderbauer added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 18, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 18, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Sep 18, 2023

auto label is removed for flutter/flutter/134473, due to - The status or check suite Linux web_tests_2 has failed. Please fix the issues identified (or deflake) before re-applying this label.

  • The status or check suite Linux web_tests_1 has failed. Please fix the issues identified (or deflake) before re-applying this label.

@goderbauer goderbauer added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 18, 2023
@auto-submit auto-submit bot merged commit da0f9a9 into flutter:master Sep 18, 2023
@goderbauer goderbauer deleted the privateFramework branch September 18, 2023 20:51
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 19, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Sep 19, 2023
flutter/flutter@b7d0e8c...8936504

2023-09-19 [email protected] Roll Flutter Engine from e1c784e3f841 to 589bde9a95c9 (16 revisions) (flutter/flutter#134998)
2023-09-19 [email protected] Reland Resolve breaking change of adding a method to ChangeNotifier. (flutter/flutter#134983)
2023-09-18 [email protected] Revert "Resolve breaking change of adding a method to ChangeNotifier." (flutter/flutter#134978)
2023-09-18 [email protected] Resolve breaking change of adding a method to ChangeNotifier. (flutter/flutter#134953)
2023-09-18 [email protected] Fixes focus traversal crash if the current node can't request focus (flutter/flutter#134954)
2023-09-18 [email protected] Access to fragment in router state on page refresh (flutter/flutter#131123)
2023-09-18 [email protected] Enable private field promotion for framework (flutter/flutter#134473)
2023-09-18 [email protected] Cover more test/widgets tests with leak tracking #6 (flutter/flutter#134884)
2023-09-18 [email protected] Cover more tests with leak tracking. (flutter/flutter#134805)
2023-09-18 [email protected] Cover more test/widgets tests with leak tracking #5 (flutter/flutter#134869)
2023-09-18 [email protected] Don't uninstall before retrying to connect during app launch (flutter/flutter#134542)
2023-09-18 [email protected] [flutter roll] Revert "LinkedText (Linkify)" (flutter/flutter#134955)
2023-09-18 [email protected] Fix memory leak in _DarwinViewState. (flutter/flutter#134938)
2023-09-18 [email protected] Roll Flutter Engine from be7a039c5451 to e1c784e3f841 (3 revisions) (flutter/flutter#134956)
2023-09-18 [email protected] Migrate the "Missing frames / speed related performance issues" issue template to use Github forms (flutter/flutter#134033)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Mairramer pushed a commit to Mairramer/flutter that referenced this pull request Oct 10, 2023
New feature in upcoming Dart 3.2. See dart-lang/language#2020. Feature is enabled by bumping the min SDK version to 3.2.

Part of flutter#134476.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: text input Entering text in a text field or keyboard related problems autosubmit Merge PR when tree becomes green via auto submit App f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. f: routes Navigator, Router, and related APIs. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants