Skip to content

Rename Swift Interface to Generated Interface #878

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

Closed
ahoppen opened this issue Oct 9, 2023 · 1 comment · Fixed by #1460
Closed

Rename Swift Interface to Generated Interface #878

ahoppen opened this issue Oct 9, 2023 · 1 comment · Fixed by #1460
Labels
refactoring An internal refactoring of the codebase

Comments

@ahoppen
Copy link
Member

ahoppen commented Oct 9, 2023

When generating an interface for a Swift module or a file as part of the OpenInterfaceRequest, we currently refer to it as a Swift Interface, which isn’t technically true. .swiftinterface files are distributed as part of library evolution, while the generated interfaces are generated by an IDE.

We should use correct terminology here and refer to the interfaces we produce in sourcekit-lsp as Generated Interfaces, not Swift Interfaces.

@ahoppen ahoppen added the refactoring An internal refactoring of the codebase label Oct 9, 2023
@ahoppen
Copy link
Member Author

ahoppen commented Oct 9, 2023

Tracked in Apple’s issue tracker as rdar://116705653

ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this issue Jun 8, 2024
- Rename methods to highlight that we’re talking about generated interfaces here, not `.swiftinterface` files
- Don’t open the generated interface in `documentManager`. Opening documents in `documentManager` should only be done by the `textDocument/didOpen` notification from the LSP client. Otherwise we might indefinitely keep the document in the document manager
- After getting the generated interface from sourcekitd, close the document in sourcekitd again. We don’t provide semantic functionality in the generated interface yet, so we can’t interact with the generated interface path. Before, we left it open in sourcekitd indefinitely.
- A couple of code simplifications.

Fixes swiftlang#878
rdar://116705653
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring An internal refactoring of the codebase
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant