Make WordPress Core

Opened 4 months ago

Closed 3 months ago

Last modified 3 months ago

#65368 closed defect (bug) (fixed)

Build/Test Tools: Bump bundled Gutenberg build to `23.4.0`

Reported by: adamsilverstein Owned by: desrosj
Priority: normal Milestone: 7.1
Component: Build/Test Tools Version:
Severity: normal Keywords: has-patch commit
Cc: Focuses:

Description (last modified by desrosj)

Core bundles a pre-built copy of Gutenberg, pinned by commit SHA in the custom gutenberg.sha field of package.json. This ticket bumps that pin to 0e198c7ac7ca634e73ded9220ce048c0302174dd and refreshes the regenerated build artifacts.

The pin tracks the wp/next branch rather than Gutenberg trunk: trunk currently requires React 19 while core ships React 18, so a trunk-based bundle breaks the block editor. 0e198c7 is the current tip of wp/next, is React-18 compatible, and carries the HEIC client-side code.

Notes

  • The changed files under src/wp-includes/{blocks,assets,build,images} are regenerated Gutenberg build output, produced by npm run gutenberg:download.
  • package.json's gutenberg.sha field is the only hand edit; package-lock.json is unaffected, because the SHA lives in a custom field rather than the npm dependency tree.

Patch

Steps to reproduce / verify

  1. Apply the patch (or check out ​PR 12009).
  2. Run npm run build and confirm the block editor loads without React initialization errors.

Previously:

Change History (13)

This ticket was mentioned in ​PR #12009 on ​WordPress/wordpress-develop by ​@adamsilverstein.


4 months ago
#1

  • Keywords has-patch added

## What

Bumps the bundled Gutenberg build to 0e198c7ac7ca634e73ded9220ce048c0302174dd (current tip of the wp/next branch) and updates the regenerated build artifacts.

This is a one time bump to bring Guternberg up to date in core since the trunk code freeze. In the future we will settle on a regular cadence to update this SHA.

## Why

Needed to bring Gutenberg up to date and enable backports to function correctly.

wp/next is used rather than Gutenberg trunk because trunk currently requires React 19 while core ships React 18; 0e198c7 is React-18 compatible and carries the HEIC client-side code.

## Notes

  • The 114 changed files under src/wp-includes/{blocks,assets,build,images} are regenerated Gutenberg build output, produced by npm run gutenberg:download.
  • package.json's gutenberg.sha field is the only hand edit; package-lock.json is unaffected (the SHA lives in a custom field, not the npm dependency tree).

​@adamsilverstein commented on ​PR #12009:


4 months ago
#2

I noticed an experiments folder in build/pages and a route folder 'experiments-home' - do those belong in core?

It would be good to land ​https://github.com/WordPress/gutenberg/pull/76715 - short of that, should those folders be excluded from the core commit.

#3 @westonruter
4 months ago

  • Milestone Awaiting Review → 7.1

​@westonruter commented on ​PR #12009:


4 months ago
#4

I'm not sure how to review such PRs. I'd appreciate pointers!

​@adamsilverstein commented on ​PR #12009:


4 months ago
#5

I'm not sure how to review such PRs. I'd appreciate pointers!

we probably need someone with deep Gutenberg familiarity to review. I only changed the Gutenberg SHA - every other change was generated.

​@westonruter commented on ​PR #12009:


4 months ago
#6

@adamsilverstein So you bumped the hash in a57e63d7200157887c1e75b7eefbb940599434e1 and then for f1ff566fdcb42a1a1422018cd484dc05e3373e79 you just ran npm run build and committed the result?

​@adamsilverstein commented on ​PR #12009:


4 months ago
#7

@adamsilverstein​[[Image(chrome-extension://hgomfjikakokcbkjlfgodhklifiplmpg/images/wp-logo.png)]] So you bumped the hash in ​a57e63d and then for ​f1ff566 you just ran npm run build and committed the result?

I also ran npm run gutenberg:download && npm run gutenberg:copy . I'm not super familiar with the build system and haven't looked too carefully yet, but those don't seem to get run (and I don't see the changes) with npm run build or even npm run build:gutenberg. Previously I assumed all we had to do was update the SHA (which i've done in the past with some backport PRs without running the extra commands).

Some of the files/paths are added, I guess we need to review those carefully to see what should really be added:

https://github.com/user-attachments/assets/c58eeda6-984b-495e-ac00-d87627c99107

I'm guerssing at least src/wp-includes/build/pages/experiments/ and src/wp-includes/build/routes/experiments-home/ can be excluded.

​@wildworks commented on ​PR #12009:


3 months ago
#8

The current Gutenberg ref points to Gutenberg version 23.4. How about updating the commit hash to the latest one from Gutenberg trunk again? The newer the commit hash, the closer the core state will be to what is expected in Beta1.

​@desrosj commented on ​PR #12009:


3 months ago
#9

The current Gutenberg ref points to Gutenberg version 23.4. How about updating the commit hash to the latest one from Gutenberg trunk again? The newer the commit hash, the closer the core state will be to what is expected in Beta1.

Since the current plan is to sync changes during weeks opposite each plugin release, let's leave it as 23.4 right now to see how that cadence works.

#10 @desrosj
3 months ago

  • Keywords commit added
  • Owner set to desrosj
  • Status new → assigned
  • Summary Build/Test Tools: Bump bundled Gutenberg build to `0e198c7` → Build/Test Tools: Bump bundled Gutenberg build to `23.4.0`

I think this is good to go in and I'll be committing this shortly. I have a ​post drafted to outline the structure of this process going forward that I plan to publish just after merging.

#11 @desrosj
3 months ago

  • Description modified (diff)

#12 @desrosj
3 months ago

  • Resolution → fixed
  • Status assigned → closed

In 62584:

General: Bump the pinned hash for Gutenberg to v23.4.0.

This updates the pinned commit hash of the Gutenberg repository from 14db4ab9395a9e96430eed678e4288a59eecbd15 (version 23.3.0) to 14db4ab9395a9e96430eed678e4288a59eecbd15 (version 23.4.0).

A full list of changes included in this commit can be found on GitHub: ​https://github.com/WordPress/gutenberg/compare/v23.3.0..v23.4.0.

The following commits are included:

Props adamsilverstein, jorbin, westonruter, wildworks.
Fixes #65368.

​@wildworks commented on ​PR #12009:


3 months ago
#13

If possible, I would appreciate it if we could update the Gutenberg ref again before the Beta1 release.

This is because CI errors occurred in #11559. #11559 attempts to change the WP_Icons_Registry::register method from protected to public. However, in Gutenberg 23.4, this method is overridden as protected in a child class, which causes a fatal error due to narrowing the class visibility. In the latest version of Gutenberg, this method is public, but this is not yet included in 23.4. To resolve this fatal error, we must update to the latest Gutenberg ref.

Note: See TracTickets for help on using tickets.