sourcekit-lsp icon indicating copy to clipboard operation
sourcekit-lsp copied to clipboard

Source generated by build plugin is ignored

Open adam-fowler opened this issue 1 year ago • 9 comments

The source code generated by a SwiftPM build plugin does not get parsed by SourceKit-LSP. So any code referencing generated code is considered an error and "Go to definition..." etc don't work

I have a sample project here https://github.com/adam-fowler/soto-codegenerator-plugin-test. It has an AWS model file that defines the API for the SNS service from AWS. The build plugin generates source code from this and the generated code is used in the file SNSTest.swift. SourceKit-LSP reports 4 problems in this file even though the project builds fine

adam-fowler avatar Nov 11 '22 09:11 adam-fowler