SwiftLintPlugin icon indicating copy to clipboard operation
SwiftLintPlugin copied to clipboard

Very high CPU usage after adding the plugin to my Swift Package

Open vrijmaCoffeeIT opened this issue 1 year ago • 3 comments

Whenever I add the Swift Package Plugin to my Swift Package Xcode CPU maxes out and I basically can't edit any code anymore because it lags constantly. I have found other people having the same issue with other Plugins as well.

For instance here with SwiftGenPlugin https://github.com/SwiftGen/SwiftGenPlugin/issues/2

In this issue someone refers to issues with this SwiftLintPlugin as well. They say it might have something to do with a remote artifactbundle. I don't know what that means and how to resolve the issue. Unfortunately this means for me that the plugin currently is unusable.

I have tested it and the plugin itself works fine. I am seeing al my linting issues in Xcode properly whenever I build.

I have tested this on the official Xcode 14.0 release: Version 14.0 (14A309)

vrijmaCoffeeIT avatar Sep 16 '22 08:09 vrijmaCoffeeIT

Interesting, I never had issues yet but I will try to replicate the issue on my machines.

lukepistrol avatar Sep 16 '22 08:09 lukepistrol

I am using macOS 12.5.1 (21G83) on MacBook Pro (16-inch, 2019) so not an M1 Mac. In case that is related to the issue somehow

vrijmaCoffeeIT avatar Sep 16 '22 09:09 vrijmaCoffeeIT

This is an issue with Xcode 14 which seems to be fixed as of Xcode 14.1. See this thread I opened on the official SPM Slack for reference (and feedback from Apple engineers): https://swiftpm.slack.com/archives/C03KDH2BQUD/p1662193380203299

simba909 avatar Sep 26 '22 07:09 simba909

I can confirm that this will be resolved in Xcode 14.1

lukepistrol avatar Oct 28 '22 10:10 lukepistrol