File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Sources/SourceKitBazelBSP/RequestHandlers Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ final class PrepareHandler {
3333 private weak var connection : LSPConnection ?
3434
3535 // Prevent redundant builds of the same targets
36+ // FIXME: Need to understand how exactly this request is dispatched from sourcekit-lsp, as
37+ // we see for example multiple build requests for the same target. So we have this
38+ // for now just to make sure the example project works.
3639 private var didRun = false
3740
3841 init (
@@ -51,7 +54,6 @@ final class PrepareHandler {
5154 _: BuildTargetPrepareRequest ,
5255 _ id: RequestID
5356 ) throws -> VoidResponse {
54- // FIXME: Invalidate on changes
5557 guard !didRun else {
5658 logger. info ( " Build already completed, skipping redundant build " )
5759 return VoidResponse ( )
@@ -97,4 +99,8 @@ final class PrepareHandler {
9799
98100 logger. info ( " Finished building targets! " )
99101 }
102+
103+ func invalidateBuildCache( ) {
104+ didRun = false
105+ }
100106}
You can’t perform that action at this time.
0 commit comments