sort -Rfu can return multiple records for the same case-insensitive key
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 30/100
Línea de trabajo
Read the random comparator in src/uu/sort/src/sort.rs around lines 2885–2899 and the existing test_random_ignore_case test. Reproduce the reported command with LC_ALL=C and --random-source=/dev/zero, then add coverage using two case-insensitive keys. Done means -Rfu emits one row for each distinct first-field key; check the open pull request #16700 before starting.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Shuffling a ticket list and asking for one row per owner can give the same owner two entries.
printf 'Alice ticket-1\nalice ticket-2\nXena ticket-3\n' |
LC_ALL=C sort -Rfu -k1,1 --random-source=/dev/zero
On uutils 0.12.0 and main at 293a724 (Linux x86_64), this exits 0 and prints:
Alice ticket-1
Xena ticket-3
alice ticket-2
There are two distinct first-field keys under -f, so any shuffle should emit exactly two rows. GNU 9.12 emits tickets 1 and 3. Removing -R and --random-source makes uutils do the same. The fixed random source just makes the failing order repeatable.
The random comparator treats Alice and alice as equal when compared directly, but hashes their original spellings when comparing either to Xena. They can land on opposite sides of Xena, so adjacent deduplication misses them. The existing test_random_ignore_case covers eight spellings of one word. A second distinct key exercises the missing comparison.
- Lenguaje dominante
- Rust
- Estrellas
- 24.4k
- Forks
- 2.2k
- Merge medio
- 2 d 23 h
- PR fusionados (30 d)
- 402
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
- Sin 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 uutils/coreutils
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
split -n leaves bytes from a previous run in chunks that should be emptyPosiblemente ocupada @costajohnt la tomó hace 2 días. AbiertoU - split
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
dircolors: '=' is not escaped and '^'/'\\' do not toggle the backslash state, unlike GNUQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. AbiertoU - dircolors
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
Los mantenedores suelen responder en 1 día
-
U - shred
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
chown -v: `+ID` spec echoed verbatim on a broken symlinkPosiblemente ocupada @sunsss123soldier la tomó hace 7 días. Abiertogood first issue oss-scanner U - chown
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
Todos los issues de uutils/coreutils
Issues similares
-
marketing
Dificultad 2/5 Medio día Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
S: Untriaged T: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
libnyanpasu/clash-nyanpasu#6537 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 Menos de una hora Aptitud para principiantes 62/100
tauri-apps/tao#1445 ·
Los mantenedores suelen responder en 1 día
-
bug P3
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
-
go good first issue test
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 2 días