Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 560b5b74032815b7d0019dddd9b34a8dada437c6
https://github.com/WebKit/WebKit/commit/560b5b74032815b7d0019dddd9b34a8dada437c6
Author: Elliott Williams <[email protected]>
Date: 2026-01-07 (Wed, 07 Jan 2026)
Changed paths:
M Source/WTF/Scripts/audit-spi-if-needed.sh
M Tools/Scripts/libraries/webkitapipy/webkitapipy/sdkdb.py
M Tools/Scripts/libraries/webkitapipy/webkitapipy/sdkdb_unittest.py
Log Message:
-----------
[audit-spi] SDKDB cache contains multiples of each API declaration when
switching between Xcodes
https://bugs.webkit.org/show_bug.cgi?id=304224
rdar://166578115
Reviewed by Alexey Proskuryakov.
We cache the SDKDB at a path like
`WebKitBuild/WebKitSDKDBs/iphoneos26.0.sqlite3`. When switching between
different Xcode bundles with the same SDK, the cache will be updated
with API declarations from each SDK, for libraries that we treat
as implicitly API and load from the SDK.
This wastes space and reveals a bug in the main query: when diagnosing
an UnnecessaryAllowedName, it may be exported from multiple entries in
the SDKDB cache; one for the loaded SDK, and others for the other copies
of the SDK seeded in the cache. The query assumes that the `input_file`
of the declaration will always be nonnull, because any matched
declaration comes from a file in the window. But because the field was
not aggregated, its value could come from one of the un-loaded entries
and be NULL.
Fix this, and change how Xcode invokes audit-spi to isolate different
copies of the same SDK.
* Source/WTF/Scripts/audit-spi-if-needed.sh:
* Tools/Scripts/libraries/webkitapipy/webkitapipy/sdkdb.py:
(SDKDB.audit):
* Tools/Scripts/libraries/webkitapipy/webkitapipy/sdkdb_unittest.py:
(TestSDKDB.add_library):
(TestSDKDB.test_audit_unused_allow_multiple_allowlists):
(TestSDKDB):
(TestSDKDB.test_exported_in_nonnull):
Canonical link: https://commits.webkit.org/305233@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications