Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 85a8efec82daa8e4751f728967cb0736b9c27ce0
      
https://github.com/WebKit/WebKit/commit/85a8efec82daa8e4751f728967cb0736b9c27ce0
  Author: Zak Ridouh <[email protected]>
  Date:   2026-05-19 (Tue, 19 May 2026)

  Changed paths:
    M Tools/Scripts/webkitpy/minibrowser/run_webkit_app.py
    M Tools/Scripts/webkitpy/swiftbrowser/run_webkit_app.py

  Log Message:
  -----------
  Fix run-minibrowser/run-swiftbrowser crash on argparse 'const' kwarg
https://bugs.webkit.org/show_bug.cgi?id=315130
rdar://177472652

Reviewed by Pascoe.

run-minibrowser and run-swiftbrowser translate each optparse Option from
configuration_options() / platform_options() into an argparse add_argument()
call, and were unconditionally forwarding const=option.const. That worked
while every option used action='store' or 'store_const' (both accept const),
but 313522@main added --cmake with action='store_true'. argparse's
_StoreTrueAction.__init__ does not accept a const keyword, so the loop now
raises:

    TypeError: __init__() got an unexpected keyword argument 'const'

before the parser is even built, breaking both scripts at startup.

Only forward const= for the actions that accept it (store_const,
append_const). All other options keep their previous behavior.

* Tools/Scripts/webkitpy/minibrowser/run_webkit_app.py:
(main):
* Tools/Scripts/webkitpy/swiftbrowser/run_webkit_app.py:
(main):

Canonical link: https://commits.webkit.org/313527@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to