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

Swiftinterface symbol lookup (release/5.9) #750

Merged

Conversation

adam-fowler
Copy link
Contributor

@adam-fowler adam-fowler commented May 24, 2023

  • Explanation: Jumping to a definition to a type that is defined in the SDK and not the user’s code currently doesn’t work because SourceKit-LSP doesn’t know where to jump to. This add support for jumping to a declaration in the SDK by using the existing infrastructure to generate a generated interface for the SDK module, using sourcekitd to figure out where in that interface the type is declared and jumping to it.
  • Scope: Jump to definition of SDK symbols
  • Risk: Low, previously jump to definition didn’t work for these symbols add all
  • Testing: Added test case
  • Issue: Add support for jump to definition for stdlib/Foundation symbols #618 / rdar://99329577
  • Reviewer: @ahoppen on Swiftinterface symbol lookup #747

Generate swiftinterface for symbol lookup

When a symbol definition returns it is in a swiftinterface file, create textual version of swiftinterface and return that in response.

Extend OpenInterface to also seatch for a symbol

Fix warning

Syntax changes after review

Move module name split into OpenInterfaceRequest

Use group names when running open interface request

Requested changes from PR

rename symbol to symbolUSR
Cleanup OpenInterfaceRequest.init

Fix tests

Added testDefinitionInSystemModuleInterface

Use SwiftPMPackage test module
Added version of buildAndIndex that includes system symbols

Merge buildAndIndexWithSystemSymbols with buildAndIndex

Added specific test project for system swiftinterface tests

Add multiple tests for various system modules
@adam-fowler adam-fowler force-pushed the af-swiftinterface-symbol-lookup-5.9 branch from 6306c40 to 9ca8966 Compare May 24, 2023 17:55
@ahoppen
Copy link
Member

ahoppen commented May 25, 2023

@swift-ci Please test

@ahoppen
Copy link
Member

ahoppen commented May 26, 2023

@swift-ci Please test macOS

@ahoppen ahoppen merged commit ff667c2 into swiftlang:release/5.9 May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants