Objective-C: follow-ups from the WPLog migration (#26259)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- ios, objective-c, swift
- Área
- mobile
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Swift
- Estrellas
- 3.9k
- Forks
- 1.2k
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 136
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de wordpress-mobile/WordPress-iOS
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
wordpress-mobile/WordPress-iOS#26423 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Pri] Low [Status] Ready for Dev [Type] Bug /Me
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
wordpress-mobile/WordPress-iOS#26279 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Pri] Low [Status] Ready for Dev [Type] Bug Share Extension
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
wordpress-mobile/WordPress-iOS#26276 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Pri] Low [Status] Ready for Dev [Type] Bug Blogging Prompts Notifications
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
wordpress-mobile/WordPress-iOS#26256 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Status] Ready for Dev [Type] Bug Reader
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
wordpress-mobile/WordPress-iOS#26254 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de wordpress-mobile/WordPress-iOS
Issues similares
-
Optional callbacks log "Unable to create JSCallback" when passed nullPosiblemente ocupada @cmsj la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
cmsj/Hammerspoon2#464 ·
-
android bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
VocaHQ/vocaphone#470 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
new-compilers request
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
compiler-explorer/compiler-explorer#9640 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100