Skip to content
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

[Swift 6] SPI attributes missing from sourcekit cursorinfo #74547

Open
johnfairh opened this issue Jun 19, 2024 · 0 comments
Open

[Swift 6] SPI attributes missing from sourcekit cursorinfo #74547

johnfairh opened this issue Jun 19, 2024 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. SourceKit Area → source tooling: SourceKit

Comments

@johnfairh
Copy link
Contributor

Description

CursorInfo in Swift 6 has stopped reporting all attributes in declarations - in particular the @_spi attribute is missing. This has lost the information about what SPI group a declaration is in.

(This isn't about key.attributes which continues to correctly indicate whether any _spis are set.)

Reproduction

cursorinfo against:

@_spi(Hello)
public struct Barney {}

Expected behavior

Swift 5.10:

"key.fully_annotated_decl" : "<decl.struct>
    <syntaxtype.attribute.name>@_spi<\/syntaxtype.attribute.name>(Hello)
    <syntaxtype.keyword>public<\/syntaxtype.keyword>
    <syntaxtype.keyword>struct<\/syntaxtype.keyword>
    <decl.name>Barney<\/decl.name
><\/decl.struct>"

Swift 6:

"key.fully_annotated_decl" : "<decl.struct>
    <syntaxtype.keyword>public<\/syntaxtype.keyword>
    <syntaxtype.keyword>struct<\/syntaxtype.keyword>
    <decl.name>Barney<\/decl.name>
<\/decl.struct>"

Environment

Xcode 16.0 beta (16A5171c)

swift-driver version: 1.109.2 Apple Swift version 6.0 (swiftlang-6.0.0.3.300 clang-1600.0.20.10)
Target: x86_64-apple-macosx14.0

Additional information

No response

@johnfairh johnfairh added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Jun 19, 2024
@hborla hborla added SourceKit Area → source tooling: SourceKit and removed triage needed This issue needs more specific labels labels Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. SourceKit Area → source tooling: SourceKit
Projects
None yet
Development

No branches or pull requests

2 participants