Skip to content

Commit

Permalink
Add a note about an open issue with code generation and SourceKit-LSP (
Browse files Browse the repository at this point in the history
…#642)

Following the discussion on Slack, this adds a note for users of
SourceKit-LSP informing them that the default code generation might not
work as expected and offers a possible workaround.


https://swift-open-source.slack.com/archives/C02PV8T5HQD/p1726815970093299

Only updates documentation. Let me know if you feel this is the right
place for this information?
  • Loading branch information
t089 authored Nov 23, 2024
1 parent a99ba2f commit e971af5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ platforms, listed below.
| Generator plugin and CLI | ✅ 10.15+ || ✖️ | ✖️ | ✖️ | ✖️ |
| Generated code and runtime library | ✅ 10.15+ || ✅ 13+ | ✅ 13+ | ✅ 6+ | ✅ 1+ |

> [!NOTE]
> When using Visual Studio Code or other editors that rely on [SourceKit-LSP](https://github.com/swiftlang/sourcekit-lsp), the editor may not correctly recognize generated code within the same module. As a workaround, consider creating a separate target for code generation and then importing it into your main module. For more details, see the discussion in [swiftlang/sourcekit-lsp#665](https://github.com/swiftlang/sourcekit-lsp/issues/665#issuecomment-2093169169).
## Documentation and example projects

To get started, check out the [documentation][docs-generator], which contains
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ The generated code, runtime library, and transports are supported on more platfo
| Generator plugin and CLI | ✅ 10.15+ || ✖️ | ✖️ | ✖️ | ✖️ |
| Generated code and runtime library | ✅ 10.15+ || ✅ 13+ | ✅ 13+ | ✅ 6+ | ✅ 1+ |

> Note: When using Visual Studio Code or other editors that rely on [SourceKit-LSP](https://github.com/swiftlang/sourcekit-lsp), the editor may not correctly recognize generated code within the same module. As a workaround, consider creating a separate target for code generation and then importing it into your main module. For more details, see the discussion in [swiftlang/sourcekit-lsp#665](https://github.com/swiftlang/sourcekit-lsp/issues/665#issuecomment-2093169169).
### Documentation and example projects

To get started, check out the topics below, or one of the <doc:Swift-OpenAPI-Generator> tutorials.
Expand Down

0 comments on commit e971af5

Please sign in to comment.