A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
Copilot logging (#222)
Myles Scolnickb0b7e1b98f26
diff --git a/marimo/_server/server.py b/marimo/_server/server.pyindex 63233b8cb3..36c99f644a 100644--- a/marimo/_server/server.py+++ b/marimo/_server/server.py@@ -313,6 +313,7 @@ async def start_server(shutdown(with_error=True)if not run and get_configuration()["completion"]["copilot"]:+ logger.debug("GitHub Copilot is enabled")session_mgr.start_lsp_server()url = f"http://localhost:{port}"diff --git a/marimo/_server/sessions.py b/marimo/_server/sessions.pyindex c8c3c54b85..ccba481a6e 100644--- a/marimo/_server/sessions.py+++ b/marimo/_server/sessions.py@@ -447,10 +447,12 @@ class SessionManager:Doesn't start in run mode."""if self.lsp_process is not None or self.mode == SessionMode.RUN:+ LOGGER.debug("LSP server already started")returnbinpath = shutil.which("node")if binpath is None:+ LOGGER.error("Node.js not found; cannot start LSP server.")for _, session in self.sessions.items():session.socket.write_op(Alert.name,@@ -464,19 +466,20 @@ class SessionManager:)return- lsp_bin = os.path.join(- str(importlib_resources.files("marimo").joinpath("_lsp")),- "index.js",- )- cmd = f"node {lsp_bin} --port {self.lsp_port}"try:+ LOGGER.debug("Starting LSP server at port %s...", self.lsp_port)+ lsp_bin = os.path.join(+ str(importlib_resources.files("marimo").joinpath("_lsp")),+ "index.js",+ )+ cmd = f"node {lsp_bin} --port {self.lsp_port}"self.lsp_process = subprocess.Popen(cmd.split(),stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL,stdin=subprocess.DEVNULL,)- LOGGER.debug("Starting LSP server at port %s", self.lsp_port)+ LOGGER.debug("Started LSP server at port %s", self.lsp_port)except Exception as e:LOGGER.error("When starting language server (%s), got error: %s", cmd, e