Skip to content
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

Migrate more tool unit tests to null safety #80002

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

jmagman
Copy link
Member

@jmagman jmagman commented Apr 8, 2021

Part of #71511

@jmagman jmagman added team Infra upgrades, team productivity, code health, technical debt. See also team: labels. tool Affects the "flutter" command-line tool. See also t: labels. a: null-safety Support for the Dart's team new null safety feature labels Apr 8, 2021
@jmagman jmagman self-assigned this Apr 8, 2021
@google-cla google-cla bot added the cla: yes label Apr 8, 2021
@@ -118,7 +118,7 @@ class AppContext {
if (value == null && _parent != null) {
value = _parent!.get<T>();
}
return _unboxNull(value ?? _generateIfNecessary(T, _fallbacks)) as T;
return _unboxNull(value ?? _generateIfNecessary(T, _fallbacks)) as T?;
Copy link
Member Author

Choose a reason for hiding this comment

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

Also in #79985, let's see which one merges first.

@@ -48,7 +48,7 @@ bool _inUnitTest() {
///
/// The specification for the language version tag is defined at:
/// https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
LanguageVersion determineLanguageVersion(File file, Package package, String flutterRoot) {
LanguageVersion determineLanguageVersion(File file, Package? package, String flutterRoot) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the only actual non-test change.

@@ -9,7 +9,7 @@ import 'package:flutter_tools/src/doctor_validator.dart';
import 'package:flutter_tools/src/linux/linux_doctor.dart';

import '../../src/common.dart';
import '../../src/context.dart';
import '../../src/fake_process_manager.dart';
Copy link
Member Author

Choose a reason for hiding this comment

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

Getting ready to migrate fake_process_manager.

Copy link
Member

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

LGTM

@jmagman jmagman merged commit ec14cef into flutter:master Apr 8, 2021
@jmagman jmagman deleted the null-test-general branch April 8, 2021 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: null-safety Support for the Dart's team new null safety feature team Infra upgrades, team productivity, code health, technical debt. See also team: 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.

2 participants