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

Ouverte Adaptée aux débutants
#2,238 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@mikolalysenko y travaille déjà.

Depuis le 25/11/2026.

  • #2239 par @mikolalysenko — ouverte

Évaluation

Difficulté
1/5
Temps estimé
1-3 heures
Accessibilité débutants
85/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
git, rust
Domaine
testing-qa

Piste de recherche

Commence par lire .gitattributes à côté des entrées existantes pnpm-hosted/** et redirect/** -text, puis inspecte l'arborescence de fixtures sous crates/socket-patch-core/tests/fixtures/pnpm-registry-overrides/. Les tests en échec se trouvent dans crates/socket-patch-core/src/formats/pnpm/registry_alias.rs et crates/socket-patch-core/src/hosted/engine.rs ; reproduis-les via le job test (windows-latest, 1) ou un checkout Windows. Terminé lorsque ces sept tests passent avec des fixtures exactes au byte près.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
Rust
Étoiles
9
Forks
2
Merge moyen
1 j 8 h
PR mergées (30 j)
309

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de SocketDev/socket-patch

Toutes les issues de SocketDev/socket-patch

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.