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
SymbolGraphGen: Unsafe{Mutable?}{Raw?}Pointer members have vanished #59957
Comments
update: it looks like the regression took place between the 5/31/2022 nightly and the 6/02/2022 nightly |
This might be fallout from #59531 - though the dates wouldn't line up, since that was only merged on 2022-06-23 (and its first pass was merged on 2022-06-16 and reverted that same day). I would guess that, even though these symbols are "public API", the fact that their protocol is prefixed with an underscore might suggest that they weren't intended to be. I'll ask around and see whether that was the case. |
the date in my last comment was off by a couple of days, 6/2 actually contains the members. they disappeared after 6/2, but reappeared in the 6/20 nightly only. they disappeared again in the 7/06 nightly. members of underscored protocols are absolutely public API. (arguably, so are the underscored protocols.) aside from the standard library, projects like SwiftNIO also depend on this. |
in general, i would urge you to not try to make assumptions about the "publicness" of an API based off of its spelling or many packages, like swift-system and swift-nio, do this kind of thing intentionally, and it should really be the responsibility of higher-level tooling (eg DocC, Biome, Jazzy, etc) to decide whether to show them or not. |
Underscored symbols are being filtered out by language specification:
APIs that are marked as |
I can picture adding a flag to |
yes, i am aware of TSPL’s prescription regarding underscored symbols, but this simply isn’t realistic to apply as a blanket policy, given how many projects in the ecosystem flaunt this recommendation. for example, it is not really possible to work with SwiftNIO without interacting with
a feature flag to opt-out of this behavior sounds like the correct solution to me. it does not need to be on by default. |
After chatting with some standard-library devs offline, i'm going to revert the PRs that implemented the "underscored protocol" behavior. I'll come back to add the flags to add the new behavior (showing underscored and unavailable symbols). |
thank you so much! |
Describe the bug
all APIs inherited from
_Pointer
have apparently vanished from standard library symbolgraphs as ofDEVELOPMENT-SNAPSHOT-2022-07-06-a
. many of these APIs are quite important, such as:UnsafePointer.successor()
UnsafePointer.init(bitPattern:)
this only affects APIs inherited from underscored protocols,
@available(*, unavailable)
APIs (such asSIMD2.+(_:_:)
) are unaffected.Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
_Pointer
APIs should be present, as they are in symbolgraphs generated by the april toolchain.The text was updated successfully, but these errors were encountered: