Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 46d3869ef51b0802a88106e99f509f55c9ca1091
      
https://github.com/WebKit/WebKit/commit/46d3869ef51b0802a88106e99f509f55c9ca1091
  Author: Elliott Williams <[email protected]>
  Date:   2026-01-08 (Thu, 08 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

Unreviewed, reland of 305233@main with scripting fix for older OS
versions.

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_unnecessary_allow_unqualified_methods_same_name):
(TestSDKDB):
(TestSDKDB.test_exported_in_nonnull):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to