SERVER-105197 Fix paths in code-workspace if code is not located under the mongo folder (#36218)

GitOrigin-RevId: 47a288b9c1aff90b191f00b332f9109c0e79a60c
This commit is contained in:
wolfee 2025-05-21 12:47:21 +02:00 committed by MongoDB Bot
parent 2ebc1e8e55
commit 71d25261fe
2 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@
"settings": {
"clangd.checkUpdates": true,
"clangd.path": "${workspaceFolder}/buildscripts/clangd_vscode.sh",
"clang-format.executable": "${workspaceRoot}/bazel-mongo/external/mongo_toolchain_v5/v5/bin/clang-format",
"clang-format.executable": "${workspaceRoot}/bazel-out/../../../external/mongo_toolchain_v5/v5/bin/clang-format",
"clang-tidy.executable": "buildscripts/clang_tidy_vscode.py",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
@ -160,7 +160,7 @@
"ignoreFailures": false
},
],
"miDebuggerPath": "${workspaceFolder}/bazel-mongo/external/gdb/v5/bin/gdb",
"miDebuggerPath": "${workspaceFolder}/bazel-${workspaceFolderBasename}/external/gdb/v5/bin/gdb",
},
{
"name": "attach",
@ -213,7 +213,7 @@
"ignoreFailures": false
},
],
"miDebuggerPath": "${workspaceFolder}/bazel-mongo/external/gdb/v5/bin/gdb",
"miDebuggerPath": "${workspaceFolder}/bazel-${workspaceFolderBasename}/external/gdb/v5/bin/gdb",
},
{
"name": "coredump",
@ -223,7 +223,7 @@
"program": "${workspaceFolder}/${input:runTargets}",
"args": [],
"MIMode": "gdb",
"miDebuggerPath": "${workspaceFolder}/bazel-mongo/external/gdb/v5/bin/gdb",
"miDebuggerPath": "${workspaceFolder}/bazel-${workspaceFolderBasename}/external/gdb/v5/bin/gdb",
"preLaunchTask": "_prelaunch_task",
"setupCommands": [
{

View File

@ -6,8 +6,8 @@ ARGS=("$@")
# Ordered list of possible clangd locations
CANDIDATES=(
"$(command -v custom-clangd)"
".compiledb/compiledb-mongo/external/mongo_toolchain_v5/v5/bin/clangd"
"bazel-mongo/external/mongo_toolchain_v5/v5/bin/clangd"
"$(find .compiledb/compiledb-*/external/mongo_toolchain_v5/v5/bin/clangd)"
"$(find bazel-*/external/mongo_toolchain_v5/v5/bin/clangd)"
"/opt/mongodbtoolchain/v5/bin/clangd"
)