Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c964c0a
Remove hookPattern feature flag from compiler
josephsavona Feb 19, 2026
d63dc82
Remove inferEffectDependencies feature flag from compiler
josephsavona Feb 19, 2026
3bf525c
Remove inlineJsxTransform feature flag from compiler
josephsavona Feb 19, 2026
615b990
Remove lowerContextAccess feature flag from compiler
josephsavona Feb 19, 2026
dd43e02
Remove enableEmitFreeze feature flag from compiler
josephsavona Feb 19, 2026
fe9c91c
Remove enableChangeDetectionForDebugging feature flag from compiler
josephsavona Feb 19, 2026
fefcf08
Remove enablePreserveExistingManualUseMemo feature flag from compiler
josephsavona Feb 19, 2026
6def374
Remove enableUseTypeAnnotations feature flag from compiler
josephsavona Feb 19, 2026
cc0cac9
Remove enableFire feature flag from compiler
josephsavona Feb 19, 2026
50eddbe
Remove validateMemoizedEffectDependencies feature flag from compiler
josephsavona Feb 19, 2026
fcc69dd
Remove enableInstructionReordering feature flag from compiler
josephsavona Feb 19, 2026
51203bc
Remove enableChangeVariableCodegen feature flag from compiler
josephsavona Feb 19, 2026
474c866
Remove enableMemoizationComments feature flag from compiler
josephsavona Feb 19, 2026
e1618ad
Remove enableTreatFunctionDepsAsConditional feature flag from compiler
josephsavona Feb 19, 2026
f08446c
Remove disableMemoizationForDebugging feature flag from compiler
josephsavona Feb 19, 2026
4b9e9db
Remove validateNoDynamicallyCreatedComponentsOrHooks feature flag fro…
josephsavona Feb 19, 2026
3fe0736
Remove enableInferEventHandlers feature flag from compiler
josephsavona Feb 19, 2026
e9206fe
Fix lint errors from feature flag removal
josephsavona Feb 20, 2026
995eea1
Run prettier on compiler source files
josephsavona Feb 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions compiler/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,12 @@ const UseEffectEventHook = addHook(
Feature flags are configured in `src/HIR/Environment.ts`, for example `enableJsxOutlining`. Test fixtures can override the active feature flags used for that fixture via a comment pragma on the first line of the fixture input, for example:

```javascript
// enableJsxOutlining @enableChangeVariableCodegen:false
// enableJsxOutlining @enableNameAnonymousFunctions:false

...code...
```

Would enable the `enableJsxOutlining` feature and disable the `enableChangeVariableCodegen` feature.
Would enable the `enableJsxOutlining` feature and disable the `enableNameAnonymousFunctions` feature.

## Debugging Tips

Expand Down

This file was deleted.

31 changes: 0 additions & 31 deletions compiler/apps/playground/__tests__/e2e/page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,37 +283,6 @@ test('error is displayed when config has validation error', async ({page}) => {
expect(output.replace(/\s+/g, ' ')).toContain('Unexpected compilationMode');
});

test('disableMemoizationForDebugging flag works as expected', async ({
page,
}) => {
const store: Store = {
source: TEST_SOURCE,
config: `import type { PluginOptions } from 'babel-plugin-react-compiler/dist';

({
environment: {
disableMemoizationForDebugging: true
}
} satisfies PluginOptions);`,
showInternals: false,
};
const hash = encodeStore(store);
await page.goto(`/#${hash}`, {waitUntil: 'networkidle'});
await page.waitForFunction(isMonacoLoaded);
await expandConfigs(page);
await page.screenshot({
fullPage: true,
path: 'test-results/07-config-disableMemoizationForDebugging-flag.png',
});

const text =
(await page.locator('.monaco-editor-output').allInnerTexts()) ?? [];
const output = await formatPrint(text);

expect(output).not.toEqual('');
expect(output).toMatchSnapshot('disableMemoizationForDebugging-output.txt');
});

test('error is displayed when source has syntax error', async ({page}) => {
const syntaxErrorSource = `function TestComponent(props) {
const oops = props.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ The `occursCheck` method prevents infinite types by detecting when a type variab
- `DeclareContext` and `LoadContext` generate no type equations (intentionally untyped)
- `StoreContext` with `Const` kind does propagate the rvalue type to enable ref inference through context variables

### Event Handler Inference
When `enableInferEventHandlers` is enabled, JSX props starting with "on" (e.g., `onClick`) on built-in DOM elements (excluding web components with hyphens) are inferred as `Function<BuiltInEventHandlerId>`.

## TODOs
1. **Hook vs Function type ambiguity**:
> "TODO: callee could be a hook or a function, so this type equation isn't correct. We should change Hook to a subtype of Function or change unifier logic."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@ if ($[0] !== "source_hash_abc123") {
}
```

### Change Detection for Debugging
When `enableChangeDetectionForDebugging` is configured, additional code is generated to detect when cached values unexpectedly change.

### Labeled Breaks
Control flow with labeled breaks (for early returns or loop exits) uses `codegenLabel` to generate consistent label names:
Expand All @@ -231,7 +229,6 @@ type CodegenFunction = {
prunedMemoBlocks: number; // Scopes that were pruned
prunedMemoValues: number; // Values in pruned scopes
hasInferredEffect: boolean;
hasFireRewrite: boolean;
};
```

Expand Down

This file was deleted.

Loading
Loading