-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib, 6.2] add missing computed properties (again) #82422
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
[stdlib, 6.2] add missing computed properties (again) #82422
Conversation
@swift-ci please test |
@@ -933,6 +933,8 @@ Added: _$ss10ArraySliceV11mutableSpans07MutableD0VyxGvr | |||
Added: _$ss15ContiguousArrayV11mutableSpans07MutableD0VyxGvr | |||
Added: _$ss11InlineArrayVsRi__rlE11mutableSpans07MutableD0Vyq_Gvr | |||
Added: _$ss15CollectionOfOneV11mutableSpans07MutableE0VyxGvr | |||
Added: _$sSrsRi_zrlE11mutableSpans07MutableB0VyxGvr | |||
Added: _$sSw12mutableBytess14MutableRawSpanVvr |
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.
Hmm. Could the property itself have been @_alwaysEmitIntoClient
to avoid these symbols, or no?
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.
Unfortunately computed properties for escapable types produce symbols to support keypaths. This is fixed for non-escapable types: their computed properties do not produce symbols.
Actually that's right, moving @_alwaysEmitIntoClient
to the property rather than the accessor makes the symbol go away for these.
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.
Yay!
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.
@glessard can you follow up with a PR to do that?
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.
Of course! I've started searching for how many other span/mutableSpan/etc symbols I missed this way…
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.
Note: followup here.
SE-0467 adds an unsafe mutableSpan property to UnsafeMutableBufferPointer, and a similar mutableBytes property to UnsafeMutableRawBufferPointer. Implemented here.
(Requires #82269 and #82381, reinstates #82284 after its #82351.)
Scope: Addition only.
Radar/SR Issue: rdar://153768604
main PR: #82277
Risk: Low.
Testing: Added unit tests
Reviewer: @Azoy, @stephentyrone