New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SE-NNNN] Simplify internals of Codable-related APIs #63172
base: main
Are you sure you want to change the base?
Conversation
082b410
to
263f5de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
If forced to, we could work around the api-digester false positives by adding these to the exceptions list.
@lorentey Thanks for the review. If only I hadn't mentioned those protocols during your pitch:
Would another proposal be worthwhile, even if the primary associated types will only be used internally?
#63184 (comment) had many more false positives. Can we trust api-digester to check for mangled name changes, because they shouldn't be affected by |
I think this would need a short proposal, yes. Adding a primary associated type only to simplify internals should be a worthy enough goal.
The api-digester usually has low specificity, but very high sensitivity. So the rate of false positives is high, but false negatives are usually rare. (Or perhaps we just haven't realized yet that we've been shipping breaking changes. 😝) |
@swift-ci Please benchmark |
https://ci.swift.org/job/swift-PR-macos-perf/567/ Performance (x86_64): -O
Code size: -OPerformance (x86_64): -Osize
Code size: -OsizePerformance (x86_64): -Onone
Code size: -swiftlibsHow to read the dataThe tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.If you see any unexpected regressions, you should consider fixing the Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
The internal base classes were made non-generic in #31278. Would removing them be a regression? The results didn't show any differences in either code size; or in the performance of CodableTest.swift benchmarks. |
@swift-ci Please smoke test |
Proposal SE-NNNN:
Add two primary associated types?
Replaces internal stdlib classes with constrained existentials.
Add a non-failable initializer?
This could be used by the
CodingUserInfoKey.actorSystemKey
.Resolves #49302