![]() ![]() However, that's not even the worst part, performing simple and common operations such as adding a file to a package target cause Xcode to start resolving again! When the 'Resolve Packages' occurs, Xcode again hangs (beach balls) for 2-3s. Xcode has even started to hang (~10s) when being closed (could be unrelated). We don't have ANY remote dependencies and it can take upwards of 20 seconds to resolve our manifest, which as of today has 10 products and ~20 targets, and depends on one local package that contains 2 products and 2 targets. With Xcode 14.1, resolving packages from the command line does nothing, and Xcode completely hangs and beach balls for ~5-20s to resolve LOCAL packages when opening Xcode. Previously in Xcode 13, we were able to resolve the package(s) in our workspace from the command line to prevent Xcode from spinning upon opening. Primary issue: 'Resolve packages.' destroys developer productivity. The 'Create Build Description' in Xcode has seemingly gotten slower now that we've started using SPM (I cannot however verify SPM is to blame). We ended up reading a JSON file that only existed in CI from the Package manifest to enable "treat warnings as errors" to preclude an influx of warnings slinking in a complete hack for something that Xcode has supported for decades. We use test plans to build and test our packages which means we don't build our packages via swift package. SPM does not provide an acceptable way to do this-especially if you are using SPM in a monorepo for iOS. We use these extensively to toggle settings such as "treat warnings as errors", "warn about type long type checking", etc. With an Xcode project, you can configure your targets to be built differently depending on the environment via xcconfig files. We integrate them into SPM using local binaries this provided stability, an incredible performance boost, and developer productivity increase but also disenchantment. Instead, we went back to using Carthage to download our external dependencies. The performance, hidden and bizarre errors, poor caching, and developer support led to us ditching remote dependencies completely. ![]() The number of 'resolve' issues related to SPM failing to download remote dependencies due to SSH, Git, cache, random resolve errors, etc. SPM is categorically untenable for external (remote) dependency management in medium-sized and larger projects I won't get into the myriad of issues, but here are them at a high level: ![]() Surprisingly, upgrading to Xcode14.1 has only made it worse. Fast-forward to today and it's been arguably one of the most painful and frustrating experiences in my career. Essentially, all of our shared frameworks. Therefore, like many, we thought SPM with its abstracted and simplified module management would be a viable solution to modularization in our sprawling codebase!Īfter a cursory spike, we started migrating our 'core' frameworks at the root of the dependency tree into a single SPM package located at the root of the repository. I work in a corpulent iOS monorepo with 100s of Xcode projects in an Xcode workspace, and maintaining these has been a tedious task (custom scripts to update dependencies, framework references, sort project files, etc).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |