Skip to content

Embedded generators are not line-ending-stable on Windows #48

Description

@dajiaohuang

Reproduction

On a clean Windows checkout of current main (ea544d88405590eb91b5132eb73ef28546b6b0f3) with core.autocrlf=true:

  1. npm run build rewrites src/project/embedded-project-template.ts (42 added / 42 removed lines).
  2. npm run generate:embedded-skills rewrites src/skills/embedded-repo-skills.ts (18 added / 18 removed lines).
  3. The semantic input is unchanged; the generated string literals only switch from embedded LF to embedded CRLF because both generators serialize working-tree text verbatim.

This leaves a clean Windows build dirty and makes generated artifacts depend on checkout configuration. I searched all-state issues, all PR titles/bodies, and repository history for Windows, CRLF, line-ending, and generator reports and found no existing report or pending fix.

Expected behavior

Both embedded generators should normalize textual inputs to LF before serialization, so the generated files are deterministic across supported platforms and a clean build remains clean.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions