From 6746f30ba340cfdb3ffc775ebcf64c4b48ea4e42 Mon Sep 17 00:00:00 2001 From: Alex Hoppen Date: Tue, 28 Jan 2025 10:42:34 -0800 Subject: [PATCH] Allow non-file URLs when injecting a build system There is no reason why we should only support file URLs here. --- Sources/BuildSystemIntegration/DetermineBuildSystem.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Sources/BuildSystemIntegration/DetermineBuildSystem.swift b/Sources/BuildSystemIntegration/DetermineBuildSystem.swift index 8bc14083..0477cab6 100644 --- a/Sources/BuildSystemIntegration/DetermineBuildSystem.swift +++ b/Sources/BuildSystemIntegration/DetermineBuildSystem.swift @@ -72,8 +72,12 @@ package func determineBuildSystem( options: SourceKitLSPOptions, hooks: BuildSystemHooks ) -> BuildSystemSpec? { - if let workspaceURL = workspaceFolder.fileURL, let buildSystemInjector = hooks.buildSystemInjector { - return BuildSystemSpec(kind: .injected(buildSystemInjector), projectRoot: workspaceURL, configPath: workspaceURL) + if let buildSystemInjector = hooks.buildSystemInjector { + return BuildSystemSpec( + kind: .injected(buildSystemInjector), + projectRoot: workspaceFolder.arbitrarySchemeURL, + configPath: workspaceFolder.arbitrarySchemeURL + ) } var buildSystemPreference: [WorkspaceType] = [