Skip to content

Check the pnpm registry-route fixtures out as committed on Windows - #2240

Closed
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
mainfrom
fix/pnpm-registry-fixtures-eol
Closed

Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
mainfrom
fix/pnpm-registry-fixtures-eol

Conversation

@mikolalysenko

Copy link
Copy Markdown
Collaborator

Seven pnpm unit tests pass on Windows again: their fixtures are no longer converted to CRLF on checkout.

Why

The fixtures under crates/socket-patch-core/tests/fixtures/pnpm-registry-overrides are compared byte for byte by six unit tests of formats::pnpm (named_registries, registry_alias) and by hosted::engine::tests::the_registry_route_writes_what_pnpm_writes. The directory has no rule in .gitattributes, unlike pnpm-hosted and the other byte-exact fixture directories, so a Windows checkout converts the files to CRLF. In the test (windows-latest, 1) job of the Windows run those seven tests fail ("mixes CRLF and LF line endings", or \r\n against \n); the other 8,060 or so tests of that binary pass.

What changes

One rule in .gitattributes: the directory is checked out exactly as committed (-text), as its neighbours are.

How it was checked

  • git check-attr text on a file of the directory says unset with the rule.
  • Not run locally: Windows. A Windows run of this branch is the check; it is started when the pull request leaves draft. One other job of that run, e2e-windows (e2e_redirect_pnpm_build), fails on main for a different reason and is not changed here.

🤖 Generated with Claude Code

The fixtures under `tests/fixtures/pnpm-registry-overrides` are compared
byte for byte by six unit tests of `formats::pnpm` and one of the hosted
engine. The directory had no rule in `.gitattributes`, unlike `pnpm-hosted`
and the other byte-exact fixture directories, so a Windows checkout
converted the files to CRLF and the seven tests failed there
("mixes CRLF and LF line endings", or `\r\n` against `\n`).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

Closing as a duplicate of #2239, which adds the same .gitattributes rule, fixes #2238, also corrects the stale comment in vex/discover/testing/golden.rs, and already has a green Windows run of the unit tests. I opened this without seeing that one.

@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the fix/pnpm-registry-fixtures-eol branch November 25, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant