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

chore: remove flutter version check from doctor #2735

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/shorebird_cli/lib/src/doctor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class Doctor {
/// Validators that should run on all commands.
List<Validator> generalValidators = [
ShorebirdVersionValidator(),
ShorebirdFlutterValidator(),
AndroidInternetPermissionValidator(),
MacosNetworkEntitlementValidator(),
ShorebirdYamlAssetValidator(),
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion packages/shorebird_cli/lib/src/validators/validators.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import 'package:shorebird_cli/src/shorebird_process.dart';
export 'android_internet_permission_validator.dart';
export 'flavor_validator.dart';
export 'macos_network_entitlement_validator.dart';
export 'shorebird_flutter_validator.dart';
export 'shorebird_version_validator.dart';
export 'shorebird_yaml_asset_validator.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ void main() {
late CodeSigner codeSigner;
late Doctor doctor;
late Directory projectRoot;
late FlavorValidator flavorValidator;
late ShorebirdLogger logger;
late PatchDiffChecker patchDiffChecker;
late Progress progress;
late ShorebirdFlutterValidator flutterValidator;
late ShorebirdProcess shorebirdProcess;
late ShorebirdEnv shorebirdEnv;
late ShorebirdFlutter shorebirdFlutter;
Expand Down Expand Up @@ -125,11 +125,11 @@ void main() {
codePushClientWrapper = MockCodePushClientWrapper();
codeSigner = MockCodeSigner();
doctor = MockDoctor();
flavorValidator = MockFlavorValidator();
patchDiffChecker = MockPatchDiffChecker();
progress = MockProgress();
projectRoot = Directory.systemTemp.createTempSync();
logger = MockShorebirdLogger();
flutterValidator = MockShorebirdFlutterValidator();
shorebirdProcess = MockShorebirdProcess();
shorebirdEnv = MockShorebirdEnv();
shorebirdFlutter = MockShorebirdFlutter();
Expand Down Expand Up @@ -163,8 +163,8 @@ void main() {
group('assertPreconditions', () {
setUp(() {
when(() => doctor.androidCommandValidators)
.thenReturn([flutterValidator]);
when(flutterValidator.validate).thenAnswer((_) async => []);
.thenReturn([flavorValidator]);
when(flavorValidator.validate).thenAnswer((_) async => []);
});

group('when validation succeeds', () {
Expand Down Expand Up @@ -220,7 +220,7 @@ void main() {
() => shorebirdValidator.validatePreconditions(
checkUserIsAuthenticated: true,
checkShorebirdInitialized: true,
validators: [flutterValidator],
validators: [flavorValidator],
),
).called(1);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ void main() {
late ArtifactManager artifactManager;
late CodePushClientWrapper codePushClientWrapper;
late Doctor doctor;
late EngineConfig engineConfig;
late Directory flutterDirectory;
late Directory projectRoot;
late EngineConfig engineConfig;
late FlavorValidator flavorValidator;
late ShorebirdLogger logger;
late OperatingSystemInterface operatingSystemInterface;
late PatchDiffChecker patchDiffChecker;
late Progress progress;
late ShorebirdArtifacts shorebirdArtifacts;
late ShorebirdFlutterValidator flutterValidator;
late ShorebirdProcess shorebirdProcess;
late ShorebirdEnv shorebirdEnv;
late ShorebirdFlutter shorebirdFlutter;
Expand Down Expand Up @@ -105,6 +105,7 @@ void main() {
codePushClientWrapper = MockCodePushClientWrapper();
doctor = MockDoctor();
engineConfig = MockEngineConfig();
flavorValidator = MockFlavorValidator();
operatingSystemInterface = MockOperatingSystemInterface();
patchDiffChecker = MockPatchDiffChecker();
progress = MockProgress();
Expand All @@ -113,7 +114,6 @@ void main() {
shorebirdArtifacts = MockShorebirdArtifacts();
shorebirdProcess = MockShorebirdProcess();
shorebirdEnv = MockShorebirdEnv();
flutterValidator = MockShorebirdFlutterValidator();
shorebirdFlutter = MockShorebirdFlutter();
shorebirdValidator = MockShorebirdValidator();
xcodeBuild = MockXcodeBuild();
Expand Down Expand Up @@ -183,7 +183,7 @@ void main() {
setUp(() {
when(
() => doctor.iosCommandValidators,
).thenReturn([flutterValidator]);
).thenReturn([flavorValidator]);
});

group('when validation succeeds', () {
Expand Down Expand Up @@ -249,7 +249,7 @@ void main() {
() => shorebirdValidator.validatePreconditions(
checkUserIsAuthenticated: true,
checkShorebirdInitialized: true,
validators: [flutterValidator],
validators: [flavorValidator],
supportedOperatingSystems: {Platform.macOS},
),
).called(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ void main() {
late CodePushClientWrapper codePushClientWrapper;
late CodeSigner codeSigner;
late Doctor doctor;
late EngineConfig engineConfig;
late Directory flutterDirectory;
late Directory projectRoot;
late EngineConfig engineConfig;
late FlavorValidator flavorValidator;
late ShorebirdLogger logger;
late OperatingSystemInterface operatingSystemInterface;
late PatchDiffChecker patchDiffChecker;
late Progress progress;
late ShorebirdArtifacts shorebirdArtifacts;
late ShorebirdFlutterValidator flutterValidator;
late ShorebirdProcess shorebirdProcess;
late ShorebirdEnv shorebirdEnv;
late ShorebirdFlutter shorebirdFlutter;
Expand Down Expand Up @@ -117,6 +117,7 @@ void main() {
codeSigner = MockCodeSigner();
doctor = MockDoctor();
engineConfig = MockEngineConfig();
flavorValidator = MockFlavorValidator();
ios = MockIos();
operatingSystemInterface = MockOperatingSystemInterface();
patchDiffChecker = MockPatchDiffChecker();
Expand All @@ -126,7 +127,6 @@ void main() {
shorebirdArtifacts = MockShorebirdArtifacts();
shorebirdProcess = MockShorebirdProcess();
shorebirdEnv = MockShorebirdEnv();
flutterValidator = MockShorebirdFlutterValidator();
shorebirdFlutter = MockShorebirdFlutter();
shorebirdValidator = MockShorebirdValidator();
xcodeBuild = MockXcodeBuild();
Expand Down Expand Up @@ -195,7 +195,7 @@ void main() {
setUp(() {
when(
() => doctor.iosCommandValidators,
).thenReturn([flutterValidator]);
).thenReturn([flavorValidator]);
});

group('when validation succeeds', () {
Expand Down Expand Up @@ -266,7 +266,7 @@ void main() {
() => shorebirdValidator.validatePreconditions(
checkUserIsAuthenticated: true,
checkShorebirdInitialized: true,
validators: [flutterValidator],
validators: [flavorValidator],
supportedOperatingSystems: {Platform.macOS},
),
).called(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ void main() {
late Directory flutterDirectory;
late Directory projectRoot;
late Directory appDirectory;
late FlavorValidator flavorValidator;
late ShorebirdLogger logger;
late OperatingSystemInterface operatingSystemInterface;
late PatchDiffChecker patchDiffChecker;
late Progress progress;
late ShorebirdArtifacts shorebirdArtifacts;
late ShorebirdFlutterValidator flutterValidator;
late ShorebirdProcess shorebirdProcess;
late ShorebirdEnv shorebirdEnv;
late ShorebirdFlutter shorebirdFlutter;
Expand Down Expand Up @@ -117,6 +117,7 @@ void main() {
codeSigner = MockCodeSigner();
doctor = MockDoctor();
engineConfig = MockEngineConfig();
flavorValidator = MockFlavorValidator();
operatingSystemInterface = MockOperatingSystemInterface();
patchDiffChecker = MockPatchDiffChecker();
progress = MockProgress();
Expand All @@ -125,7 +126,6 @@ void main() {
shorebirdArtifacts = MockShorebirdArtifacts();
shorebirdProcess = MockShorebirdProcess();
shorebirdEnv = MockShorebirdEnv();
flutterValidator = MockShorebirdFlutterValidator();
shorebirdFlutter = MockShorebirdFlutter();
shorebirdValidator = MockShorebirdValidator();
xcodeBuild = MockXcodeBuild();
Expand Down Expand Up @@ -222,7 +222,7 @@ void main() {
setUp(() {
when(
() => doctor.macosCommandValidators,
).thenReturn([flutterValidator]);
).thenReturn([flavorValidator]);
});

group('when validation succeeds', () {
Expand Down Expand Up @@ -293,7 +293,7 @@ void main() {
() => shorebirdValidator.validatePreconditions(
checkUserIsAuthenticated: true,
checkShorebirdInitialized: true,
validators: [flutterValidator],
validators: [flavorValidator],
supportedOperatingSystems: {Platform.macOS},
),
).called(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ void main() {
late CodeSigner codeSigner;
late Doctor doctor;
late Directory projectRoot;
late FlavorValidator flavorValidator;
late ShorebirdLogger logger;
late OperatingSystemInterface operatingSystemInterface;
late Progress progress;
late ShorebirdFlutterValidator flutterValidator;
late ShorebirdProcess shorebirdProcess;
late ShorebirdEnv shorebirdEnv;
late ShorebirdFlutter shorebirdFlutter;
Expand Down Expand Up @@ -83,11 +83,11 @@ void main() {
codePushClientWrapper = MockCodePushClientWrapper();
codeSigner = MockCodeSigner();
doctor = MockDoctor();
flavorValidator = MockFlavorValidator();
operatingSystemInterface = MockOperatingSystemInterface();
progress = MockProgress();
projectRoot = Directory.systemTemp.createTempSync();
logger = MockShorebirdLogger();
flutterValidator = MockShorebirdFlutterValidator();
shorebirdProcess = MockShorebirdProcess();
shorebirdEnv = MockShorebirdEnv();
shorebirdFlutter = MockShorebirdFlutter();
Expand Down Expand Up @@ -121,8 +121,8 @@ void main() {
group('assertPreconditions', () {
setUp(() {
when(() => doctor.androidCommandValidators)
.thenReturn([flutterValidator]);
when(flutterValidator.validate).thenAnswer((_) async => []);
.thenReturn([flavorValidator]);
when(flavorValidator.validate).thenAnswer((_) async => []);
});

group('when validation succeeds', () {
Expand Down Expand Up @@ -178,7 +178,7 @@ void main() {
() => shorebirdValidator.validatePreconditions(
checkUserIsAuthenticated: true,
checkShorebirdInitialized: true,
validators: [flutterValidator],
validators: [flavorValidator],
),
).called(1);
});
Expand Down
Loading
Loading