[wp-trac] [WordPress Trac] #53687: `grunt verify:old-files` incorrectly flagging certain files
WordPress Trac
noreply at wordpress.org
Tue Aug 10 19:18:57 UTC 2021
#53687: `grunt verify:old-files` incorrectly flagging certain files
---------------------------------------+-----------------------
Reporter: desrosj | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone:
Component: Build/Test Tools | Version: 5.7
Severity: normal | Resolution:
Keywords: needs-testing needs-patch | Focuses:
---------------------------------------+-----------------------
Changes (by azaozz):
* status: closed => reopened
* resolution: invalid =>
Comment:
Just ran into this too.
> the problem is not with the verify:old-files task
Yes, but the results is that `npm run build` a.k.a. `grunt build` fails/is
aborted.
> failure only appears when these files already exist in src and are
copied over with the build. If these files have been removed from version
control and are now built, I think there should be a cleanup so they're
removed from src.
This is somewhat similar to $47078. A cleanup of the old built files from
both /src and /build sounds like the better solution. Also see #47749.
However cleaning of all built files will not work at the moment as the
above four files (and many others) are not being "cleaned" from /src
anyway. Running `grunt clean --dev` leaves quite a few "built" files
behind. Then `grunt copy:files` copies a mess of "original" and "built"
files. Then most of the copied built files are overwritten when building
the js and css or by webpack.
For this ticket is seems it would be enough to either exclude the 4
offending files from copying to /build, for now. A better way to fix this
and similar cases in the future is to fix `grunt clean --dev` and run it
together with `grunt clean` before every build.
Going to reopen this as it prevents building to /build after building to
/src.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53687#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list