Bug 278906
| Summary: | misleading run-webkit-app in README and usage output | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Chenfeng Pan <pancfmiaomiao> |
| Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | ap, brandonstewart, kkinnunen, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Mac (Intel) | ||
| OS: | macOS 14 | ||
Chenfeng Pan
According to https://github.com/WebKit/WebKit/blob/main/ReadMe.md#running-webkit, I can run some app using `Tools/Scripts/run-webkit-app <application-path>`. But when I input `run-webkit-app WebKitBuild/Debug-iphonesimulator/MobileMiniBrowser.app`, I got
> No build products could be found for specified build:
> configuration: "Release" [via default]
> products: /Users/bytedance/opensource/WebKit/WebKitBuild/Release
> To build this configuration, use the command `Tools/Scripts/build-webkit --release`.
> Once that completes, re-run this command.
Then I try to input `run-webkit-app --debug --ios-simulator WebKitBuild/Debug-iphonesimulator/MobileMiniBrowser.app` and then succeed. `--debug` `--ios-simulator` options are copied from https://github.com/WebKit/WebKit/blob/main/ReadMe.md#ios-simulator, not my random attempts.
So, I think the guide of run-webkit-app in ReadMe are confused, at least incomplete.
I also tried `run-webkit-app --help`, the output is as below
> Usage: run-webkit-app [options] [args ...]
> --help Show this help message
> --no-saved-state Launch the application without state restoration
> Options specific to macOS:
> -g|--guard-malloc Enable Guard Malloc
> --lang=LANGUAGE Use a specific language instead of system language.
> This accepts a language name (German) or a language code (de, ar, pt_BR, etc).
> --locale=LOCALE Use a specific locale instead of the system region.
> Options specific to iOS:
> --iphone-simulator Run the app in an iPhone Simulator
> --ipad-simulator Run the app in an iPad Simulator
The output maybe is already outdated?
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
Looks like `Tools/Scripts/run-webkit-app <application-path>` example is in the macOS section, so the fact that it works with iOS Simulator is undocumented.
So some of the improvements here are:
- Yes, need to add --debug to the example.
- Potentially document set-webkit-configuration, which is a way to avoid the need to pass --debug or --release all the time.
- Would be good to add that run-webkit-app works with the simulator (I assume that you verified that it actually successfully uses the locally built WebKit, and not the one from simulator runtime).
- Fix `run-webkit-app --help`. I'm not sure from the top of my head what --ios-simulator does as opposed to iPhone and iPad variants.
Would you be willing to post a PR with the improvements?
Chenfeng Pan
(In reply to Alexey Proskuryakov from comment #1)
> Looks like `Tools/Scripts/run-webkit-app <application-path>` example is in
> the macOS section, so the fact that it works with iOS Simulator is
> undocumented.
>
> So some of the improvements here are:
>
> - Yes, need to add --debug to the example.
>
> - Potentially document set-webkit-configuration, which is a way to avoid the
> need to pass --debug or --release all the time.
>
> - Would be good to add that run-webkit-app works with the simulator (I
> assume that you verified that it actually successfully uses the locally
> built WebKit, and not the one from simulator runtime).
>
> - Fix `run-webkit-app --help`. I'm not sure from the top of my head what
> --ios-simulator does as opposed to iPhone and iPad variants.
>
> Would you be willing to post a PR with the improvements?
I have already tried ‘run-WebKit-app —-iPhone-simulator’ which comes from usage output, and only got an error indicating unknown option. I didn’t try —-ipad-simulator option, but I guess the same result. So I think the usage definitely needs update.
And yeah,I will post a PR with the necessary improvements.
Chenfeng Pan
Pull request: https://github.com/WebKit/WebKit/pull/33034
Radar WebKit Bug Importer
<rdar://problem/135400493>
EWS
Committed 285197@main (e2f7bd55eda4): <https://commits.webkit.org/285197@main>
Reviewed commits have been landed. Closing PR #33034 and removing active labels.