Skip to content

AI Generated: Refactor gentest#1889

Closed
NickGerleman wants to merge 1 commit into
react:mainfrom
NickGerleman:export-D94005983
Closed

AI Generated: Refactor gentest#1889
NickGerleman wants to merge 1 commit into
react:mainfrom
NickGerleman:export-D94005983

Conversation

@NickGerleman

Copy link
Copy Markdown
Contributor

Summary:
This change used Claude to make some major quality of life changes to yarn gentest. The bulk of the logic is now run in the driver, instead of the browser, and the scripts are typechecked. We rely on attributes, instead of declared style, so that we don't miss inputs the browser massages. We no longer preprocess the fixtures, to remap invalid CSS properties to valid ones. Generation now happens in parallel.

It is about neutral in terms of line count (3500 lines before and after)

Differential Revision: D94005983

@vercel

vercel Bot commented Feb 22, 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 Mar 9, 2026 7:14pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed label Feb 22, 2026
@meta-codesync

meta-codesync Bot commented Feb 22, 2026

Copy link
Copy Markdown

@NickGerleman has exported this pull request. If you are a Meta employee, you can view the originating Diff in D94005983.

@NickGerleman

NickGerleman commented Feb 22, 2026

Copy link
Copy Markdown
Contributor Author

FYI @intergalacticspacehighway. Was having reliability issues with the script, and saw the hacks related to the start/end regexing, and had Claude take a hatchet and do some of the changes have wanted over time, since well specced.

Changes are in last commit in the PR: 52c813d

NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Feb 22, 2026
Summary:
Pull Request resolved: react#1889

This change used Claude to make some major quality of life changes to `yarn gentest`. The bulk of the logic is now run in the driver, instead of the browser, and the scripts are typechecked. We rely on attributes, instead of declared style, so that we don't miss inputs the browser massages. We no longer preprocess the fixtures, to remap invalid CSS properties to valid ones. Generation now happens in parallel. We avoid outputting temp files to source root.

From there, I looked over major parts, and had it clean up a lot of things to taste, but I let it try to do a full rewrite for simplicity, using the original as reference.

It is about neutral in terms of line count (3500 lines before and after)

Differential Revision: D94005983
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Feb 22, 2026
Summary:
Pull Request resolved: react#1889

This change used Claude to make some major quality of life changes to `yarn gentest`. The bulk of the logic is now run in the driver, instead of the browser, and the scripts are typechecked. We rely on attributes, instead of declared style, so that we don't miss inputs the browser massages. We no longer preprocess the fixtures, to remap invalid CSS properties to valid ones. Generation now happens in parallel. We avoid outputting temp files to source root.

From there, I looked over major parts, and had it clean up a lot of things to taste, but I let it try to do a full rewrite for simplicity, using the original as reference.

It is about neutral in terms of line count (3500 lines before and after)

Differential Revision: D94005983
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Feb 22, 2026
Summary:
Pull Request resolved: react#1889

This change used Claude to make some major quality of life changes to `yarn gentest`. The bulk of the logic is now run in the driver, instead of the browser, and the scripts are typechecked. We rely on attributes, instead of declared style, so that we don't miss inputs the browser massages. We no longer preprocess the fixtures, to remap invalid CSS properties to valid ones. Generation now happens in parallel. We avoid outputting temp files to source root.

From there, I looked over major parts, and had it clean up a lot of things to taste, but I let it try to do a full rewrite for simplicity, using the original as reference.

It is about neutral in terms of line count (3500 lines before and after)

Differential Revision: D94005983

@cortinico cortinico left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Mar 7, 2026
Summary:
Pull Request resolved: react#1889

This change used Claude to make some major quality of life changes to `yarn gentest`. The bulk of the logic is now run in the driver, instead of the browser, and the scripts are typechecked. We rely on attributes, instead of declared style in DOM, so that we don't miss inputs the browser massages. We no longer preprocess the fixtures, to remap invalid CSS properties to valid ones. Generation now happens in parallel. We avoid outputting temp files to source root.

From there, I looked over major parts, and had it clean up a lot of things to taste, but I let it try to do a full rewrite for simplicity, using the original as reference.

It is about neutral in terms of line count

Differential Revision: D94005983
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Mar 7, 2026
Summary:
Pull Request resolved: react#1889

This change used Claude to make some major quality of life changes to `yarn gentest`. The bulk of the logic is now run in the driver, instead of the browser, and the scripts are typechecked. We rely on attributes, instead of declared style in DOM, so that we don't miss inputs the browser massages. We no longer preprocess the fixtures, to remap invalid CSS properties to valid ones. Generation now happens in parallel. We avoid outputting temp files to source root.

From there, I looked over major parts, and had it clean up a lot of things to taste, but I let it try to do a full rewrite for simplicity, using the original as reference.

It is about neutral in terms of line count

Differential Revision: D94005983
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Mar 7, 2026
Summary:
Pull Request resolved: react#1889

This change used Claude to make some major quality of life changes to `yarn gentest`. The bulk of the logic is now run in the driver, instead of the browser, and the scripts are typechecked. We rely on attributes, instead of declared style in DOM, so that we don't miss inputs the browser massages. We no longer preprocess the fixtures, to remap invalid CSS properties to valid ones. Generation now happens in parallel. We avoid outputting temp files to source root.

From there, I looked over major parts, and had it clean up a lot of things to taste, but I let it try to do a full rewrite for simplicity, using the original as reference.

