Repository navigation
Split the platform and cpuArch part of TargetPlatform - #189479
Merged
Merged
Conversation
chingjun
force-pushed
the
split-targetplatform
branch
3 times, most recently
from
July 15, 2026 21:25
353f585 to
622ff1d
Compare
Contributor
Author
chingjun
marked this pull request as ready for review
July 15, 2026 22:02
chingjun
requested review from
bkonyi and
mboetger
and removed request for
a team and
mboetger
July 15, 2026 22:02
bkonyi
reviewed
Jul 21, 2026
bkonyi
left a comment
Contributor
There was a problem hiding this comment.
LGTM overall! I'll approve once the comment is addressed.
| .macos || .windows => true, | ||
| .linux => targetPlatform.cpuArch == .x64, | ||
| .unsupported => TargetPlatform.throwUnsupportedTarget(), | ||
| _ => false, |
Contributor
There was a problem hiding this comment.
I guess we should be avoiding introducing _ here and explicitly list the unsupported target platform types.
Contributor
Author
There was a problem hiding this comment.
Updated to list all platforms here.
chingjun
force-pushed
the
split-targetplatform
branch
2 times, most recently
from
July 21, 2026 22:57
cc89597 to
9aed9ab
Compare
bkonyi
previously approved these changes
Jul 23, 2026
Convert `TargetPlatform` from an enum into an immutable class that combines a `PlatformType` (OS / runtime family) with a `CpuArch` (CPU architecture). This decouples the platform from the architecture, which were previously conflated in enum values like `android_arm64` and `darwin`.
chingjun
force-pushed
the
split-targetplatform
branch
from
July 24, 2026 06:06
3405b41 to
1b34e57
Compare
Contributor
Author
|
@bkonyi This PR needs a reapproval after rebase. Thanks! |
bkonyi
approved these changes
Jul 29, 2026
Contributor
Author
|
Reason for revert: Broke postsubmit test. See #190252 |
Contributor
|
Successfully created revert PR: #190258 |
pull Bot
pushed a commit
to Mu-L/flutter
that referenced
this pull request
Jul 30, 2026
…r#190258) Reverts: [Split the platform and cpuArch part of TargetPlatform](flutter#189479) Initiated by: @chingjun Reason for reverting: Broke postsubmit test. See flutter#190252 Original PR Author: @chingjun Reviewed By: @bkonyi The original PR description is provided below: Convert `enum TargetPlatform` into a class with two fields: `TargetPlatformType` and `CpuArch`. Fixes: flutter#190252
This was referenced Jul 30, 2026
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Convert
enum TargetPlatforminto a class with two fields:TargetPlatformTypeandCpuArch.