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

Don't work with plugin generated code #1624

Closed
yaroslavyaroslav opened this issue Aug 13, 2024 · 2 comments
Closed

Don't work with plugin generated code #1624

yaroslavyaroslav opened this issue Aug 13, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@yaroslavyaroslav
Copy link
Contributor

Swift version

swiftlang-6.0.0.7.6 clang-1600.0.24.1

Platform

macOS 15

Editor

Sublime Text 4

Does the issue reproduce with Swift 6?

Yes

Description

sourcekit-lsp fails to provide code completion for plugin generated code. It fails in either mode regardless of is background indexing enabled or not. Tested on ST4, but as if it's server problem it should reproduce in any editor of choice.

Steps to Reproduce

  1. Install on sublime text LSP and LSP-Sourcekit packages.
  2. clone [email protected]:apple/swift-openapi-generator.git
  3. cd swift-openapi-generator/Examples/hello-world-urlsession-client-example/
  4. subl .
  5. Open the only presented swift file in project Sources/HelloWorldURLSessionClient/HelloWorldURLSessionClient.swift within editor.
  6. if background-indexing is enabled — wait till it finishes. If it's not, build the project.
  7. Restart the sourcekit-lsp server.

Completion and type hinting works for user defined types and types from stdlib, but not for Client object, which is generated by plugin.

Logging

sourcekit-lsp.log

@yaroslavyaroslav yaroslavyaroslav added the bug Something isn't working label Aug 13, 2024
@yaroslavyaroslav yaroslavyaroslav changed the title Don't work with plugins generated code Don't work with plugin generated code Aug 13, 2024
@ahoppen
Copy link
Member

ahoppen commented Aug 13, 2024

Synced to Apple’s issue tracker as rdar://133778179

@ahoppen
Copy link
Member

ahoppen commented Aug 14, 2024

This appears to be the same issue as #665, which also contains a workaround

@ahoppen ahoppen closed this as completed Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants