-
Notifications
You must be signed in to change notification settings - Fork 29.8k
refactor cocoapods validator to detect broken install #38560
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
refactor cocoapods validator to detect broken install #38560
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. While there are exceptions to this rule, if this patch modifies code it is probably not an exception. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
4bc1133 to
51561ef
Compare
Codecov Report
@@ Coverage Diff @@
## master #38560 +/- ##
==========================================
+ Coverage 56.34% 56.63% +0.29%
==========================================
Files 195 195
Lines 18355 18363 +8
==========================================
+ Hits 10342 10400 +58
+ Misses 8013 7963 -50
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #38560 +/- ##
==========================================
- Coverage 56.34% 56.12% -0.23%
==========================================
Files 195 195
Lines 18355 18362 +7
==========================================
- Hits 10342 10305 -37
- Misses 8013 8057 +44
Continue to review full report at Codecov.
|
| } else if (cocoaPodsStatus == CocoaPodsStatus.brokenInstall) { | ||
| status = ValidationType.missing; | ||
| messages.add(ValidationMessage.error( | ||
| userMessages.cocoaPodsBrokenInstall(brokenCocoaPodsConsequence, cocoaPodsInstallInstructions))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nit: considering making cocoaPodsBrokenInstall if the consequence and instructions don't change.
blasten
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
jmagman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nit
|
|
||
| const String brokenCocoaPodsConsequence = ''' | ||
| You appear to have CocoaPods installed but it is not working. | ||
| This can happen if the version of ruby that CocoaPods was installed with is different from the one being used to invoke it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ruby capitalized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Description
When CocoaPods are installed they are dependent on a specific version of ruby. If the
podscript is invoked while a different version of ruby is set as the default, it will fail with an error message. The most common cause for this is upgrading macOS, which changes the system ruby version, however it can happen in other situations (the most annoying of which is the RVM situation).sudo gem install cocoapodswill usually fix this, but I added a link to the issue which has various variations of fixes.Related Issues
Fixes this issue.
Tests
I added the following tests:
Replace this with a list of the tests that you added as part of this PR. A change in behaviour with no test covering it
will likely get reverted accidentally sooner or later. PRs must include tests for all changed/updated/fixed behaviors. See [Test Coverage].
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?