Opened 7 years ago
Closed 7 years ago
#47078 closed defect (bug) (fixed)
Building may fail to generate *-rtl.css files in wp-includes/css
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 5.3 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Build/Test Tools | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description
Happens when running grunt (build) after grunt --dev was run. In this case there are *.min.css, *-rtl.css and *-rtl.min.css files in both src/wp-admin/css/ and src/wp-includes/css directories. That seems to trip RTLCSS as it tries to process minified and already processed files.
Attachments (2)
Change History (12)
#2
@
7 years ago
- Keywords has-patch needs-testing added
I was able to reproduce this and 47078.diff fixes the problem, but the wp-includes/css/dist folder is never recreated when running either command (grunt --dev or grunt (build)).
#3
@
7 years ago
but the wp-includes/css/dist folder is never recreated
Right, it is created but then "cleaned" right after. Happens because wp-includes/css/dist is created by webpack which runs in build:js. Then we get to build:css which does clean:css and removes /dist.
Looking a but "deeper", we don't really need to do any of that clean:js, clean:css stuff in /build. All WP files are deleted there anyway. Perhaps we should make these run only for grunt --dev and of course for grunt clean --dev, grunt clean:css --dev etc. We should also split the clean tasks from the build tasks and do the cleaning before we run webpack.
For now lets fix this ticket by excluding the src/wp-includes/css/dist directory from processing with rtlcss.
#4
@
7 years ago
In 47078.1.diff: exclude minified and already processed files, and files from external packages when running the rtlcss task.
#5
follow-up:
↓ 7
@
7 years ago
- Keywords commit added; needs-testing removed
47078.1.diff works perfectly for me, @azaozz.
#6
@
7 years ago
- Owner set to azaozz
- Resolution set to fixed
- Status changed from new to closed
In 45317:
#7
in reply to:
↑ 5
@
7 years ago
Replying to desrosj:
Thanks for testing! :)
I'm actually not sure if this needs merging to the 5.2 branch. Seems sufficient to fix in trunk. Feel free to reopen and merge there if needed.
In 47078.diff:
rtlcss:coretask.wp-includes/css/distdirectory when runningclean:csstask.*-rtl.csson wp-includes/css.