sourcekit-lsp
sourcekit-lsp copied to clipboard
Macro Expansion Issues
Describe the bug I'm having issues expanding macros, will use this issue to collate them as I proceed.
Issue 1 - macros not expanding correctly on error
To Reproduce Steps to reproduce the behavior:
- Go to https://github.com/vapor/vapor/tree/non-controller-registration
- Build the
Developmenttarget (which fails to compile on the branch) - Open routes.swift and expand the
@GETmacro - Inner macro is not expandable
Expected behavior Can expand the inner macro to see the error from the compiler
Environment
- OS: macOS 26
- Swift version (output of
swift --version):swift-driver version: 1.127.14.1 Apple Swift version 6.2.1 (swiftlang-6.2.1.4.8 clang-1700.4.4.1) Target: arm64-apple-macosx26.0 - Visual Studio Code version: Version: 1.106.2 (Universal)
- vscode-swift version: 2.14.1
Additional context Half the time the first expanded macro doesn't show the full expanded code, but can't reliably reproduce that at the moment