Skip to content

Print a warning when building on a Intel machine that support will be unavailable in a future release #188330

Description

@vashworth

When building for any platform (iOS, macOS, web, or Android) from an Intel machine, we should print a message that this will be unsupported in a future version of Flutter.

See Design Doc: https://flutter.dev/go/macos-intel-deprecation

The host platform can be checked using globals.os.hostPlatform:

DarwinArch getCurrentDarwinArch() {
return switch (globals.os.hostPlatform) {
HostPlatform.darwin_arm64 => DarwinArch.arm64,
HostPlatform.darwin_x64 => DarwinArch.x86_64,
final HostPlatform unsupported => throw Exception(
'Unsupported Darwin host platform "$unsupported"',
),
};
}

I think likely the right place to print the warning is in FlutterCommand.verifyThenRunCommand so it's ran with every command:

Future<FlutterCommandResult> verifyThenRunCommand(String? commandPath) async {
globals.preRunValidator.validate();
if (refreshWirelessDevices) {
// Loading wireless devices takes longer so start it early.
_targetDevices.startExtendedWirelessDeviceDiscovery(
deviceDiscoveryTimeout: deviceDiscoveryTimeout,
);
}
final FlutterProject project;
try {
project = await _updateCacheAndRunPubGet();
} finally {
globals.cache.releaseLock();
}
if (regeneratePlatformSpecificToolingDuringVerify) {
await regeneratePlatformSpecificToolingIfApplicable(
project,
releaseMode: getBuildMode().isRelease,
);
}
setupApplicationPackages();
if (commandPath != null) {
analytics.send(await unifiedAnalyticsUsageValues(commandPath));
}
return runCommand();
}

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listplatform-iosiOS applications specificallyplatform-macosBuilding on or for macOS specificallyteam-iosOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform team

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions