Objective-C: follow-ups from the WPLog migration (#26259)
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- ios, objective-c, swift
- Lĩnh vực
- mobile
Hướng nghiên cứu
Start with CommentService.m and inspect setHierarchyAndDepthOnComment:withParentComment: and its two callers to confirm when the placeholder ID is assigned. Then review the listed -Wnonnull call sites in MediaService, SafariActivity, MenuPostService, and MenusViewController; build the app target with -Werror=format to check the warnings are resolved. Done when posted replies use their real IDs, new replies sort after existing IDs, and the listed warnings are addressed.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problems found while moving Objective-C logging to WPLog* in #26259. None of them block that PR. They're existing bugs outside the logging change, found by a -Werror=format build and by reading CommentService.
-
setHierarchyAndDepthOnComment:withParentComment:always uses the placeholder comment ID.
InCommentService.m,if (commentID != 0)compares theNSNumberobject to 0, not its value, so the check is always true. The comment above it says only new, unsent comments (ID 0) should get the placeholder9999999, so they sort last among their siblings. Instead every comment going through this method gets it.Two callers are affected:
createHierarchicalCommentWithContent:withParent:postID:siteID:inContext:, for a new local reply. Here the placeholder is intended.updateHierarchicalComment:withRemoteComment:, after the server returns the posted reply with its real ID. Here the real ID should be used.
So a posted reply probably keeps a
…0009999999ordering key until the next full sync (hierarchyFromAncestors:andCommentID:) recomputes it. Separately,9999999has only 7 digits, so it doesn't sort last on sites whose comment IDs have 8 or more digits.Found by reading the code only. Not reproduced in the app: the effect on comment thread order hasn't been checked. Likely fix: compare the value (
comment.commentID == 0) and use a placeholder that sorts after anyInt32ID, for exampleINT32_MAX(2147483647, still 10 digits). -
Pre-existing: five
-Wnonnullwarnings (nilpassed where a value is required).
These show up when building with-Wformatwarnings as errors (-Wnonnullis in that group):MediaServiceupdateMedia:success:failure:andupdateMedia:overallSuccess:failure:passfieldsToUpdate:nil.SafariActivity.performActivitypassesoptions:niltoopenURL:options:completionHandler:. Should be@{}.MenuPostServicepasseswithOptions:nil.MenusViewControllersetsself.headerViewController.blog = nil.
For each, either pass an empty value, or mark the parameter
nullableifnilis meant to be allowed. After that, the app target could build with-Werror=formatpermanently, so format-string mistakes fail CI instead of producing wrong log lines.
- Ngôn ngữ chính
- Swift
- Star
- 3.9k
- Fork
- 1.2k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 136
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọ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 wordpress-mobile/WordPress-iOS
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
wordpress-mobile/WordPress-iOS#26423 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Pri] Low [Status] Ready for Dev [Type] Bug /Me
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
wordpress-mobile/WordPress-iOS#26279 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Pri] Low [Status] Ready for Dev [Type] Bug Share Extension
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
wordpress-mobile/WordPress-iOS#26276 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Pri] Low [Status] Ready for Dev [Type] Bug Blogging Prompts Notifications
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
wordpress-mobile/WordPress-iOS#26256 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Status] Ready for Dev [Type] Bug Reader
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
wordpress-mobile/WordPress-iOS#26254 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của wordpress-mobile/WordPress-iOS
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Optional callbacks log "Unable to create JSCallback" when passed nullCó thể đã có người làm @cmsj đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
cmsj/Hammerspoon2#464 ·
-
android bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
VocaHQ/vocaphone#470 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
new-compilers request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
compiler-explorer/compiler-explorer#9640 ·
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 72/100
RevenueCat/purchases-ios#8312 ·
Maintainer thường phản hồi trong vòng 1 ngày