<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>161803</bug_id>
          
          <creation_ts>2016-09-09 10:26:11 -0700</creation_ts>
          <short_desc>Web Inspector: combine-resources.pl should support multiple transformations in one invocation</short_desc>
          <delta_ts>2016-12-13 15:33:35 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Blaze Burg">bburg</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>inspector-bugzilla-changes</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1228192</commentid>
    <comment_count>0</comment_count>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2016-09-09 10:26:11 -0700</bug_when>
    <thetext>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 &apos;External/Esprima&apos;)
 * 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1228193</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-09-09 10:26:33 -0700</bug_when>
    <thetext>&lt;rdar://problem/28227583&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>