Bug 161803 - Web Inspector: combine-resources.pl should support multiple transformations in one invocation
Summary: Web Inspector: combine-resources.pl should support multiple transformations i...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-09-09 10:26 PDT by BJ Burg
Modified: 2016-12-13 15:33 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2016-09-09 10:26:11 PDT
In the interest of moving more of the WebInspectorUI build into Derived Sources-style phases, we need to have a clearer relationship between inputs and outputs. Currently, combine-resources.pl is called multiple times, using the same files (Main.html, etc) as both inputs and outputs. This is fundamentally incompatible with dependency-based build systems, and makes it difficult to debug problems along the way.

I think it would be better to make combine-resources.pl a bit less flexible and instead codify the conventions we have been using. In particular,

 * hard-code a list of targets to be concatenated or stripped, loosely based on folders. This would be the set {Inspector, Debug, Workers, CodeMirror, Esprima, ESLint}
 * each target has a hardcoded file pattern (such as 'External/Esprima')
 * output filenames are determined based on the target name plus a suffix
 * take arguments such as --combine=Inspector --combine=CodeMirror --strip=Debug --suffix=Combined

This will reduce the number of invocations to one per main resource in copy-user-interface-resources.pl and make it possible to move this step into Derived Sources easily.

There are still plenty of post-processing steps such as running minifiers and remove-console-asserts.pl. We can combine/streamline that stuff in a separate bug.
Comment 1 Radar WebKit Bug Importer 2016-09-09 10:26:33 PDT
<rdar://problem/28227583>