Opened 12 years ago

Closed 12 years ago

#4906 closed defect (fixed)

Allow building only one layer.

Reported by: James Burke Owned by: James Burke
Priority: high Milestone: 1.1
Component: BuildSystem Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

To make the build process quicker, it would be nice if the build system could be told just to rebuild one (or a set) of layers.

Maybe a buildLayers=[comma-separated list of layer names].

Change History (2)

comment:1 Changed 12 years ago by James Burke

There are some things that can be skipped, but having this build option will not be as fast as we might like.

The build process copies all the prefix dirs to the release area, then puts the code guards around each file, and those files and release dirs are used to generate the layers. Also, the dependency graph will need to be generated for all layers since layers can have dependencies on other layers.

The things we can skip with this build option will be the actual creation of the layers (file concatenation and minification) we do not want to rebuild and _optimizeReleaseDirs, which does string interning, minifying of files, i18n flattening and xd file generation.

I don't like that we'll be copying over the prefix dirs, but then not running the _optimizeReleaseDirs portion: it means the directory will be in a different state when running with this build option vs. without.

I do not want to change the build process to not copy the files over first, since that complicates the other tasks. Perhaps I need to make the release action *not* automatically call the clean action (which wipes out the release dir) and then give an option on fileUtil.copyDir() to only copy over files that are newer. Then make buildUtil.addGuards() smarter, and only add the redefinition guard if it does not exist.

With that approach, the new files that are copied over will not have the _optimizeReleaseDirs tasks done on them, but hopefully they are not needed because those modules will be in the rebuilt layer. So there will be an inconsistency, but it will be masked by the layer. If you modify any file that is not part of the layers your are rebuilding, you need to do a normal build. Also, you will need to explicitly state action=clean,release if you want to clean the release dir before doing the build.

comment:2 Changed 12 years ago by James Burke

Resolution: fixed
Status: newclosed

(In [12302]) Fixes #4906. Introduces a buildLayers build option to just rebuild a layer or comma separated list of layers (requires a full build be done first). !strict

Note: See TracTickets for help on using tickets.