Saj*_*jon 82 xcode swift swift-package-manager matlab-spm xcode13
刚刚升级到 Xcode 13.3 beta 3(从 Xcode 13.2.1)并运行swift package init. 它生成了一个弃用警告,我以前没有见过这个:
warning: Usage of /Users/sajjon/Library/org.swift.swiftpm/collections.json has been deprecated. Please delete it and use the new /Users/sajjon/Library/org.swift.swiftpm/configuration/collections.json instead.\nRun Code Online (Sandbox Code Playgroud)\n但我不知道如何“使用新的......代替”?事实上我什至不知道它是如何或何时org.swift.swiftpm/collections.json创建的。
该怎么办?
\n完整打印:
\n~/Developer/DeleteMe \xe2\x8c\x9a 13:57:37\n$ swift package init\n2022-02-25 13:57:42.211 xcodebuild[54679:13318505] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore\n2022-02-25 13:57:42.212 xcodebuild[54679:13318505] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore\n2022-02-25 13:57:43.052 xcodebuild[54754:13318823] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore\n2022-02-25 13:57:43.053 xcodebuild[54754:13318823] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore\nwarning: Usage of /Users/sajjon/Library/org.swift.swiftpm/collections.json has been deprecated. Please delete it and use the new /Users/sajjon/Library/org.swift.swiftpm/configuration/collections.json instead.\nCreating library package: DeleteMe\nRun Code Online (Sandbox Code Playgroud)\n
小智 124
我安装 Xcode 14.0 后遇到了这个问题。删除org.swift.swiftpm对我有用:
确保与 SPM 相关的任何内容都没有运行,包括 Xcode。在删除任何内容之前将其全部关闭。
转到目录并删除整个org.swift.swiftpm目录(不仅是collection目录,而是整个org.swift.swiftpm目录),如果还有org.swift.swiftpm.lock,也删除该目录。
Nik*_*ikR 22
该警告表明您需要删除该文件。
Please delete it and use the new /Users/sajjon/Library/org.swift.swiftpm/configuration/collections.json instead.
Run Code Online (Sandbox Code Playgroud)
所以请删除它,这会有帮助。
Jav*_*olo 13
根据 @jalone 的评论,这可能会导致 Xcode 在打开项目时崩溃。在我的例子中它没有这样做,但我拥有的只是通用的苹果集合:https://developer.apple.com/swift/packages/collections/apple.json
谨慎行事
看起来我需要做的就是运行这个来消除警告。
rm ~/.swiftpm/config/collections.json
Run Code Online (Sandbox Code Playgroud)
应该有一个额外的collections.json位置,~/.swiftpm/config/configuration/collections.json即您使用时现在存储包的位置
swift package-collection add <package.json>
Run Code Online (Sandbox Code Playgroud)
有关更多信息,请参阅此处的SE 提案文档
| 归档时间: |
|
| 查看次数: |
11617 次 |
| 最近记录: |