Skip to content

Fix import casing mismatch for gentest types.ts#1929

Closed
J8118 wants to merge 3 commits into
react:mainfrom
J8118:fix/gentest-types-casing
Closed

Fix import casing mismatch for gentest types.ts#1929
J8118 wants to merge 3 commits into
react:mainfrom
J8118:fix/gentest-types-casing

Conversation

@J8118

@J8118 J8118 commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

The file gentest/src/types.ts is recorded in git with a lowercase t, but all 7 imports across the gentest source reference Types.ts (uppercase T). This casing mismatch was introduced in #1889 (dcaa7ca7) when the gentest was rewritten — the file was created as types.ts but the imports were written as Types.ts in the same commit.

This causes TypeScript error TS1261 on case-insensitive filesystems (Windows/macOS) where the filesystem resolves both casings to the same file but TypeScript flags the inconsistency. On case-sensitive filesystems (Linux), the mismatched casing could cause module resolution issues depending on the TypeScript configuration.

Files changed (7 import corrections):

  • gentest/src/cli.ts
  • gentest/src/CssToYoga.ts
  • gentest/src/buildLayoutTree.ts
  • gentest/src/emitters/Emitter.ts
  • gentest/src/emitters/CppEmitter.ts
  • gentest/src/emitters/JavascriptEmitter.ts
  • gentest/src/emitters/JavaEmitter.ts

Test plan

  • yarn workspace gentest run tsc now passes cleanly (previously failed with TS1261)
  • Import-only change — no logic modifications

The file is recorded in git as types.ts (lowercase) but all 7 imports
referenced Types.ts (uppercase). This casing mismatch was introduced
in dcaa7ca (react#1889) and causes TS1261 on case-insensitive filesystems.
@vercel

vercel Bot commented Apr 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
yoga-website Ready Ready Preview, Comment Apr 16, 2026 10:28pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed label Apr 9, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Apr 9, 2026
@meta-codesync

meta-codesync Bot commented Apr 9, 2026

Copy link
Copy Markdown

@fabriziocucci has imported this pull request. If you are a Meta employee, you can view this in D100144393.

@meta-codesync

meta-codesync Bot commented Apr 17, 2026

Copy link
Copy Markdown

@fabriziocucci merged this pull request in 0ea34b7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Merged Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant