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
325cfb0f
Unverified
Commit
325cfb0f
authored
Aug 14, 2021
by
Jenn Magder
Committed by
GitHub
Aug 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make doctor Xcode version requirement clearer (#88137)
parent
10aad08a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
13 deletions
+12
-13
user_messages.dart
packages/flutter_tools/lib/src/base/user_messages.dart
+7
-2
xcode_validator.dart
packages/flutter_tools/lib/src/macos/xcode_validator.dart
+2
-8
xcode_validator_test.dart
..._tools/test/general.shard/macos/xcode_validator_test.dart
+3
-3
No files found.
packages/flutter_tools/lib/src/base/user_messages.dart
View file @
325cfb0f
...
@@ -145,9 +145,14 @@ class UserMessages {
...
@@ -145,9 +145,14 @@ class UserMessages {
// Messages used in XcodeValidator
// Messages used in XcodeValidator
String
xcodeLocation
(
String
location
)
=>
'Xcode at
$location
'
;
String
xcodeLocation
(
String
location
)
=>
'Xcode at
$location
'
;
String
xcodeOutdated
(
String
currentVersion
,
String
recommend
edVersion
)
=>
String
xcodeOutdated
(
String
requir
edVersion
)
=>
'
Xcode
$currentVersion
out of date (
$recommendedVersion
is recommended)
.
\n
'
'
Flutter requires a minimum Xcode version of
$requiredVersion
.
\n
'
'Download the latest version or update via the Mac App Store.'
;
'Download the latest version or update via the Mac App Store.'
;
String
xcodeRecommended
(
String
recommendedVersion
)
=>
'Flutter recommends a minimum Xcode version of
$recommendedVersion
.
\n
'
'Download the latest version or update via the Mac App Store.'
;
String
get
xcodeEula
=>
"Xcode end user license agreement not signed; open Xcode or run the command 'sudo xcodebuild -license'."
;
String
get
xcodeEula
=>
"Xcode end user license agreement not signed; open Xcode or run the command 'sudo xcodebuild -license'."
;
String
get
xcodeMissingSimct
=>
String
get
xcodeMissingSimct
=>
'Xcode requires additional components to be installed in order to run.
\n
'
'Xcode requires additional components to be installed in order to run.
\n
'
...
...
packages/flutter_tools/lib/src/macos/xcode_validator.dart
View file @
325cfb0f
...
@@ -37,16 +37,10 @@ class XcodeValidator extends DoctorValidator {
...
@@ -37,16 +37,10 @@ class XcodeValidator extends DoctorValidator {
if
(!
_xcode
.
isInstalledAndMeetsVersionCheck
)
{
if
(!
_xcode
.
isInstalledAndMeetsVersionCheck
)
{
xcodeStatus
=
ValidationType
.
partial
;
xcodeStatus
=
ValidationType
.
partial
;
messages
.
add
(
ValidationMessage
.
error
(
_userMessages
.
xcodeOutdated
(
messages
.
add
(
ValidationMessage
.
error
(
_userMessages
.
xcodeOutdated
(
xcodeRequiredVersion
.
toString
())));
_xcode
.
currentVersion
.
toString
(),
xcodeRecommendedVersion
.
toString
(),
)));
}
else
if
(!
_xcode
.
isRecommendedVersionSatisfactory
)
{
}
else
if
(!
_xcode
.
isRecommendedVersionSatisfactory
)
{
xcodeStatus
=
ValidationType
.
partial
;
xcodeStatus
=
ValidationType
.
partial
;
messages
.
add
(
ValidationMessage
.
hint
(
_userMessages
.
xcodeOutdated
(
messages
.
add
(
ValidationMessage
.
hint
(
_userMessages
.
xcodeRecommended
(
xcodeRecommendedVersion
.
toString
())));
_xcode
.
currentVersion
.
toString
(),
xcodeRecommendedVersion
.
toString
(),
)));
}
}
if
(!
_xcode
.
eulaSigned
)
{
if
(!
_xcode
.
eulaSigned
)
{
...
...
packages/flutter_tools/test/general.shard/macos/xcode_validator_test.dart
View file @
325cfb0f
...
@@ -55,20 +55,20 @@ void main() {
...
@@ -55,20 +55,20 @@ void main() {
final
ValidationResult
result
=
await
validator
.
validate
();
final
ValidationResult
result
=
await
validator
.
validate
();
expect
(
result
.
type
,
ValidationType
.
partial
);
expect
(
result
.
type
,
ValidationType
.
partial
);
expect
(
result
.
messages
.
last
.
type
,
ValidationMessageType
.
error
);
expect
(
result
.
messages
.
last
.
type
,
ValidationMessageType
.
error
);
expect
(
result
.
messages
.
last
.
message
,
contains
(
'
Xcode 7.0.1 out of date (12.0.1 is recommended)
'
));
expect
(
result
.
messages
.
last
.
message
,
contains
(
'
Flutter requires a minimum Xcode version of 12.0.1
'
));
});
});
testWithoutContext
(
'Emits partial status when Xcode below recommended version'
,
()
async
{
testWithoutContext
(
'Emits partial status when Xcode below recommended version'
,
()
async
{
final
ProcessManager
processManager
=
FakeProcessManager
.
any
();
final
ProcessManager
processManager
=
FakeProcessManager
.
any
();
final
Xcode
xcode
=
Xcode
.
test
(
final
Xcode
xcode
=
Xcode
.
test
(
processManager:
processManager
,
processManager:
processManager
,
xcodeProjectInterpreter:
XcodeProjectInterpreter
.
test
(
processManager:
processManager
,
version:
Version
(
1
1
,
0
,
0
)),
xcodeProjectInterpreter:
XcodeProjectInterpreter
.
test
(
processManager:
processManager
,
version:
Version
(
1
2
,
0
,
1
)),
);
);
final
XcodeValidator
validator
=
XcodeValidator
(
xcode:
xcode
,
userMessages:
UserMessages
());
final
XcodeValidator
validator
=
XcodeValidator
(
xcode:
xcode
,
userMessages:
UserMessages
());
final
ValidationResult
result
=
await
validator
.
validate
();
final
ValidationResult
result
=
await
validator
.
validate
();
expect
(
result
.
type
,
ValidationType
.
partial
);
expect
(
result
.
type
,
ValidationType
.
partial
);
expect
(
result
.
messages
.
last
.
type
,
ValidationMessageType
.
hint
);
expect
(
result
.
messages
.
last
.
type
,
ValidationMessageType
.
hint
);
expect
(
result
.
messages
.
last
.
message
,
contains
(
'
Xcode 11.0.0 out of date (12.0.1 is recommended)
'
));
expect
(
result
.
messages
.
last
.
message
,
contains
(
'
Flutter recommends a minimum Xcode version of 12.0.2
'
));
},
skip:
true
);
// [intended] Unskip and update when minimum and required check versions diverge.
},
skip:
true
);
// [intended] Unskip and update when minimum and required check versions diverge.
testWithoutContext
(
'Emits partial status when Xcode EULA not signed'
,
()
async
{
testWithoutContext
(
'Emits partial status when Xcode EULA not signed'
,
()
async
{
...
...
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