It is about neutral in terms of line count

Differential Revision: D94005983
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Mar 9, 2026
Summary:
Pull Request resolved: react#1889

This change used Claude to make some major quality of life changes to `yarn gentest`. The bulk of the logic is now run in the driver, instead of the browser, and the scripts are typechecked. We rely on attributes, instead of declared style in DOM, so that we don't miss inputs the browser massages. We no longer preprocess the fixtures, to remap invalid CSS properties to valid ones. Generation now happens in parallel. We avoid outputting temp files to source root.

From there, I looked over major parts, and had it clean up a lot of things to taste, but I let it try to do a full rewrite for simplicity, using the original as reference.

It is about neutral in terms of line count

Reviewed By: sammy-SC

Differential Revision: D94005983
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Mar 9, 2026
Summary:
Pull Request resolved: react#1889

This change used Claude to make some major quality of life changes to `yarn gentest`. The bulk of the logic is now run in the driver, instead of the browser, and the scripts are typechecked. We rely on attributes, instead of declared style in DOM, so that we don't miss inputs the browser massages. We no longer preprocess the fixtures, to remap invalid CSS properties to valid ones. Generation now happens in parallel. We avoid outputting temp files to source root.

From there, I looked over major parts, and had it clean up a lot of things to taste, but I let it try to do a full rewrite for simplicity, using the original as reference.

It is about neutral in terms of line count

Reviewed By: sammy-SC

Differential Revision: D94005983
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Mar 9, 2026
Summary:
Pull Request resolved: react#1889

This change used Claude to make some major quality of life changes to `yarn gentest`. The bulk of the logic is now run in the driver, instead of the browser, and the scripts are typechecked. We rely on attributes, instead of declared style in DOM, so that we don't miss inputs the browser massages. We no longer preprocess the fixtures, to remap invalid CSS properties to valid ones. Generation now happens in parallel. We avoid outputting temp files to source root.

From there, I looked over major parts, and had it clean up a lot of things to taste, but I let it try to do a full rewrite for simplicity, using the original as reference.

It is about neutral in terms of line count

Reviewed By: sammy-SC

Differential Revision: D94005983
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Mar 9, 2026
Summary:
Pull Request resolved: react#1889

This change used Claude to make some major quality of life changes to `yarn gentest`. The bulk of the logic is now run in the driver, instead of the browser, and the scripts are typechecked. We rely on attributes, instead of declared style in DOM, so that we don't miss inputs the browser massages. We no longer preprocess the fixtures, to remap invalid CSS properties to valid ones. Generation now happens in parallel. We avoid outputting temp files to source root.

From there, I looked over major parts, and had it clean up a lot of things to taste, but I let it try to do a full rewrite for simplicity, using the original as reference.

It is about neutral in terms of line count

Reviewed By: sammy-SC

Differential Revision: D94005983
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Mar 9, 2026
Summary:
Pull Request resolved: react#1889

This change used Claude to make some major quality of life changes to `yarn gentest`. The bulk of the logic is now run in the driver, instead of the browser, and the scripts are typechecked. We rely on attributes, instead of declared style in DOM, so that we don't miss inputs the browser massages. We no longer preprocess the fixtures, to remap invalid CSS properties to valid ones. Generation now happens in parallel. We avoid outputting temp files to source root.

From there, I looked over major parts, and had it clean up a lot of things to taste, but I let it try to do a full rewrite for simplicity, using the original as reference.

It is about neutral in terms of line count

Reviewed By: sammy-SC

Differential Revision: D94005983
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Mar 9, 2026
Summary:
Pull Request resolved: react#1889

This change used Claude to make some major quality of life changes to `yarn gentest`. The bulk of the logic is now run in the driver, instead of the browser, and the scripts are typechecked. We rely on attributes, instead of declared style in DOM, so that we don't miss inputs the browser massages. We no longer preprocess the fixtures, to remap invalid CSS properties to valid ones. Generation now happens in parallel. We avoid outputting temp files to source root.

From there, I looked over major parts, and had it clean up a lot of things to taste, but I let it try to do a full rewrite for simplicity, using the original as reference.

It is about neutral in terms of line count

Reviewed By: sammy-SC

Differential Revision: D94005983
Summary:
Pull Request resolved: react#1889

This change used Claude to make some major quality of life changes to `yarn gentest`. The bulk of the logic is now run in the driver, instead of the browser, and the scripts are typechecked. We rely on attributes, instead of declared style in DOM, so that we don't miss inputs the browser massages. We no longer preprocess the fixtures, to remap invalid CSS properties to valid ones. Generation now happens in parallel. We avoid outputting temp files to source root.

From there, I looked over major parts, and had it clean up a lot of things to taste, but I let it try to do a full rewrite for simplicity, using the original as reference.

It is about neutral in terms of line count

Reviewed By: sammy-SC

Differential Revision: D94005983
@meta-codesync

meta-codesync Bot commented Mar 9, 2026

Copy link
Copy Markdown

This pull request has been merged in dcaa7ca.

J8118 added a commit to J8118/yoga that referenced this pull request Apr 9, 2026
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.
meta-codesync Bot pushed a commit that referenced this pull request Apr 17, 2026
Summary:
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`

Pull Request resolved: #1929

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

Reviewed By: NickGerleman

Differential Revision: D100144393

Pulled By: fabriziocucci

fbshipit-source-id: 273124bb478a6c6441b60ac8b086236440e0a90a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants