Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#51960 new defect (bug)

`grunt copy:dynamic` doesn't copy all changed files

Reported by: iandunn's profile iandunn Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords:
Focuses: Cc:


I run into this problem a lot:

  1. npm run watch
  2. Change several PHP files near-simultaneously. Examples:
    1. git checkout {branch}
    2. Change several files in PhpStorm, then hit command+s to save them all at once.
  3. Only some of the files are copied from src/ to build/:
Running "_watch" task
Completed in 0.737s at Mon Dec 07 2020 14:11:46 GMT-0800 (Pacific Standard Time) - Waiting...
>> File "src/wp-includes/class-wp-simplepie-file.php" changed.
>> File "src/wp-includes/SimplePie/File.php" changed.

Running "clean:dynamic" (clean) task
>> 0 paths cleaned.

Running "copy:dynamic" (copy) task
Copied 1 file

It doesn't happen all of the time, but it happens often, and makes testing changes very frustrating.


In the mean time, I've written a simple PhpStorm file watcher task.

Change History (2)

#1 @azaozz
3 years ago

Yeah, ran into this few times too (using BBEdit and VSCode). Workaround is to add some "white space" to a file and save again, then it usually picks it. Sounds like perhaps some concurrency problem between node, maybe svn/git, and the OS filesystem... Quite annoying.

Perhaps the idea to always build to both build/ and src/ would help to fix this, see:

#2 @iandunn
3 years ago

Yeah, I think that's a good next step.

Note: See TracTickets for help on using tickets.