Skip to content

Clean src before building to remove abandoned files#11306

Closed
desrosj wants to merge 5 commits intoWordPress:trunkfrom
desrosj:remove/orphaned-files
Closed

Clean src before building to remove abandoned files#11306
desrosj wants to merge 5 commits intoWordPress:trunkfrom
desrosj:remove/orphaned-files

Conversation

@desrosj
Copy link
Member

@desrosj desrosj commented Mar 19, 2026

This addresses an issue where files persist in the src directory of the build server checkout despite having been removed. Because the files are not under version control and there's no explicit delete command, they are not removed from src as expected.

Specific details about this issue can be found in this comment.

Now that grunt clean has been updated to account for the new files and locations, it can be run before building to ensure a clean state (see dc20352).

This is a short-term solution that's meant to run once and be removed. The long-term solution is the work being done in #11064, which will re-add these files to version control, which solves this problem naturally through changes to the files themselves.

Trac ticket: Core-64393.

Use of AI Tools


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@desrosj desrosj self-assigned this Mar 19, 2026
@desrosj desrosj force-pushed the remove/orphaned-files branch from cfbf05b to b5ac8ea Compare March 19, 2026 12:45
@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props desrosj.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@desrosj desrosj changed the title Add grunt clean to postinstall temporarily Clean src before building to remove abandoned files Mar 19, 2026
Copy link
Member

@aaronjorbin aaronjorbin left a comment

Choose a reason for hiding this comment

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

Looks and sounds good to me

@desrosj
Copy link
Member Author

desrosj commented Mar 19, 2026

Merged in r62069.

@desrosj desrosj closed this Mar 19, 2026
@desrosj desrosj deleted the remove/orphaned-files branch March 19, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants