Skip to content
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

Limit auto-detected docs in development pods to 100 #11766

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

radex
Copy link
Contributor

@radex radex commented Feb 11, 2023

See: #11753

TL;DR:

  • In Development Pods, CP will try to auto-detect docs files, and add them to Pods/Development Pods/NAME/Pod/ group in Xcode
  • This might be helpful if there's a few files, but trying to add an unlimited number of files (that are just there for a convenience and not required to build the app) to an Xcode project is not a good idea. In my case, I had a docs-website folder, containing 30k files in its node_modules.
  • Besides bloating Xcodeproj, a very large number of files can cause Xcodeproj's UUID generator to exhaust all system resources and cause a kernel panic ;) Surely that could be improved, but I don't think we should be adding an arbitrary number of docs files to Xcodeproj anyway.

@dnkoutso
Copy link
Contributor

dnkoutso commented Feb 11, 2023

This seems quite arbitrary in my opinion. I would perhaps provide an option in the podfile to globally ignore those or a per-pod configuration:

install! 'cocoapods', skip_developer_files: true

or per-pod:

pod 'MyPod', :skip_developer_files => true

or something like that.

@radex
Copy link
Contributor Author

radex commented Feb 13, 2023

I agree that the exact number is arbitrary.

My main counterpoint is that this implicit behavior can break pod install in a way that's very hard to debug, or could bloat the Xcode project to the point where it's very unwieldy - without the user even noticing.

For some sufficiently large number of documentation files (100? 1000?), it will be very unlikely that the user actually intended this to happen, especially that it only happens for development pods, and has no impact on the build.

If you still disagree, then I would propose a compromise in which docs are not arbitrarily limited, but a warning is emitted above 100 auto-detected docs so the user knows to use skip_developer_files: true

@philips77
Copy link

I just encountered the issue. Docs generated with DocC have thousands of files and the generated Pods.xcodeproj/project.pbxproj is 4.5 MB long, which makes Xcode's new Source Control navigator unusable. Waiting time to even display the changes is counted in minutes on MacBook Pro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants