<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: combine-resources.pl should support multiple transformations in one invocation"
   href="https://bugs.webkit.org/show_bug.cgi?id=161803">161803</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Web Inspector: combine-resources.pl should support multiple transformations in one invocation
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Web Inspector
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>bburg&#64;apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>bburg&#64;apple.com, joepeck&#64;webkit.org, mattbaker&#64;apple.com, nvasilyev&#64;apple.com, timothy&#64;apple.com, webkit-bug-importer&#64;group.apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>