<?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>246743</bug_id>
          
          <creation_ts>2022-10-19 07:13:39 -0700</creation_ts>
          <short_desc>webkitgtk 2.38.0 fails to build with upcoming ruby 3.2 due to removed File.exists?</short_desc>
          <delta_ts>2022-12-12 21:26:16 -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>JavaScriptCore</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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="Mamoru TASAKA">mtasaka</reporter>
          <assigned_to name="Fujii Hironori">fujii</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1906760</commentid>
    <comment_count>0</comment_count>
    <who name="Mamoru TASAKA">mtasaka</who>
    <bug_when>2022-10-19 07:13:39 -0700</bug_when>
    <thetext>Fedora 38 is now preparing for upcoming ruby3.2 (which is expected to be released on Chistmas of 2022),
and WebKitGTK 2.38.0 fails to build with ruby3.2 dev like:

--------------------------------------------------
FAILED: JavaScriptCore/DerivedSources/LLIntDesiredSettings.h /builddir/build/BUILD/webkitgtk-2.38.0/redhat-linux-build/webkit2gtk-5.0/JavaScriptCore/DerivedSources/LLIntDesiredSettings.h 
cd /builddir/build/BUILD/webkitgtk-2.38.0/redhat-linux-build/webkit2gtk-5.0/Source/JavaScriptCore &amp;&amp; /usr/bin/ruby /builddir/build/BUILD/webkitgtk-2.38.0/Source/JavaScriptCore/offlineasm/generate_settings_extractor.rb -I/builddir/build/BUILD/webkitgtk-2.38.0/redhat-linux-build/webkit2gtk-5.0/JavaScriptCore/DerivedSources/ /builddir/build/BUILD/webkitgtk-2.38.0/Source/JavaScriptCore/llint/LowLevelInterpreter.asm /builddir/build/BUILD/webkitgtk-2.38.0/redhat-linux-build/webkit2gtk-5.0/JavaScriptCore/DerivedSources/LLIntDesiredSettings.h X86_64
/builddir/build/BUILD/webkitgtk-2.38.0/Source/JavaScriptCore/offlineasm/parser.rb:879:in `block in parseIncludes&apos;: undefined method `exists?&apos; for File:Class (NoMethodError)

                if not File.exists?(fileName)
                           ^^^^^^^^
Did you mean?  exist?
	from /builddir/build/BUILD/webkitgtk-2.38.0/Source/JavaScriptCore/offlineasm/parser.rb:860:in `loop&apos;
	from /builddir/build/BUILD/webkitgtk-2.38.0/Source/JavaScriptCore/offlineasm/parser.rb:860:in `parseIncludes&apos;
	from /builddir/build/BUILD/webkitgtk-2.38.0/Source/JavaScriptCore/offlineasm/parser.rb:920:in `parseHash&apos;
	from /builddir/build/BUILD/webkitgtk-2.38.0/Source/JavaScriptCore/offlineasm/generate_settings_extractor.rb:58:in `&lt;main&gt;&apos;
--------------------------------------------------

File.exists? is deprecated since ruby 2.1 and is removed with ruby 3.2. People is expected
to simply replace this with File.exist?

The targets need fixing are:
--------------------------------------------------
./Source/JavaScriptCore/offlineasm/config.rb:26:if buildProductsDirectory and File.exists?(buildProductsDirectory)
./Source/JavaScriptCore/offlineasm/config.rb:30:if sdkRootDirectory and File.exists?(sdkRootDirectory)
./Source/JavaScriptCore/offlineasm/parser.rb:843:                if not File.exists?(fileName)
./Source/JavaScriptCore/offlineasm/parser.rb:846:                fileExists = File.exists?(fileName)
./Source/JavaScriptCore/offlineasm/parser.rb:879:                if not File.exists?(fileName)
./Source/JavaScriptCore/offlineasm/parser.rb:882:                fileExists = File.exists?(fileName)
./Source/WebInspectorUI/Scripts/update-LegacyInspectorBackendCommands.rb:39:      if !File.exists?(generated_path)
--------------------------------------------------


References:
https://github.com/ruby/ruby/blob/6378825df5c7abc7ef45f257057ffd21dc9e63b5/NEWS.md?plain=1#L245-L248
https://bugs.ruby-lang.org/issues/17391
https://docs.ruby-lang.org/ja/latest/method/File/s/exists=3f.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1918689</commentid>
    <comment_count>1</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2022-12-12 18:34:51 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/7531</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1918720</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-12-12 21:25:24 -0800</bug_when>
    <thetext>Committed 257775@main (b7ac5d0ccc7c): &lt;https://commits.webkit.org/257775@main&gt;

Reviewed commits have been landed. Closing PR #7531 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1918721</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-12-12 21:26:16 -0800</bug_when>
    <thetext>&lt;rdar://problem/103283634&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>