Skip to content

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented May 26, 2021

Make build.dart null safe.

Update processUtils.stream to handle a null return from mapFunction to indicate no line should be printed, since that's how it's used in a few places. Add a unit test for this.

String consumeLog(String line) {
// This message was removed from first-party plugins,
// but older plugin versions still display this message.
if (androidXPluginWarningRegex.hasMatch(line)) {
// Don't pipe.
return null;
}

Also found a few globals_null_migrated imports I missed.

Part of #71511

Closes #81106

@jmagman jmagman added c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels. a: null-safety Support for Dart's null safety feature labels May 26, 2021
@jmagman jmagman self-assigned this May 26, 2021
@google-cla google-cla bot added the cla: yes label May 26, 2021
line = mapFunction(line);
mappedLine = mapFunction(line);
}
if (line != null) {
Copy link
Member Author

@jmagman jmagman May 26, 2021

Choose a reason for hiding this comment

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

This listener handled null values returned from mapFunction.

snapshotterPath += '_' + getNameForDarwinArch(darwinArch!);
}

return _processUtils.stream(
Copy link
Member Author

Choose a reason for hiding this comment

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

Line 77 is the null returned from mapFunction that prompted that signature change.

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@fluttergithubbot fluttergithubbot merged commit 00263c4 into flutter:master May 26, 2021
@jmagman jmagman deleted the build-null branch May 26, 2021 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: null-safety Support for Dart's null safety feature c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants