-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[mcp] fix issue where crashlytics isn't detected for ios apps that use project.pbxproj #9515
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
Merged
+25
−0
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| - Fixed issue where MCP server didn't detect if iOS app uses Crashlytics in projects that use `project.pbxproj` (#9515) |
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
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
Oops, something went wrong.
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.
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.
This block of code is nearly identical to the three preceding blocks that check for other file types. This code repetition makes the function less maintainable and can be inefficient as it checks for each file type sequentially.
To improve this, you could refactor the logic to avoid code duplication and improve performance by reading files in parallel. This would make
iosAppUsesCrashlyticsmore concise, performant, and easier to extend.For example, you could refactor the function to something like this:
While this refactoring is larger than the current change, it would significantly improve the quality of this function.
Uh oh!
There was an error while loading. Please reload this page.
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.
I don't love Gemini's approach, but we could concat all of the detected files into a single list and loop over that single list. Not a blocking comment, but might be a nice clean up.
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.
Thanks for the feedback! Going to go ahead and merge this for now, and will work on the clean up in another PR. Just to verify the process, do we want to first detect each file then read through each one? so it would be something like
I think it would be better if we do something like the current implementation since we can return early once we read the file has Crashlytics
Let me know if I misunderstood anything here.
Uh oh!
There was an error while loading. Please reload this page.
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.
I was suggesting the first one --
Detect Podfile
Detect Package.swift
Detect Cartfile*
Detect project.pbxproj
Read Podfile // If using pods, will exit here
Read Package.swift
Read Cartfile*
Read project.pbxproj
The file detection is just looking matching file names. It is slightly less efficient in that we are going to try to detect all the different file patterns, but we still have the opportunity to exit early if we find what we are looking for. It would make the code a lot cleaner because it would be something like --
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.
Thanks, this definitely does look cleaner. I will work on this!