Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
1c4128c7
Unverified
Commit
1c4128c7
authored
Dec 21, 2021
by
Chris Yang
Committed by
GitHub
Dec 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xcode error message (#94747)
parent
710502c4
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
664 additions
and
1502 deletions
+664
-1502
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+132
-63
simulators.dart
packages/flutter_tools/lib/src/ios/simulators.dart
+1
-0
xcresult.dart
packages/flutter_tools/lib/src/ios/xcresult.dart
+2
-25
build_ios_test.dart
...er_tools/test/commands.shard/hermetic/build_ios_test.dart
+276
-2
build_ipa_test.dart
...er_tools/test/commands.shard/hermetic/build_ipa_test.dart
+166
-17
ios_device_start_nonprebuilt_test.dart
.../general.shard/ios/ios_device_start_nonprebuilt_test.dart
+2
-0
xcresult_test.dart
...s/flutter_tools/test/general.shard/ios/xcresult_test.dart
+3
-44
xcresult_test_data.dart
...tter_tools/test/general.shard/ios/xcresult_test_data.dart
+82
-1351
No files found.
packages/flutter_tools/lib/src/ios/mac.dart
View file @
1c4128c7
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/ios/simulators.dart
View file @
1c4128c7
...
@@ -545,6 +545,7 @@ class IOSSimulator extends Device {
...
@@ -545,6 +545,7 @@ class IOSSimulator extends Device {
deviceID:
id
,
deviceID:
id
,
);
);
if
(!
buildResult
.
success
)
{
if
(!
buildResult
.
success
)
{
await
diagnoseXcodeBuildFailure
(
buildResult
,
globals
.
flutterUsage
,
globals
.
logger
);
throwToolExit
(
'Could not build the application for the simulator.'
);
throwToolExit
(
'Could not build the application for the simulator.'
);
}
}
...
...
packages/flutter_tools/lib/src/ios/xcresult.dart
View file @
1c4128c7
...
@@ -78,31 +78,8 @@ class XCResult {
...
@@ -78,31 +78,8 @@ class XCResult {
/// Parse the `resultJson` and stores useful informations in the returned `XCResult`.
/// Parse the `resultJson` and stores useful informations in the returned `XCResult`.
factory
XCResult
({
required
Map
<
String
,
Object
?>
resultJson
,
List
<
XCResultIssueDiscarder
>
issueDiscarders
=
const
<
XCResultIssueDiscarder
>[]})
{
factory
XCResult
({
required
Map
<
String
,
Object
?>
resultJson
,
List
<
XCResultIssueDiscarder
>
issueDiscarders
=
const
<
XCResultIssueDiscarder
>[]})
{
final
List
<
XCResultIssue
>
issues
=
<
XCResultIssue
>[];
final
List
<
XCResultIssue
>
issues
=
<
XCResultIssue
>[];
final
Object
?
actionsMap
=
resultJson
[
'actions'
];
if
(
actionsMap
==
null
||
actionsMap
is
!
Map
<
String
,
Object
?>)
{
final
Object
?
issuesMap
=
resultJson
[
'issues'
];
return
XCResult
.
failed
(
errorMessage:
'xcresult parser: Failed to parse the actions map.'
);
}
final
Object
?
actionValueList
=
actionsMap
[
'_values'
];
if
(
actionValueList
==
null
||
actionValueList
is
!
List
<
Object
?>
||
actionValueList
.
isEmpty
)
{
return
XCResult
.
failed
(
errorMessage:
'xcresult parser: Failed to parse the actions map.'
);
}
final
Object
?
actionMap
=
actionValueList
.
first
;
if
(
actionMap
==
null
||
actionMap
is
!
Map
<
String
,
Object
?>)
{
return
XCResult
.
failed
(
errorMessage:
'xcresult parser: Failed to parse the first action map.'
);
}
final
Object
?
buildResultMap
=
actionMap
[
'buildResult'
];
if
(
buildResultMap
==
null
||
buildResultMap
is
!
Map
<
String
,
Object
?>)
{
return
XCResult
.
failed
(
errorMessage:
'xcresult parser: Failed to parse the buildResult map.'
);
}
final
Object
?
issuesMap
=
buildResultMap
[
'issues'
];
if
(
issuesMap
==
null
||
issuesMap
is
!
Map
<
String
,
Object
?>)
{
if
(
issuesMap
==
null
||
issuesMap
is
!
Map
<
String
,
Object
?>)
{
return
XCResult
.
failed
(
return
XCResult
.
failed
(
errorMessage:
'xcresult parser: Failed to parse the issues map.'
);
errorMessage:
'xcresult parser: Failed to parse the issues map.'
);
...
...
packages/flutter_tools/test/commands.shard/hermetic/build_ios_test.dart
View file @
1c4128c7
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/commands.shard/hermetic/build_ipa_test.dart
View file @
1c4128c7
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/general.shard/ios/ios_device_start_nonprebuilt_test.dart
View file @
1c4128c7
...
@@ -58,6 +58,8 @@ const List<String> kRunReleaseArgs = <String>[
...
@@ -58,6 +58,8 @@ const List<String> kRunReleaseArgs = <String>[
'id=123'
,
'id=123'
,
'ONLY_ACTIVE_ARCH=YES'
,
'ONLY_ACTIVE_ARCH=YES'
,
'ARCHS=arm64'
,
'ARCHS=arm64'
,
'-resultBundlePath'
,
'/.tmp_rand0/flutter_ios_build_temp_dirrand0/temporary_xcresult_bundle'
,
'-resultBundleVersion'
,
'3'
,
'FLUTTER_SUPPRESS_ANALYTICS=true'
,
'FLUTTER_SUPPRESS_ANALYTICS=true'
,
'COMPILER_INDEX_STORE_ENABLE=NO'
,
'COMPILER_INDEX_STORE_ENABLE=NO'
,
];
];
...
...
packages/flutter_tools/test/general.shard/ios/xcresult_test.dart
View file @
1c4128c7
...
@@ -240,58 +240,17 @@ void main() {
...
@@ -240,58 +240,17 @@ void main() {
'xcresult parser: Unrecognized top level json format.'
);
'xcresult parser: Unrecognized top level json format.'
);
});
});
testWithoutContext
(
'error: fail to parse
actions
map'
,
()
async
{
testWithoutContext
(
'error: fail to parse
issue
map'
,
()
async
{
final
XCResultGenerator
generator
=
_setupGenerator
(
resultJson:
'{}'
);
final
XCResultGenerator
generator
=
_setupGenerator
(
resultJson:
'{}'
);
final
XCResult
result
=
await
generator
.
generate
();
final
XCResult
result
=
await
generator
.
generate
();
expect
(
result
.
issues
.
length
,
0
);
expect
(
result
.
issues
.
length
,
0
);
expect
(
result
.
parseSuccess
,
false
);
expect
(
result
.
parseSuccess
,
false
);
expect
(
result
.
parsingErrorMessage
,
expect
(
result
.
parsingErrorMessage
,
'xcresult parser: Failed to parse the actions map.'
);
'xcresult parser: Failed to parse the issues map.'
);
});
testWithoutContext
(
'error: empty actions map'
,
()
async
{
final
XCResultGenerator
generator
=
_setupGenerator
(
resultJson:
kSampleResultJsonEmptyActionsMap
);
final
XCResult
result
=
await
generator
.
generate
();
expect
(
result
.
issues
.
length
,
0
);
expect
(
result
.
parseSuccess
,
false
);
expect
(
result
.
parsingErrorMessage
,
'xcresult parser: Failed to parse the actions map.'
);
});
testWithoutContext
(
'error: empty actions map'
,
()
async
{
final
XCResultGenerator
generator
=
_setupGenerator
(
resultJson:
kSampleResultJsonEmptyActionsMap
);
final
XCResult
result
=
await
generator
.
generate
();
expect
(
result
.
issues
.
length
,
0
);
expect
(
result
.
parseSuccess
,
false
);
expect
(
result
.
parsingErrorMessage
,
'xcresult parser: Failed to parse the actions map.'
);
});
testWithoutContext
(
'error: empty actions map'
,
()
async
{
final
XCResultGenerator
generator
=
_setupGenerator
(
resultJson:
kSampleResultJsonInvalidActionMap
);
final
XCResult
result
=
await
generator
.
generate
();
expect
(
result
.
issues
.
length
,
0
);
expect
(
result
.
parseSuccess
,
false
);
expect
(
result
.
parsingErrorMessage
,
'xcresult parser: Failed to parse the first action map.'
);
});
testWithoutContext
(
'error: empty actions map'
,
()
async
{
final
XCResultGenerator
generator
=
_setupGenerator
(
resultJson:
kSampleResultJsonInvalidBuildResultMap
);
final
XCResult
result
=
await
generator
.
generate
();
expect
(
result
.
issues
.
length
,
0
);
expect
(
result
.
parseSuccess
,
false
);
expect
(
result
.
parsingErrorMessage
,
'xcresult parser: Failed to parse the buildResult map.'
);
});
});
testWithoutContext
(
'error:
empty actions
map'
,
()
async
{
testWithoutContext
(
'error:
invalid issue
map'
,
()
async
{
final
XCResultGenerator
generator
=
_setupGenerator
(
resultJson:
kSampleResultJsonInvalidIssuesMap
);
final
XCResultGenerator
generator
=
_setupGenerator
(
resultJson:
kSampleResultJsonInvalidIssuesMap
);
final
XCResult
result
=
await
generator
.
generate
();
final
XCResult
result
=
await
generator
.
generate
();
...
...
packages/flutter_tools/test/general.shard/ios/xcresult_test_data.dart
View file @
1c4128c7
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment