Add option to skip building and running plugins

This *shouldn't* be needed, but allows running plugins to be skipped if
there's any unexpected interactions with background indexing.

(cherry picked from commit a5343852c6)
This commit is contained in:
Ben Barham
2025-02-17 09:42:51 -08:00
parent 655da45347
commit c065093b5c
2 changed files with 11 additions and 3 deletions

View File

@@ -371,7 +371,7 @@ package actor SwiftPMBuildSystem: BuiltInBuildSystem {
// We have a whole separate arena if we're performing background indexing. This allows us to also build and run
// plugins, without having to worry about messing up any regular build state.
let buildDescription: SourceKitLSPAPI.BuildDescription
if isForIndexBuild {
if isForIndexBuild && !(options.swiftPMOrDefault.skipPlugins ?? false) {
let loaded = try await BuildDescription.load(
destinationBuildParameters: destinationBuildParameters,
toolsBuildParameters: toolsBuildParameters,