Objective-C: follow-ups from the WPLog migration (#26259)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- ios, objective-c, swift
- 領域
- mobile
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Swift
- スター
- 3.9k
- フォーク
- 1.2k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 136
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
wordpress-mobile/WordPress-iOS のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
wordpress-mobile/WordPress-iOS#26423 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Pri] Low [Status] Ready for Dev [Type] Bug /Me
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
wordpress-mobile/WordPress-iOS#26279 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Pri] Low [Status] Ready for Dev [Type] Bug Share Extension
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
wordpress-mobile/WordPress-iOS#26276 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Pri] Low [Status] Ready for Dev [Type] Bug Blogging Prompts Notifications
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
wordpress-mobile/WordPress-iOS#26256 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Status] Ready for Dev [Type] Bug Reader
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
wordpress-mobile/WordPress-iOS#26254 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
wordpress-mobile/WordPress-iOS の issue をすべて見る
似ている issue
-
Optional callbacks log "Unable to create JSCallback" when passed null対応中かも @cmsj が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
cmsj/Hammerspoon2#464 ·
-
android bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
VocaHQ/vocaphone#470 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
new-compilers request
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
compiler-explorer/compiler-explorer#9640 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100