Skip to content

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Nov 9, 2020

Description

Fixes #69416
Fixes #70121

Update determineLanguageVersion to read the language version, not just as a comment. Use this to determine which runtime mode to support on the web, removing the use of autodetect enum entirely

This logic needs to expanded in the future to support the language version queries and null safety analytics

@flutter-dashboard flutter-dashboard bot added tool Affects the "flutter" command-line tool. See also t: labels. work in progress; do not review labels Nov 9, 2020
@google-cla google-cla bot added the cla: yes label Nov 9, 2020
@jonahwilliams jonahwilliams marked this pull request as ready for review November 9, 2020 21:08
@jonahwilliams
Copy link
Contributor Author

Autodetect doesn't work the same way on the web because the tool is ultimately responsible for 1) providing a separate sound or unsound dill 2) serving the precompiled sound dart_sdk.js or unsound dart_sdk.js

...?buildInfo.extraFrontEndOptions,
'--sound-null-safety',
];
} else {
Copy link
Member

Choose a reason for hiding this comment

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

Check indentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

lgtm


/// Attempts to read the language version of a dart [file], returning
/// the entire comment.
/// The first language version where null safety was available by default
Copy link
Contributor

Choose a reason for hiding this comment

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

Sound or unsound?

Also, nit, end with a period.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Language versions aren't sound or unsound. Sound = all libraries have a language version gte 2.12

@jonahwilliams jonahwilliams merged commit 3fb389c into flutter:master Nov 10, 2020
@jonahwilliams jonahwilliams deleted the web_auto_detect branch November 10, 2020 00:13
pcsosinski pushed a commit to pcsosinski/flutter that referenced this pull request Nov 13, 2020
pcsosinski pushed a commit that referenced this pull request Nov 14, 2020
)

* Update engine hash to 1.24.0-10.1.pre

* [null-safety] implement null-safe autodetection for the web (#70126)

Fixes #69416
Fixes #70121

* [flutter_tools] dont use autodetect enum for web (#70189)

* Update engine hash for build fix and pub DEP bump

Co-authored-by: Jonah Williams <jonahwilliams@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web: change SDK selection when NullSafetyMode.autodetect is working Adjust auto-detect logic for flutter web null safety

3 participants