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

Xcode hanging when applying a plugin to many package targets #6543

Closed
berlisa opened this issue May 11, 2023 · 6 comments
Closed

Xcode hanging when applying a plugin to many package targets #6543

berlisa opened this issue May 11, 2023 · 6 comments
Assignees
Labels

Comments

@berlisa
Copy link

berlisa commented May 11, 2023

Description

I'm trying to add a plugin as a BuildTool Plug-In in our packages.
Our project has some packages and multiple targets (> 75)
When I add the plugin to every package target and build the project - it freezes the Xcode build while building the project. It happens with Xcode and the xcodebuild command.


I generated a dummy buildTool plugin(without functionality) add added the dummy plugin to our targets and build the project
In our project the build is working when we use the plugin in <= 73 targets.. more targets with the plugin (> 73) freezes the build. It seems that Xcode(build) has a problem with to many plugins used in targets.

Expected behavior

Xcode build is working when using plugins in many targets. (>73)

Actual behavior

Xcode build hangs/freezes when using plugins in many targets (>73)

Steps to reproduce

  1. Generate a project with many package targets (ca 100)
  2. generate a dummy buildTool plugin (without functionality)
  3. add the dummy plugin to all targets
  4. build the project in Xcode or xcodebuild
  5. the build is hanging and Xcode freezes

Swift Package Manager version/commit hash

Xcode 14.3

Swift & OS version (output of swift --version ; uname -a)

swift-driver version: 1.75.2 Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100)
Target: arm64-apple-macosx13.0
Darwin IUGMPY4Y49DX62 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 arm64

@berlisa berlisa added the bug label May 11, 2023
@berlisa berlisa changed the title Xcode hanging when applying a plugin to many targets Xcode hanging when applying a plugin to many package targets May 11, 2023
@MaxDesiatov
Copy link
Member

MaxDesiatov commented May 11, 2023

Is this reproducible for you when using swift build from the command line? If not, I believe this issue should be closed here since it's specific to Xcode, for which issues are tracked in Feedback Assistant not GitHub.

@neonichu
Copy link
Member

cc @abertelrud

@berlisa
Copy link
Author

berlisa commented May 15, 2023

I made a new Package with 80 package targets and each target has a dummy plugin dependency.
-> the command swift build works.
-> but Xcode(build) is freezing
-> So it seems that is a Xcode bug.. i will make a report at the Feedback Assistant.
Thank you

@berlisa berlisa closed this as completed May 15, 2023
@iwb-gregory-gyselinck
Copy link

It seems there is no more limitation in Xcode 15.0 🎉

@joshuawright11
Copy link

joshuawright11 commented Oct 17, 2023

Unfortunately still getting this error; hangs / beach balls for 5-10 seconds before each build on a project with ~100 packages, even if the plugin does nothing.

Xcode Version 15.0 (15A240d)

@joshuawright11
Copy link

While I know this is an Xcode issue, the feedback assistant is unfortunately a black box.

I'm curious if anyone has found a workaround.

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

No branches or pull requests

5 participants