Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

refactor(redis): typed RedisReply instead of dynamic replies; move RedisConnectionTestFake out of lib

Abierto
#1,571 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
Tipo de issue
Refactorización
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
dart, flutter, redis

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

backend connections enhancement P3

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 the sendCommand boundary. Accessors like asInt() / asArray() throw a typed RedisProtocolException on a shape mismatch.
  • Typed arguments: List<Object> of String | int | Uint8List | RedisBulkValue, converted in one place (redisCommandArg).
  • Move RedisConnectionTestFake to test/ (or lib/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

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de QueryaHub/Querya-Desktop

Todos los issues de QueryaHub/Querya-Desktop

Issues similares

Más issues de Dart

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.