refactor(redis): typed RedisReply instead of dynamic replies; move RedisConnectionTestFake out of lib
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start with lib/core/database/redis_connection.dart, especially sendCommand at line 391 and the reply parsing sites named in the issue. Then review #1569, which touches the same file and is a prerequisite. The refactor is done when replies and command arguments are typed at the boundary, the test fake is moved out of lib/, and existing behavior is preserved.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
RedisConnection.sendCommand(List<dynamic> args) -> Future<dynamic> (lib/core/database/redis_connection.dart:391) passes raw redis package replies through. Every caller re-parses them by hand: 9 is List / length == 2 checks in redis_connection.dart alone (scan, getMaxDatabases, hash/zset/stream readers), plus redisReplyInt / RedisBulkValue.fromReply with fallbacks that hide a wrong reply shape (redisReplyInt(result, -1) turns an error into -1).
A Redis error reply and a wrong-type value look the same to callers, and arguments are List<dynamic>, so a non-string argument goes through unchecked.
RedisConnectionTestFake (:817, ~280 lines) lives in lib/ and ships in the release binary.
Fix
- Parse once into a sealed
RedisReply(RedisInt,RedisBulk(bytes),RedisSimple,RedisArray,RedisNil,RedisErrorReply) at thesendCommandboundary. Accessors likeasInt()/asArray()throw a typedRedisProtocolExceptionon a shape mismatch. - Typed arguments:
List<Object>ofString | int | Uint8List | RedisBulkValue, converted in one place (redisCommandArg). - Move
RedisConnectionTestFaketotest/(orlib/testing/excluded from the app). - Pure refactor, no behaviour change; do it after #1569 (Redis DB-switch fix), which touches the same file.
- Lenguaje dominante
- Dart
- Estrellas
- 23
- Forks
- 1
- Merge medio
- 31 min
- PR fusionados (30 d)
- 570
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- 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 QueryaHub/Querya-Desktop
-
enhancement ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
QueryaHub/Querya-Desktop#1689 ·
Los mantenedores suelen responder en 1 día
-
ui(dialogs): make destructive query and DML preview dialogs adaptive and prevent table name overflowAbiertobug frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
QueryaHub/Querya-Desktop#1642 ·
Los mantenedores suelen responder en 1 día
-
bug error-handling settings
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
QueryaHub/Querya-Desktop#1637 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
QueryaHub/Querya-Desktop#1636 ·
Los mantenedores suelen responder en 1 día
-
enhancement marketplace
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
QueryaHub/Querya-Desktop#1635 ·
Los mantenedores suelen responder en 1 día
Todos los issues de QueryaHub/Querya-Desktop
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
PhoebeSoftware/xrooster#41 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
VeryGoodOpenSource/very_good_templates#665 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
VeryGoodOpenSource/very_good_cli#1783 ·
Los mantenedores suelen responder en 1 día
-
bug to check
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 76/100
aaronified/fluenough#665 ·
Los mantenedores suelen responder en 1 día