RESOLVED FIXED 186352
webkitperl: Generalize .internal SDK suffix
https://bugs.webkit.org/show_bug.cgi?id=186352
Summary webkitperl: Generalize .internal SDK suffix
Jonathan Bedard
Reported 2018-06-06 09:20:27 PDT
The current assumption about only embedded device sdk's appending .internal is too limiting. Generalize this code to cover all possible trailing sdk specifications.
Attachments
Patch (3.55 KB, patch)
2018-06-06 09:26 PDT, Jonathan Bedard
no flags
Patch (5.94 KB, patch)
2018-06-06 10:39 PDT, Jonathan Bedard
no flags
Patch (5.68 KB, patch)
2018-06-06 12:05 PDT, Jonathan Bedard
no flags
Patch (9.01 KB, patch)
2018-06-06 16:56 PDT, Jonathan Bedard
no flags
Patch for landing (9.00 KB, patch)
2018-06-07 08:45 PDT, Jonathan Bedard
no flags
Radar WebKit Bug Importer
Comment 1 2018-06-06 09:21:22 PDT
Jonathan Bedard
Comment 2 2018-06-06 09:26:45 PDT
Jonathan Bedard
Comment 3 2018-06-06 09:27:29 PDT
(In reply to Jonathan Bedard from comment #2) > Created attachment 342051 [details] > Patch Change still needs to be verified on a few different configurations and some help messages need to be updated.
Alexey Proskuryakov
Comment 4 2018-06-06 10:27:53 PDT
Comment on attachment 342051 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=342051&action=review > Tools/Scripts/webkitdirs.pm:507 > +sub availableXcodeSDKS A function with this name would need to return the SDKs. I think that you want "determineAvailableXcodeSDKs". > Tools/Scripts/webkitdirs.pm:553 > + # Prefer the more specific version of an sdk, if it exists. Should just say that we prefer the internal version. > Tools/Scripts/webkitdirs.pm:558 > + next if (index($sdk, "$xcodeSDK.") == -1); and check for exactly that.
Jonathan Bedard
Comment 5 2018-06-06 10:39:39 PDT
Jonathan Bedard
Comment 6 2018-06-06 10:52:05 PDT
(In reply to Alexey Proskuryakov from comment #4) > Comment on attachment 342051 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=342051&action=review > > > Tools/Scripts/webkitdirs.pm:507 > > +sub availableXcodeSDKS > > A function with this name would need to return the SDKs. I think that you > want "determineAvailableXcodeSDKs". Fixed in the updated patch. > > > Tools/Scripts/webkitdirs.pm:553 > > + # Prefer the more specific version of an sdk, if it exists. > > Should just say that we prefer the internal version. > > > Tools/Scripts/webkitdirs.pm:558 > > + next if (index($sdk, "$xcodeSDK.") == -1); > > and check for exactly that.
Daniel Bates
Comment 7 2018-06-06 11:36:50 PDT
Not a fan of this parsing dance. Preferred the old style.
Daniel Bates
Comment 8 2018-06-06 11:36:59 PDT
Comment on attachment 342060 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=342060&action=review > Tools/Scripts/package-root:52 > + --ios-simulator Use "iphonesimulator.*" SDK if installed, else "iphonesimulator" SDK (iOS only) Is this correct?
Daniel Bates
Comment 9 2018-06-06 11:40:57 PDT
Comment on attachment 342060 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=342060&action=review > Tools/Scripts/webkitdirs.pm:513 > + if ($line =~ /-sdk (\D+)([\d\.]+)(\D*)\n/) { Specifically, not a fan of using regular expressions for this. I prefer hardcoidng the SDK name over this regex. Also prefer the failure mode of a hard coded name over a regex that may silently match something it shouldn’t. If we really need to use a regex then please split it out into its own function and add unit tests for this.
Jonathan Bedard
Comment 10 2018-06-06 12:05:51 PDT
Jonathan Bedard
Comment 11 2018-06-06 16:56:28 PDT
Alexey Proskuryakov
Comment 12 2018-06-06 20:13:13 PDT
Comment on attachment 342096 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=342096&action=review > Tools/Scripts/webkitdirs.pm:508 > +sub parseAvailableXcodeSDKS($) I think that the last s should be lower case. > Tools/Scripts/webkitdirs.pm:528 > +sub availableXcodeSDKS Ditto.
Jonathan Bedard
Comment 13 2018-06-07 08:45:30 PDT
Created attachment 342171 [details] Patch for landing
WebKit Commit Bot
Comment 14 2018-06-07 09:24:54 PDT
Comment on attachment 342171 [details] Patch for landing Clearing flags on attachment: 342171 Committed r232583: <https://trac.webkit.org/changeset/232583>
WebKit Commit Bot
Comment 15 2018-06-07 09:24:56 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.