Skip to content

[Bug] 由于近期重新打 Tag (Retag) 导致 AgoraRtcEngine_iOS 4.6.2 版本出现 SwiftPM 哈希校验/Revision 不匹配错误 #68

Description

@waitwalker

Describe the bug
官方对已经发布的历史版本 Tag(特别是 4.6.2)执行了强推(Force Push/Retag)操作,导致 Swift Package Manager (SPM) 依赖解析冲突,从而彻底阻断了 iOS 项目的正常编译。
由于 4.6.2 的 Tag 被重新指向了新的提交(db11601e5cc10e74d4f03157c063711156838e75),导致曾经拉取解析过该版本、本地已记录哈希指纹为 94a477c 的开发机器再次拉取时,触发了 SPM 安全校验的篡改警告,报错 Revision ... does not match previously recorded value 并终止构建。

To Reproduce
Steps to reproduce the behavior:

  1. 通过 Swift Package Manager 引入 AgoraRtcEngine_iOS,版本限制解析到 4.6.2。
  2. 运行 xcodebuild -resolvePackageDependencies(或在 Xcode 中解析依赖包)。
  3. 如果本地环境曾成功拉取过旧版 4.6.2,由于指纹与远端冲突,编译直接报错中断。
  4. 报错日志如下:
xcodebuild: error: Could not resolve package dependencies:
  Revision db11601e5cc10e74d4f03157c063711156838e75 for agorartcengine_ios remoteSourceControl https://github.com/AgoraIO/AgoraRtcEngine_iOS.git version 4.6.2 does not match previously recorded value 94a477c69f9ad730e2225f54948e87f9f4d77c24

Expected behavior
在公共依赖管理中,已经发布过的 Git Tags 应当是绝对不可变的(Immutable)。如果为了适配最新的 SwiftPM 需要对历史版本的 Package.swift 进行修改,应当通过发布新的 patch 版本(例如 4.6.3)来解决,而绝不应当强推并覆盖已有的 Tag。

Screenshots
(无)

Desktop (please complete the following information):

  • OS: macOS (Xcode 15 / 16, SwiftPM 5.9+)
  • Browser: 无
  • Version: 无

Smartphone (please complete the following information):

  • Device: 模拟器/真机
  • OS: iOS
  • Browser: 无
  • Version: 无

Additional context
此问题是由贵司近期提交的以下 commit 引入的:

Retag historical SwiftPM package manifest to use SwiftPM 5.3 exact dependency requirements.

虽然此修改的本意是好的(为了让旧版本兼容最新的编译环境),但直接对已有 Tag 强推的操作直接破坏了语义化版本(SemVer)的一致性,并在客户端触发了安全防篡改拦截,建议撤销此次 Retag 并通过发布新补丁版本解决。

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions