@@ -1,5 +1,6 @@
|
|||||||
build/
|
build/
|
||||||
.clangd
|
.clangd
|
||||||
|
.nvim.lua
|
||||||
.clang-format
|
.clang-format
|
||||||
pyrightconfig.json
|
pyrightconfig.json
|
||||||
|
|
||||||
|
|||||||
+8
-1
@@ -15,6 +15,7 @@ COMMANDS = (
|
|||||||
"test",
|
"test",
|
||||||
"package",
|
"package",
|
||||||
"lsp",
|
"lsp",
|
||||||
|
"clangd",
|
||||||
)
|
)
|
||||||
COMMON_DIR = pathlib.Path("build") / "build_common"
|
COMMON_DIR = pathlib.Path("build") / "build_common"
|
||||||
TOOLS_DIR = pathlib.Path("build") / "build_tools"
|
TOOLS_DIR = pathlib.Path("build") / "build_tools"
|
||||||
@@ -56,6 +57,7 @@ def runtime_ready(root):
|
|||||||
return (
|
return (
|
||||||
(root / TOOLS_DIR / "configure.py").is_file()
|
(root / TOOLS_DIR / "configure.py").is_file()
|
||||||
and (root / TOOLS_DIR / "lsp.py").is_file()
|
and (root / TOOLS_DIR / "lsp.py").is_file()
|
||||||
|
and (root / TOOLS_DIR / "clangd.py").is_file()
|
||||||
and (root / RUNTIME_DIR / "modulus" / "cli.py").is_file()
|
and (root / RUNTIME_DIR / "modulus" / "cli.py").is_file()
|
||||||
and (root / RUNTIME_DIR / "modulus" / "export.py").is_file()
|
and (root / RUNTIME_DIR / "modulus" / "export.py").is_file()
|
||||||
)
|
)
|
||||||
@@ -338,7 +340,12 @@ def ensure_runtime(root):
|
|||||||
|
|
||||||
def delegate(command, argv):
|
def delegate(command, argv):
|
||||||
root = repo_root()
|
root = repo_root()
|
||||||
ensure_runtime(root)
|
if command == "clangd":
|
||||||
|
if not runtime_ready(root):
|
||||||
|
print("Modulus clangd tooling is missing; run ./modulus.py configure first", file=sys.stderr)
|
||||||
|
return 1
|
||||||
|
else:
|
||||||
|
ensure_runtime(root)
|
||||||
sys.path.insert(0, str(root / RUNTIME_DIR))
|
sys.path.insert(0, str(root / RUNTIME_DIR))
|
||||||
import modulus.cli
|
import modulus.cli
|
||||||
previous_argv = sys.argv
|
previous_argv = sys.argv
|
||||||
|
|||||||
Reference in New Issue
Block a user