Bug 195977

Summary: Add support for more platforms to generate-xcfilelists
Product: WebKit Reporter: Keith Rollin <krollin>
Component: Tools / TestsAssignee: Keith Rollin <krollin>
Severity: Normal CC: ap, commit-queue, lforschler, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 195975    
Description Flags
Fix the location of the 'Reviewed by' statement in the changelog.
Fixed tvos-related aliases. none

Description Keith Rollin 2019-03-19 16:26:47 PDT
generate-xcfilelists incorrectly complains when involved with building WebKit for iphonesimulator:

$ make debug SDKROOT=iphonesimulator.internal -C Internal/
PhaseScriptExecution Check\ .xcfilelists /Volumes/Data/Safari/OpenSource/WebKitBuild/JavaScriptCore.build/Debug-iphonesimulator/JavaScriptCore.build/Script-53609F9021DFFA9C008FA60A.sh
    cd /Volumes/Data/Safari/OpenSource/Source/JavaScriptCore
    /bin/sh -c /Volumes/Data/Safari/OpenSource/WebKitBuild/JavaScriptCore.build/Debug-iphonesimulator/JavaScriptCore.build/Script-53609F9021DFFA9C008FA60A.sh
### (die get_canonical_platform_name main main) Unrecognized platform name: iphonesimulator
GXCF: === Generating .xcfilelists for JavaScriptCore/iphonesimulator/Debug ===
GXCF: === Merging .xcfilelists for JavaScriptCore ===

Address this by teaching generate-xcfilelists about more platforms.

Comment 1 Keith Rollin 2019-03-19 16:33:03 PDT
Created attachment 365257 [details]
Comment 2 Keith Rollin 2019-03-19 16:38:29 PDT
Created attachment 365260 [details]
Fix the location of the 'Reviewed by' statement in the changelog.
Comment 3 Alexey Proskuryakov 2019-03-19 16:47:06 PDT
Comment on attachment 365260 [details]
Fix the location of the 'Reviewed by' statement in the changelog.

View in context: https://bugs.webkit.org/attachment.cgi?id=365260&action=review

Conditional r=me assuming that you either tested tvOS simulator code path, or will test it and fix as necessary.

> Tools/Scripts/generate-xcfilelists:642
> +    [[ "${GX_PROVISIONAL_PLATFORM_NAME}" == "tvsimulator" ]] && { echo "tvsimulator"; return; }

I'm not quite sure where this string goes in the end, but my guess is that it should be appletvsimulator, not tvsimulator.
Comment 4 Keith Rollin 2019-03-19 18:34:11 PDT
Created attachment 365283 [details]
Fixed tvos-related aliases.
Comment 5 WebKit Commit Bot 2019-03-19 20:56:21 PDT
Comment on attachment 365283 [details]
Fixed tvos-related aliases.

Clearing flags on attachment: 365283

Committed r243188: <https://trac.webkit.org/changeset/243188>
Comment 6 WebKit Commit Bot 2019-03-19 20:56:23 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Alexey Proskuryakov 2019-03-20 10:21:55 PDT
Can GX_PROVISIONAL_PLATFORM_NAME actually be "tvsimulator"? It seems undesirable to be lax with input unless there is a specific string reason to accept multiple variants.
Comment 8 Keith Rollin 2019-03-20 12:32:53 PDT
I accept variants on the command line when executing the script by hand. I didn't want people to have to remember that it's "macosx" as opposed to "osx" or "macos", or "iphoneos" as opposed to "ios". What you're seeing with "tvsimulator" is that thought extended to tvOS and friends. Since I made the mistake of omitting the "apple" prefix in an earlier version of the patch, this seems like it might be a common mistake for people to make.

This system of aliases is in-line with the Robustness Principle / Postel's Law: "Be conservative in what you do, be liberal in what you accept from others" (though, admittedly, this principle is not without its critics).