[wp-trac] [WordPress Trac] #64393: Change how we include Gutenberg in Core

WordPress Trac noreply at wordpress.org
Sat Feb 28 03:39:02 UTC 2026


#64393: Change how we include Gutenberg in Core
------------------------------+--------------------------
 Reporter:  youknowriad       |       Owner:  youknowriad
     Type:  task (blessed)    |      Status:  reopened
 Priority:  high              |   Milestone:  7.0
Component:  Build/Test Tools  |     Version:
 Severity:  blocker           |  Resolution:
 Keywords:  has-patch         |     Focuses:
------------------------------+--------------------------

Comment (by desrosj):

 One more thought related to `svn:ignore` properties. I noticed that
 [61701] changed the ignore rules for `src/wp-includes/assets` and `src/wp-
 includes/blocks` from a list of specific files and patterns to a `*`
 wildcard.

 I may be missing it (this ticket has gotten quite long), but I could not
 find any discussion around why `*` was used on the ticket.

 My gut tells me that this is not the right way to handle this. Ignoring
 everything that's ever added to the directory is essentially a form of
 error suppression. If a new file is unexpectedly added to these
 directories, it would not be immediately obvious unless someone looked at
 the corresponding commit on the build server. By defining patterns that
 explicitly match the files that are expected to be built, it ensures that
 only the correct ones end up in the built package.

 Based on what I'm seeing locally after running the build script as it
 stands in `trunk` currently, the expected files within each `src/wp-
 includes/blocks/BLOCKNAME` directory are as follows:
 - `block.json` (all)
 - `style-rtl.css`/'style-rtl.min.css` (some)
 - `style.css`/`style.min.css` (some)
 - `editor.css`/`editor.min.css` (some)
 - `editor-rtl.css`/`editor-rtl.min.css` (some)
 - `theme.css`/`theme.min.css` (some)
 - `theme-rtl.css`/`theme-rtl.min.css` (some)
 - `navigation-link/shared/item-should-render.php` and `navigation-
 link/shared/render-submenu-icon.php`

 That said, maintaining this is likely going to be a pain because of how
 SVN's ignore properties work.
 - To my knowledge, SVN does not support wild card patterns such as `src
 /wp-includes/blocks/*/block.json`.
 - With the exception of the `block.json` file, the files above are not
 included required for every block.
 - Since these are added and removed upstream in `gutenberg`, the block
 directories would need to be updated any time files are added or removed.

 This could likely be scripted, but would take a bit of research to confirm
 first. A few things to note:
 - If files are added, the directory will be in a mixed state with
 unversioned files so changes can be verified.
 - When files are removed, nothing would seem out of place because the
 files were previously expected and ignored.

 The flow I have in mind is:
 - Gutenberg hash is bumped in `package.json`.
 - Build script is run.
 - New files can be verified because they show as unversioned.
 - After those changes are verified, a script (a Grunt task added to `grunt
 precommit` feels best at the moment) could be run that changes the
 property for each directory appropriately.
 - Only the expected changes should be present now.

 I typically commit directly using SVN, but some committers use a `git-svn`
 flow. Whatever approach is used would need to be tested in multiple commit
 workflows. The [https://make.wordpress.org/core/handbook/best-practices
 /when-you-become-a-committer/core-committer-workflows/ Core Committer
 Workflows page in the handbook] could be a great starting point.

 To be clear, I don't think having a script for this is a blocker for 7.0.
 However, I do think that the wildcard `ignore` properties should be
 changed as soon as @dmsnell is hopefully able to work his magic and
 restore the change history.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64393#comment:177>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list