<?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>206901</bug_id>
          
          <creation_ts>2020-01-28 12:06:03 -0800</creation_ts>
          <short_desc>[webkitperl] Clean up webkitdirs.pm</short_desc>
          <delta_ts>2021-10-17 12:43:46 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=231868</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>231869</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Basuke Suzuki">basuke</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>basuke</cc>
    
    <cc>jbedard</cc>
    
    <cc>krollin</cc>
    
    <cc>stephan.szabo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1612102</commentid>
    <comment_count>0</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2020-01-28 12:06:03 -0800</bug_when>
    <thetext>If we are moving to python toolchain, no need to do that. But for many years, things have been untouched and it seems same in the near future. Let&apos;s start cleaning up the messy webkitdir.pm and modularlize them into webkitperl directory.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1612107</commentid>
    <comment_count>1</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2020-01-28 12:27:26 -0800</bug_when>
    <thetext>This is a meta bug for the goal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1612115</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2020-01-28 12:42:21 -0800</bug_when>
    <thetext>This is going to be tough because of how webkitdirs.pm is used by into Apple internal scripts. But definitely a lot to improve here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1614079</commentid>
    <comment_count>3</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2020-02-03 12:15:02 -0800</bug_when>
    <thetext>(In reply to Alexey Proskuryakov from comment #2)
&gt; This is going to be tough because of how webkitdirs.pm is used by into Apple
&gt; internal scripts. But definitely a lot to improve here.

Are there a lot of changes in Apple internal branch?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1614184</commentid>
    <comment_count>4</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2020-02-03 14:46:35 -0800</bug_when>
    <thetext>(In reply to Basuke Suzuki from comment #3)
&gt; (In reply to Alexey Proskuryakov from comment #2)
&gt; &gt; This is going to be tough because of how webkitdirs.pm is used by into Apple
&gt; &gt; internal scripts. But definitely a lot to improve here.
&gt; 
&gt; Are there a lot of changes in Apple internal branch?

It not that there are possible conflicts, it&apos;s that there is code that might look dead in WebKit that&apos;s actually used by Apple internal scripts, or code that is used by Apple internal scripts in ways that the callee is not expecting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1615733</commentid>
    <comment_count>5</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2020-02-06 12:18:24 -0800</bug_when>
    <thetext>(In reply to Jonathan Bedard from comment #4)
&gt; (In reply to Basuke Suzuki from comment #3)
&gt; &gt; (In reply to Alexey Proskuryakov from comment #2)
&gt; &gt; &gt; This is going to be tough because of how webkitdirs.pm is used by into Apple
&gt; &gt; &gt; internal scripts. But definitely a lot to improve here.
&gt; &gt; 
&gt; &gt; Are there a lot of changes in Apple internal branch?
&gt; 
&gt; It not that there are possible conflicts, it&apos;s that there is code that might
&gt; look dead in WebKit that&apos;s actually used by Apple internal scripts, or code
&gt; that is used by Apple internal scripts in ways that the callee is not
&gt; expecting.

Can Apple add unit test for those? Oh, wait. There&apos;s no unittest for webkitdirs.pm lol

So deleting unused function or changing interface of existing one will be dangerous, isn&apos;t it?

Also can EWS catch those internal build break?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1615776</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2020-02-06 13:47:46 -0800</bug_when>
    <thetext>&gt; Also can EWS catch those internal build break?

No.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1616278</commentid>
    <comment_count>7</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2020-02-07 11:37:38 -0800</bug_when>
    <thetext>(In reply to Alexey Proskuryakov from comment #6)
&gt; &gt; Also can EWS catch those internal build break?
&gt; 
&gt; No.

That&apos;s so scary. Anyway, first target may be for CMake build related one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1800949</commentid>
    <comment_count>8</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2021-10-05 22:25:58 -0700</bug_when>
    <thetext>Goal:

- Modernize the codebase to 2021 perl syntax conventions
- Modularize by features.
- Modularize by platform.
- Stop using ad-hoc command line arguments. Document them well.
  (detect misspelled option)
- Passing cmake arguments easily. (i.e. arguments after &quot;--&quot; will be passed to cmake. Tools/Scripts/build-webkit --wincairo -- -DUSE_SYSTEM_MALLOC=Off)

Currently the last one is already implemented, but it conflicts with the other goal, &quot;stop using ad-hoc command&quot; because there&apos;s no clear separation to options to cmake args. Using &quot;--&quot; is a new thing and a good sign to introduce new features, I think.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1800956</commentid>
    <comment_count>9</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2021-10-05 22:49:29 -0700</bug_when>
    <thetext>Something like this:

1. Tools/Scripts/build-webkit --unknown-option

Run as same as current. Maybe display warnings in the future

2. Tools/Scripts/build-webkit -DSOME_CMAKE_VAR=Off

Run as same as current. Will be added to cmake args. Maybe warnings in the future.

3. Tools/Scripts/build-webkit --unknown-option --

Error. Unknown option &quot;--unknown-option&quot;

3. Tools/Scripts/build-webkit --wincairo -- -DUSE_SYSTEM_MALLOC=Off

Option --wincairo is used and &quot;-DUSE_SYSTEM_MALLOC=Off&quot; will be passed to cmake on top of the generated arguments in the script.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>