[SourceKit] Remove diagnostics path calculation

The diagnostic group documentation now point to the swift.org URL rather
than the toolchain path, so it no longer needs to be passed all the way
through sourcekitd.

Resolves rdar://151500502.

(cherry picked from commit 381684a389)
This commit is contained in:
Ben Barham
2025-05-16 17:49:25 -07:00
parent b923bf401f
commit 03ca9ea0a5
22 changed files with 47 additions and 107 deletions

View File

@@ -281,7 +281,6 @@ SwiftLangSupport::SwiftLangSupport(SourceKit::Context &SKCtx)
llvm::SmallString<128> LibPath(SKCtx.getRuntimeLibPath());
llvm::sys::path::append(LibPath, "swift");
RuntimeResourcePath = std::string(LibPath.str());
DiagnosticDocumentationPath = SKCtx.getDiagnosticDocumentationPath().str();
Stats = std::make_shared<SwiftStatistics>();
EditorDocuments = std::make_shared<SwiftEditorDocumentFileMap>();
@@ -290,16 +289,14 @@ SwiftLangSupport::SwiftLangSupport(SourceKit::Context &SKCtx)
ASTMgr = std::make_shared<SwiftASTManager>(
EditorDocuments, SKCtx.getGlobalConfiguration(), Stats, ReqTracker,
Plugins, SwiftExecutablePath, RuntimeResourcePath,
DiagnosticDocumentationPath);
Plugins, SwiftExecutablePath, RuntimeResourcePath);
IDEInspectionInst = std::make_shared<IDEInspectionInstance>(Plugins);
configureIDEInspectionInstance(IDEInspectionInst,
SKCtx.getGlobalConfiguration());
CompileManager = std::make_shared<compile::SessionManager>(
SwiftExecutablePath, RuntimeResourcePath, DiagnosticDocumentationPath,
Plugins);
SwiftExecutablePath, RuntimeResourcePath, Plugins);
// By default, just use the in-memory cache.
CCCache->inMemory = std::make_unique<ide::CodeCompletionCache>();