Make WordPress Core

Changes between Version 11 and Version 19 of Ticket #44492


Ignore:
Timestamp:
12/20/2018 04:32:17 PM (6 years ago)
Author:
omarreiss
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #44492

    • Property Summary changed from Add new build:dev task which symlinks all files that can be symlinked to Add new --dev to allow building and cleaning /src again.
    • Property Milestone changed from 5.0 to 5.1
  • Ticket #44492 – Description

    v11 v19  
    1 This ticket introduces a new build task, meant specifically for development: `grunt build:dev`.
     1This ticket introduces a `--dev` flag to the `build`, `copy`, `watch` and `clean` tasks, meant specifically for development. This makes it possible to develop from `/src` again.
    22
    3 The main difference with a regular build is that files are symlinked when possible instead of copied. This saves a lot of build time and means you don't have to rebuild anymore for most PHP changes. Since PHP files in `build/` are now symlinked to `src/`, changes are picked up directly.
     3When running `grunt build --dev` we only run `grunt build:js` and `grunt build:css`. When running a regular `grunt build` we also include `grunt build:files`, which also copies over the PHP. This means we've also separated the different build concerns into different build tasks that could be run separately (extra win! 🎉).
    44
    5 The new `grunt build:dev` task first checks if it can create a symlink on the system it runs on. If this is not the case, it will fallback to copying. `grunt watch` will also trigger `build:dev` instead of `build` now since it is only used in dev environments anyway.
    6 
    7 Files that are exempted from symlinking are the JS and CSS files, the themes, embed.php, formatting.php and version.php. This is because these are all transformed in some way when built. When someone adds a new file, they would still have to build to have it included.
     5We first tried an approach which used symlinking. However, this gave too many issues on too many systems so we reverted back to an approach which allows building into `/src`
    86
    97This ticket was inspired by issues that were raised after #43055 got committed, mostly in the #core-committers channel on Slack. The main issues I've seen are the following:
     
    1210- XDebug breakpoints set in `src/` wouldn't be picked up.
    1311
    14 I believe these issues should mostly be mitigated or resolved through this ticket. I wasn't able to test so myself so I could use some help reviewing and confirming this is indeed a big improvement.
     12I believe these issues should mostly be mitigated or resolved through this ticket. More testing needed.