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

VSCode cannot read types generated by the OpenAPI Swift plugin (Xcode can). #774

Closed
dangdennis opened this issue May 1, 2024 · 2 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@dangdennis
Copy link

Describe the bug

If you run one of the examples from swift-openapi-generator, vscode is not able to read the types generated by the plugin. The types are visible in ./build/plugins/outputs/<library-name>. However, the compiler builds just fine.

However, Xcode is able to understand the types used.

To Reproduce
Steps to reproduce the behavior:

  1. Clone an example.
  2. Open just the example project folder in vscode.
  3. Build the project with swift build.
  4. Expect to see the types for Client and APIProtocol on mouse hover.

Expected behavior
I expect vscode to be able to recognize the generated types.

Environment

  • OS: macOS 14.4.1 (23E224)
  • Swift 5.10
  • Visual Studio Code version: 1.88.1 (Universal)
  • vscode-swift version: v1.9.0
@dangdennis dangdennis added the bug Something isn't working label May 1, 2024
@dangdennis
Copy link
Author

Would love to help solve this as I've enjoyed the Swift on Server ecosystem and tools so far.

@adam-fowler
Copy link
Contributor

Would love to help solve this as I've enjoyed the Swift on Server ecosystem and tools so far.

Thank you for the offer. This is a known issue with SourceKit-LSP. It is tracked in swiftlang/sourcekit-lsp#665 and swiftlang/swift-package-manager#6700.

I'm going to close this as a duplicate and also because it is not resolvable at the VSCode extension level.

@adam-fowler adam-fowler closed this as not planned Won't fix, can't repro, duplicate, stale May 1, 2024
@adam-fowler adam-fowler added the duplicate This issue or pull request already exists label May 1, 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 duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants