Files
Xi Ge 91e0516269 api-digester: diagnose thrown error type changes. rdar://187856667
The ABI checker only tracked whether a function throws, not what it
throws. Switching from untyped `throws` to `throws(MyError)`, or between
two typed errors, changes the mangled symbol, but it only showed up as a
non-fatal "mangled name changing" warning, so `-error-on-abi-breakage`
let a real ABI break through. The digester now records the typed thrown
error in its JSON dump (format version 10) and reports any change as an
ABI breakage. The check only runs when both sides are version 10, so it
is a no-op until existing baselines are regenerated. The extension-move
version check is fixed along the way so older baselines keep comparing
cleanly.

The API checker didn't notice these changes at all. It now reports the
ones that can break client source: moving away from a typed error, since
callers may catch the specific type, and narrowing untyped `throws` to a
typed error on protocol requirements and on members clients can override,
since their existing untyped implementations stop matching. Narrowing on
other decls stays quiet because callers keep compiling. Getters that
start throwing are now diagnosed too.
2026-10-20 08:29:47 -07:00
..