project.xcproj: unresolvedPackage when a repository URL ends in an extension other than .git
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- swift
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Bắt đầu với XCRemoteSwiftPackageReference.name, sau đó theo dõi cách XCProjDecoder.makePackageProductDependency sử dụng packagesByName và cách encoder suy ra tên gói. Tái hiện lỗi với URL kho lưu trữ kết thúc bằng .ios_sdk; công việc hoàn tất khi dự án tải được và cách xử lý danh tính gói khớp với việc SwiftPM loại bỏ toàn bộ phần mở rộng đường dẫn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Decoding a project.xcproj fails with XCProjError.unresolvedPackage when a remote package's repository URL ends in a path extension other than .git. Xcode 27.2 writes the package's SwiftPM identity into package-product-members, but XCProjDecoder looks packages up by XCRemoteSwiftPackageReference.name, which only strips .git.
Reproduction
- Add
https://github.com/Ometria/ometria.ios_sdkas a package dependency in an Xcode project. - Convert it with
xcodebuild -project App.xcodeproj -convert-project "Xcode Project"(or the Project Format menu in Xcode 27.2). - Load the project with XcodeProj (we hit it through Periphery).
The converted file contains:
"packages": [
{
"kind": "remote",
"repository": "https://github.com/Ometria/ometria.ios_sdk",
"version": { "up-to-next-major-version": "1.9.1" },
},
],
...
"package-product-members": [
{
"package": "ometria",
"product-name": "Ometria",
"build-phase": { "build-phase": "frameworks" },
},
],
Actual
Error: (XCProjError) The project has no Swift package named 'ometria'
Expected
The project loads. Xcode and xcodebuild -list read the same file without problems.
Cause
XCRemoteSwiftPackageReference.name is:
repositoryURL?.split(separator: "/").last?.replacingOccurrences(of: ".git", with: "")
which gives ometria.ios_sdk. Xcode drops the whole path extension, as SwiftPM does when deriving a package identity from a URL, giving ometria. Other packages in the same project keep their casing (MobileSDK-iOS), so only the extension handling differs. XCProjDecoder.makePackageProductDependency then misses packagesByName["ometria"].
Deriving the name used by packagesByName (and by the encoder) with the path extension removed, instead of only .git, would fix it.
Environment
- Xcode 27.2 (27B52)
- Periphery 1.0.0.beta.9 with XcodeProj's
project.xcprojsupport
- Ngôn ngữ chính
- Swift
- Star
- 2.2k
- Fork
- 356
- Merge trung bình
- 4 giờ 48 phút
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tuist/XcodeProj
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
tuist/XcodeProj#1198 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
New Xcode 26 formatĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
tuist/XcodeProj#1137 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
tuist/XcodeProj#1154 · 2 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Removing a target referenced by PBXFileSystemSynchronizedBuildFileExceptionSet crashes serializationĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
tuist/XcodeProj#1093 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
PBXProjEncoder crashes when sorting projectReferences if ProjectRef file element has nil nameCó thể đã có người làm @Ant-tree đã nhận 269 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
tuist/XcodeProj#1055 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của tuist/XcodeProj
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
jhomlala/betterplayer#1646 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
amplitude/Amplitude-Flutter#337 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
sk3llo/ffmpeg_kit_flutter#176 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
google-pay/flutter-plugin#343 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
googleads/googleads-mobile-flutter#1541 ·
Maintainer thường phản hồi trong vòng 4 ngày