{"record":{"id":"6b5b20dc92ebab43","repo":"oraios/serena","slug":"found-zig-but-zls-zig-language-server-is-not-ins","errorCode":null,"errorMessage":"Found Zig but ZLS (Zig Language Server) is not installed.\nPlease install ZLS from https://github.com/zigtools/zls\nYou can install it via:\n  - Package managers (brew install zls, scoop install zls, etc.)\n  - Download pre-built binaries from GitHub releases\n  - Build from source with: zig build -Doptimize=ReleaseSafe\n\nAfter installation, make sure 'zls' is added to your PATH.","messagePattern":"Found Zig but ZLS \\(Zig Language Server\\) is not installed\\.\nPlease install ZLS from https://github\\.com/zigtools/zls\nYou can install it via:\n  - Package managers \\(brew install zls, scoop install zls, etc\\.\\)\n  - Download pre-built binaries from GitHub releases\n  - Build from source with: zig build -Doptimize=ReleaseSafe\n\nAfter installation, make sure 'zls' is added to your PATH\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/zls.py","lineNumber":84,"sourceCode":"        Check if required Zig runtime dependencies are available.\n        Raises RuntimeError with helpful message if dependencies are missing.\n        \"\"\"\n        # Check for Windows and provide error message\n        if platform.system() == \"Windows\":\n            raise RuntimeError(\n                \"Windows is not supported by ZLS in this integration. Cross-file references don't work reliably on Windows. Reason unknown.\"\n            )\n\n        zig_version = ZigLanguageServer._get_zig_version()\n        if not zig_version:\n            raise RuntimeError(\n                \"Zig is not installed. Please install Zig from https://ziglang.org/download/ and make sure it is added to your PATH.\"\n            )\n\n        if not ZigLanguageServer._check_zls_installed():\n            zls_version = ZigLanguageServer._get_zls_version()\n            if not zls_version:\n                raise RuntimeError(\n                    \"Found Zig but ZLS (Zig Language Server) is not installed.\\n\"\n                    \"Please install ZLS from https://github.com/zigtools/zls\\n\"\n                    \"You can install it via:\\n\"\n                    \"  - Package managers (brew install zls, scoop install zls, etc.)\\n\"\n                    \"  - Download pre-built binaries from GitHub releases\\n\"\n                    \"  - Build from source with: zig build -Doptimize=ReleaseSafe\\n\\n\"\n                    \"After installation, make sure 'zls' is added to your PATH.\"\n                )\n\n        return True\n\n    def __init__(self, config: LanguageServerConfig, repository_root_path: str, solidlsp_settings: SolidLSPSettings):\n        self._setup_runtime_dependency()\n\n        super().__init__(config, repository_root_path, ProcessLaunchInfo(cmd=\"zls\", cwd=repository_root_path), \"zig\", solidlsp_settings)\n        self.request_id = 0\n\n    def _create_base_initialize_params(self) -> dict:","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/zls.py#L66-L102","documentation":"SolidLSP's ZigLanguageServer requires both the Zig compiler and the ZLS (Zig Language Server) binary. During __init__ it runs _setup_runtime_dependency, which verifies Zig is installed and then checks for ZLS via _check_zls_installed. If Zig exists but the 'zls' executable cannot be found on PATH, a RuntimeError with installation instructions is raised.","triggerScenarios":"Instantiating the Zig language server (SolidLSP for a .zig repo) when 'zig' resolves on PATH but the 'zls' binary is missing, not executable, or not on PATH.","commonSituations":"Developers install Zig (e.g. via zigup or a tarball) but forget ZLS; CI containers with zig-only images; ZLS installed via a version manager whose shims aren't on the PATH of the process; ZLS version mismatch causing _get_zls_version to fail.","solutions":["Install ZLS: brew install zls (macOS), scoop install zls (Windows), or download a pre-built binary from https://github.com/zigtools/zls releases","Or build from source: zig clone the zls repo and run `zig build -Doptimize=ReleaseSafe`, then copy zig-out/bin/zls somewhere on PATH","Verify with `which zls` / `zls --version` in the same shell/environment that runs the library","Ensure the ZLS version matches your Zig version (ZLS is version-sensitive)","Re-run the language server initialization"],"exampleFix":"// before (shell)\n$ zig version\n0.13.0\n$ which zls\n(not found)\n// after (shell)\n$ brew install zls   # or build: zig build -Doptimize=ReleaseSafe\n$ which zls\n/usr/local/bin/zls","handlingStrategy":"validation","validationCode":"import shutil\nif not shutil.which(\"zls\"):\n    raise SystemExit(\"ZLS not found on PATH. Install from https://github.com/zigtools/zls\")\nif not shutil.which(\"zig\"):\n    raise SystemExit(\"Zig not found on PATH.\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install both zig and zls in your dev container/CI image","Verify with `which zls && zls --version` in the same environment that runs the library","Match ZLS version to your Zig version","Add version-manager shims (mise/asdf) dirs to PATH for the process"],"tags":["zig","language-server","missing-binary","environment-setup"],"backgroundTag":"missing-dependency-binary","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}