-
Notifications
You must be signed in to change notification settings - Fork 63
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
High Xcode CPU usage #2
Comments
I'm not sure TBH, what Xcode does is a bit of a black box. I also can't open that project file, I assume because it's made using the Xcode beta (which I don't have yet). What I did notice is that your Another note: your swiftgen config looks wrong as well, those paths, such as Edit: what do you mean with "add the package locally"? |
Hi! Thank you for your reply. I think the place of my By "add the package locally" I mean to remove the remote dependency Thank you for your time and help! |
I have a similar problem with Xcode having high cpu usage when I add the package as a dependency. My guess is that it might be an issue with the artifactbundle (or an Xcode bug), because when I unfold the plugin in the package dependencies in the navigator the downloaded artifactbundle blinks in and out of existance as if it is repeatedly getting deleted and redownloaded. When selecting the package.swift file the organizer is also blinking. This also happens when using another plugin https://github.com/lukepistrol/SwiftLintPlugin who also uses a remote artifactbundle, so it might very well be an Xcode issue. I tested it with Xcode 13.4, Xcode 13.4.1 and Xcode 14.0 beta 5. |
I am also experiencing this issue, which seems to clearly an issue with Xcode itself. Adding the plugin will immediately set CPU usage at 130%. Tested on Xcode 13.x and Xcode 14 betas. |
Adding the artifactbundle to the package and referencing it locally "solves" the issue. But of course that would not be as elegant as having a remote dependency. |
If anyone is using the temporary workaround from DroidKaigi/conference-app-2022#88, please note that in Xcode 14 you have to add |
Temporary workaround because of a bug in SwiftGenPlugin with XCode 14. SwiftGen/SwiftGenPlugin#2
Looks like this has been resolved in Xcode 14.1 |
I just created a Swift Package with SwiftGenPlugin as a dependency and build plugin. I am still getting the high cpu in Xcode 14.2, but that is only when I first open the project. Xcode shows a beachball cursor for about 10 secs before being done with whatever it's doing. My guess is that it's compiling the xcasset catalog and running SwiftGen. Not ideal, but I don't think there is anything that this project can do about it. I think it's a requirement to have the build plugins works better in the background when it's setup as a pre-build Swift Package plugin. |
Hey!
First of all I wanted to thank you for providing an official plugin 🤗
When I add the plugin via the remote dependency,
the CPU usage of Xcode rises constantly to 100%+. In contrast, when I add the package locally all is fine.
I created a minimal example to show the problem.
SwiftgenSPM.zip
Do you have any ideas where the problem could lie?
Thanks for everything, have a nice day,
Arsatius
The text was updated successfully, but these errors were encountered: