Opened 4 years ago
Last modified 4 years ago
#51960 new defect (bug)
`grunt copy:dynamic` doesn't copy all changed files
Reported by: | iandunn | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | |
Focuses: | Cc: |
Description
I run into this problem a lot:
npm run watch
- Change several PHP files near-simultaneously. Examples:
git checkout {branch}
- Change several files in PhpStorm, then hit
command+s
to save them all at once.
- Only some of the files are copied from
src/
tobuild/
:
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.
Workaround
In the mean time, I've written a simple PhpStorm file watcher task.
Note: See
TracTickets for help on using
tickets.
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: https://core.trac.wordpress.org/ticket/51966#comment:2.