Skip to content

Update closure compiler#226

Closed
everettbu wants to merge 5 commits intomainfrom
upgradeclosure
Closed

Update closure compiler#226
everettbu wants to merge 5 commits intomainfrom
upgradeclosure

Conversation

@everettbu
Copy link
Copy Markdown

@everettbu everettbu commented Dec 13, 2025

Mirror of facebook/react#35303
Original author: sebmarkbage


The old one is not supported on newer OpenJDK.

@everettbu everettbu added CLA Signed React Core Team Opened by a member of the React Core Team labels Dec 13, 2025
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Dec 13, 2025

Greptile Overview

Greptile Summary

This PR updates the Google Closure Compiler from version 20230206 to 20251111 to support newer OpenJDK versions. The changes include:

  • Upgraded google-closure-compiler dependency and updated CI to use Java 21
  • Converted Closure Compiler imports to ESM dynamic imports (await import())
  • Added dynamic_import_alias: 'import' configuration flag
  • Regenerated Fizz runtime inline code strings with the newer compiler

The newer Closure Compiler produces slightly different minified output with modernized comparison syntax (e.g., a === b instead of b === a, x !== y instead of y !== x), but the logic remains functionally equivalent. All changes are consistent with the stated goal of supporting newer OpenJDK.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward dependency updates with corresponding configuration adjustments. The conversion to ESM imports is correct, the Java version upgrade is necessary for the new Closure Compiler, and the regenerated inline code strings show only stylistic differences in minified output while maintaining functional equivalence. The PR is a mirror of Update closure compiler facebook/react#35303 and follows established patterns.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
.github/workflows/runtime_build_and_test.yml 5/5 Updated Java version from 11.0.22 to 21 in two workflow jobs to support newer Closure Compiler
package.json 5/5 Bumped google-closure-compiler from ^20230206.0.0 to ^20251111.0.0
scripts/rollup/build.js 5/5 Added dynamic_import_alias: 'import' configuration for Closure Compiler compatibility
scripts/rollup/plugins/closure-plugin.js 5/5 Converted to ESM dynamic import for google-closure-compiler, changed compile function to async
scripts/rollup/generate-inline-fizz-runtime.js 5/5 Converted to ESM dynamic import for google-closure-compiler
packages/react-dom-bindings/src/server/fizz-instruction-set/ReactDOMFizzInstructionSetInlineCodeStrings.js 5/5 Regenerated with newer Closure Compiler - style changes from === to ===, !== to !==, and repositioned null checks
yarn.lock 5/5 Updated dependencies for google-closure-compiler upgrade, including new platform-specific binaries and transitive dependencies

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

6 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@everettbu
Copy link
Copy Markdown
Author

Upstream PR was closed or merged. Code is synced via branch mirror.

@everettbu everettbu closed this Jan 12, 2026
@everettbu everettbu deleted the upgradeclosure branch January 12, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants