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

オープン 初心者向け
#2,238 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@mikolalysenko がすでに取り組んでいます。

2026年11月25日 から。

  • #2239 @mikolalysenko による — オープン

評価

難易度
1/5
見積もり時間
1〜3時間
初心者へのやさしさ
85/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
git, rust
領域
testing-qa

調査の方向性

まず .gitattributes を、既存の pnpm-hosted/** と redirect/** の -text エントリの隣で読み、次に crates/socket-patch-core/tests/fixtures/pnpm-registry-overrides/ 以下の fixture ツリーを確認します。失敗しているテストは crates/socket-patch-core/src/formats/pnpm/registry_alias.rs と crates/socket-patch-core/src/hosted/engine.rs にあります。test (windows-latest, 1) ジョブまたは Windows チェックアウトで再現してください。これらの 7 つのテストがバイト単位で正確な fixture で通れば完了です。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Rust
スター
9
フォーク
2
平均マージ
1日 8時間
マージ済み PR(30日)
309

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SocketDev/socket-patch のほかの issue

SocketDev/socket-patch の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。