Skip to content

[SPI Checking] Add partial SDKDBs for current iOS SDK and enable analysis#44376

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
emw-apple:eng/SPI-Checking-Add-partial-SDKDBs-for-current-iOS-SDK-and-enable-analysis
May 6, 2025
Merged

[SPI Checking] Add partial SDKDBs for current iOS SDK and enable analysis#44376
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
emw-apple:eng/SPI-Checking-Add-partial-SDKDBs-for-current-iOS-SDK-and-enable-analysis

Conversation

@emw-apple
Copy link
Copy Markdown
Contributor

@emw-apple emw-apple commented Apr 22, 2025

8a618fa

[SPI Checking] Add partial SDKDBs for current iOS SDK and enable analysis
https://bugs.webkit.org/show_bug.cgi?id=291613
rdar://149358945

Reviewed by Sam Sneddon and Jonathan Bedard.

Add partial SDKDB records for iOS 18.2. These are generated using `tapi
sdkdb` from the public SDK image, and are named according to the public
libraries they represent (though, for brevity, the binary info is
stripped from SDKDB content).

This is a lot of data to check in, but as JSON blobs, SDKDBs compress
well (the objects are 2.3MB compared to 24MB in tree), and are
relatively stable between OS versions. For example, while this
introductory patch is 333K LOC, the patch to update for iOS 18.4 is
10824 insertions(+), 2430 deletions(-).

Enable auditing for open-source iOS builds and change some audit-spi
invocation logic to make it possible to audit with newer versions of iOS
than the one we've checked in records for.

* Configurations/CommonBase.xcconfig:
* Configurations/WebKitProjectPaths.xcconfig:
* Source/WTF/Scripts/audit-spi-if-needed.sh:
* WebKitLibraries/SDKDBs/iphoneos18.2/: Lots of partial SDKDBs added.

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

eb82148

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ✅ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-arm64 ✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ❌ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp ✅ 🛠 jsc-armv7
✅ 🛠 tv-sim ✅ 🧪 jsc-armv7-tests
✅ 🛠 watch
✅ 🛠 watch-sim

@emw-apple emw-apple force-pushed the eng/SPI-Checking-Add-partial-SDKDBs-for-current-iOS-SDK-and-enable-analysis branch from ab6cf10 to 2ae196c Compare April 22, 2025 19:42
@emw-apple emw-apple self-assigned this Apr 22, 2025
@emw-apple emw-apple added the Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases label Apr 22, 2025
@emw-apple emw-apple force-pushed the eng/SPI-Checking-Add-partial-SDKDBs-for-current-iOS-SDK-and-enable-analysis branch from 2ae196c to 1f5364d Compare April 24, 2025 02:40
@emw-apple emw-apple force-pushed the eng/SPI-Checking-Add-partial-SDKDBs-for-current-iOS-SDK-and-enable-analysis branch from 1f5364d to d8bf110 Compare May 5, 2025 17:53
@emw-apple
Copy link
Copy Markdown
Contributor Author

For example, while this
introductory patch is 333K LOC, the patch to update for iOS 18.4 is +11K
insertions, -2K deletions.

Here's what that patch will actually look like: emw-apple/WebKit@emw-apple:eng/SPI-Checking-Add-partial-SDKDBs-for-current-iOS-SDK-and-enable-analysis...emw-apple:WebKit:eng/spi-checking-iphoneos18.4-sdkdb

Copy link
Copy Markdown
Member

@gsnedders gsnedders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's what that patch will actually look like: emw-apple/WebKit@emw-apple:eng/SPI-Checking-Add-partial-SDKDBs-for-current-iOS-SDK-and-enable-analysis...emw-apple:WebKit:eng/spi-checking-iphoneos18.4-sdkdb

I don't think the diff is awful.

To note, of the -2.5k deletions:

368 are - "target": "arm64{,e}-apple-ios18.2".

Some of the changes, like AVPlayerMediaSelectionCriteria's initWithPreferredLanguages:preferredMediaCharacteristics: seem like they're purely reordering?

The biggest category of changes, and the one that slightly worries me, seems to be globals removing "unavailable": true. We don't seem to ever read unavailable, and I'm not totally sure what it refers to — is this just symbols marked as unavailable on that platform? If so, we can likely filter them out while they're unavailable, because it effectively means they don't exist. Otherwise, we should probably be checking they're unused?

We should figure out the answer to that last point before landing this, IMO — as otherwise we might be bogusly allowing SPI?

@emw-apple emw-apple force-pushed the eng/SPI-Checking-Add-partial-SDKDBs-for-current-iOS-SDK-and-enable-analysis branch from d8bf110 to eb82148 Compare May 6, 2025 00:58
@emw-apple
Copy link
Copy Markdown
Contributor Author

To note, of the -2.5k deletions:

368 are - "target": "arm64{,e}-apple-ios18.2".

Some of the changes, like AVPlayerMediaSelectionCriteria's initWithPreferredLanguages:preferredMediaCharacteristics: seem like they're purely reordering?

Good catch – it looks like tapi did not order these the way I thought it would when I generated them. Fixed in the latest revision.

The biggest category of changes, and the one that slightly worries me, seems to be globals removing "unavailable": true. We don't seem to ever read unavailable, and I'm not totally sure what it refers to — is this just symbols marked as unavailable on that platform? If so, we can likely filter them out while they're unavailable, because it effectively means they don't exist. Otherwise, we should probably be checking they're unused?

We should figure out the answer to that last point before landing this, IMO — as otherwise we might be bogusly allowing SPI?

I think these are fine. "unavailable" refers to API_AVAILABLE attributes on declarations, not whether it is public API.

@emw-apple emw-apple requested a review from gsnedders May 6, 2025 01:01
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 6, 2025
@emw-apple emw-apple added merge-queue Applied to send a pull request to merge-queue and removed merging-blocked Applied to prevent a change from being merged labels May 6, 2025
…ysis

https://bugs.webkit.org/show_bug.cgi?id=291613
rdar://149358945

Reviewed by Sam Sneddon and Jonathan Bedard.

Add partial SDKDB records for iOS 18.2. These are generated using `tapi
sdkdb` from the public SDK image, and are named according to the public
libraries they represent (though, for brevity, the binary info is
stripped from SDKDB content).

This is a lot of data to check in, but as JSON blobs, SDKDBs compress
well (the objects are 2.3MB compared to 24MB in tree), and are
relatively stable between OS versions. For example, while this
introductory patch is 333K LOC, the patch to update for iOS 18.4 is
10824 insertions(+), 2430 deletions(-).

Enable auditing for open-source iOS builds and change some audit-spi
invocation logic to make it possible to audit with newer versions of iOS
than the one we've checked in records for.

* Configurations/CommonBase.xcconfig:
* Configurations/WebKitProjectPaths.xcconfig:
* Source/WTF/Scripts/audit-spi-if-needed.sh:
* WebKitLibraries/SDKDBs/iphoneos18.2/: Lots of partial SDKDBs added.

Canonical link: https://commits.webkit.org/294570@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/SPI-Checking-Add-partial-SDKDBs-for-current-iOS-SDK-and-enable-analysis branch from eb82148 to 8a618fa Compare May 6, 2025 18:43
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 294570@main (8a618fa): https://commits.webkit.org/294570@main

Reviewed commits have been landed. Closing PR #44376 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 8a618fa into WebKit:main May 6, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants