Swift 包管理器无法解析依赖项:文件系统中已存在工件。致命错误

发布于 2025-01-09 09:51:45 字数 654 浏览 0 评论 0原文

我已将二进制工件上传到 maven-central 存储库中。我正在通过 SPM 获取这些库。我大多数时候都会收到以下错误。

xcodebuild: error: Could not resolve package dependencies:
failed downloading which is required by binary target: 
DerivedData/SourcePackages/artifacts/MyLib/MyLib.xcframework.zip already exists in file system. fatalError

我的 Swift 包清单目标如下:

 targets: [
        // ---- Binaries -----
        .binaryTarget(
            name: "MyLib",
            url: "\(myPrivateArtefactURL)/MyLib.xcframework.zip",
            checksum: "checksum"
        )
    ]

但是,如果我手动删除 artficats 文件夹并运行解析依赖项命令,依赖项就会得到解决。我不明白有什么问题?我想摆脱这种手动删除文件夹的情况。

I have uploaded my binary artifacts in maven-central repository. I am fetching these libraries through SPM. I am getting the below error most of the times.

xcodebuild: error: Could not resolve package dependencies:
failed downloading which is required by binary target: 
DerivedData/SourcePackages/artifacts/MyLib/MyLib.xcframework.zip already exists in file system. fatalError

My Swift package manifest targets as below:

 targets: [
        // ---- Binaries -----
        .binaryTarget(
            name: "MyLib",
            url: "\(myPrivateArtefactURL)/MyLib.xcframework.zip",
            checksum: "checksum"
        )
    ]

However dependencies are getting resolved if I delete artficats folder manually and run the resolving dependencies command. I am not understanding what is the problem?. I want to get rid off this manually deleting the folder.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文