Windows unit tests fail on main: pnpm-registry-overrides fixtures are checked out as CRLF (mixes CRLF and LF line endings)

Abierto Apto para principiantes
#2,238 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@mikolalysenko ya está trabajando en esto.

Desde el 25/11/2026.

  • #2239 de @mikolalysenko — abierto

Evaluación

Dificultad
1/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
85/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
git, rust
Área
testing-qa

Línea de trabajo

Empieza leyendo .gitattributes junto a las entradas existentes pnpm-hosted/** y redirect/** -text, luego inspecciona el árbol de fixtures bajo crates/socket-patch-core/tests/fixtures/pnpm-registry-overrides/. Las pruebas que fallan están en crates/socket-patch-core/src/formats/pnpm/registry_alias.rs y crates/socket-patch-core/src/hosted/engine.rs; reprodúcelas mediante el job test (windows-latest, 1) o un checkout de Windows. Terminado cuando esas siete pruebas pasen con fixtures exactos byte a byte.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

agent:claimed agent:triaged ci-janitor priority:p1

[agent] PR shepherd: the test (windows-latest, 1) job fails on main at e685fb145 (run 45555390805), and the same 7 tests fail on every PR that runs the Windows tests (for example #2234, job 139041204826). It turns ci-ok (windows only) red. It is separate from #2235, which is the e2e pnpm 11 test.

test formats::pnpm::named_registries::tests::the_planned_file_is_the_one_the_fixtures_were_locked_with ... FAILED
test formats::pnpm::registry_alias::tests::shapes_outside_the_fixtures_are_refused ... FAILED
test formats::pnpm::registry_alias::tests::the_overrides_section_holds_exactly_the_wanted_pins ... FAILED
test formats::pnpm::registry_alias::tests::the_routed_shape_is_what_pnpm_writes ... FAILED
test formats::pnpm::registry_alias::tests::unpinning_one_release_leaves_the_rest ... FAILED
test formats::pnpm::registry_alias::tests::unpinning_restores_the_plain_shape ... FAILED
test hosted::engine::tests::the_registry_route_writes_what_pnpm_writes ... FAILED
test result: FAILED. 8059 passed; 7 failed

panicked at crates\socket-patch-core\src\formats\pnpm\registry_alias.rs:1216:74:
a v9 lock: "mixes CRLF and LF line endings"

panicked at crates\socket-patch-core\src\hosted\engine.rs:8633:13:
assertion `left == right` failed: both-versions
  left:  Some("packages:\n  - '.'\nnamedRegistries:\n ...")
  right: Some("packages:\r\n  - '.'\r\nnamedRegistries:\r\n ...")

Cause. These tests read the tests/fixtures/pnpm-registry-overrides golden fixtures that #2167 (5d8378e) added. .gitattributes marks pnpm-hosted/** and redirect/** as -text, but not pnpm-registry-overrides/**. On a Windows checkout git converts those fixtures to CRLF. The parser then sees mixed line endings, and the byte-exact comparisons fail.

Likely fix. Add crates/socket-patch-core/tests/fixtures/pnpm-registry-overrides/** -text to .gitattributes (with a comment like the existing ones), then confirm with a Windows run of test (windows-latest, 1). The CLI itself is probably fine: a real pnpm lock on Windows has one consistent line ending.


Generated by Claude Code

Lenguaje dominante
Rust
Estrellas
9
Forks
2
Merge medio
1 d 8 h
PR fusionados (30 d)
309

Preparar el entorno

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 SocketDev/socket-patch

Todos los issues de SocketDev/socket-patch

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.