Skip to content

[5.3][SourceKit/CursorInfo] Still print implicit decls in cursorinfo to handle compiler synthesized decls #32603

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

Conversation

nathawes
Copy link
Contributor

@nathawes nathawes commented Jun 29, 2020

Cherry-pick of #32575 for 5.3

  • Explanation:
    We weren't printing implicit decls like member-wise inits and shorthand arguments (e.g. $0, $1) in the annotated decl and fully-annotated decl fields of sourcekitd's cursor info response, leaving them empty. This meant IDE features relying on these fields, like Quick Help in Xcode, wouldn't work on references to such decls decls.
  • Scope: Affects all decls marked as implicit in the AST that can still be referenced in source code (i.e. can be a cursor-info target). This includes compiler-synthesized decls like member-wise inits, shorthand closure arguments, 'oldValue' in didSet blocks, 'error' in catch blocks, etc.
  • Risk: Low. This only affects sourcekitd's CursorInfo request. It has no impact on the other requests or the compiler.
  • Origination: This seems to have regressed in the 5.1 release.
  • Testing: Added a regression test covering this case and all existing tests pass.
  • Reviewer: Ben Langmuir (@benlangmuir) on the master PR.

Resolves rdar://problem/58929991

…ndle compiler synthesized decls

We weren't printing memberwise inits, shorthand arguments (e.g. $0, $1), and
other implicit decls, so cursor info would give empty annotated decl and fully
annotated decl fields for them.

Resolves rdar://problem/58929991
@nathawes
Copy link
Contributor Author

@swift-ci please test

@nathawes nathawes added the r5.3 label Jun 29, 2020
@nathawes nathawes changed the title [SourceKit/CursorInfo] Still print implicit decls in cursorinfo to handle compiler synthesized decls [5.3][SourceKit/CursorInfo] Still print implicit decls in cursorinfo to handle compiler synthesized decls Jun 29, 2020
@nathawes nathawes requested a review from akyrtzi June 29, 2020 22:12
@nathawes nathawes marked this pull request as ready for review June 29, 2020 22:13
@nathawes nathawes requested a review from a team as a code owner June 29, 2020 22:13
@nathawes
Copy link
Contributor Author

@swift-ci please nominate

@akyrtzi akyrtzi merged commit 7323cab into swiftlang:release/5.3 Jun 29, 2020
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants