Skip to content

Commit 19c61bc

Browse files
committed
docs: the language servers take 46 MB in .cs/lsp/, as measured
1 parent 95cdffe commit 19c61bc

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎docs/decisions/0018-editor-code-intelligence.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ The owner set this order on 2026-11-03 (O4). Each phase is its own release, with
220220
- A new runtime dependency: wsproto 1.3.2, a pure-Python wheel that needs only h11, which uvicorn already needs; it reaches the Homebrew formula through `requirements.txt` with no template change ([ADR 0013](0013-homebrew-distribution.md)). The import contracts forbid wsproto wherever they forbid uvicorn.
221221
- A new front-end dependency: `@codemirror/lsp-client` 6.3.0, which brings `vscode-languageserver-protocol` for types only; `scripts/build.ts` aliases `marked` to the stand-in.
222222
- NFR-12 and `test_bundle_budget.py` leave out the code-intelligence chunk and hold it to its own budget.
223-
- The workspace's `.cs/lsp/` takes about 44 MB for Python and TypeScript (a 6.7 MB download), plus 43 MB for gopls and about 50 MB downloaded for JDT LS. Each running server takes 40 to 200 MB on practice-sized projects, at most four at once.
223+
- The workspace's `.cs/lsp/` takes about 46 MB for Python and TypeScript (a 6.7 MB download), plus 43 MB for gopls and about 50 MB downloaded for JDT LS. Each running server takes 40 to 200 MB on practice-sized projects, at most four at once.
224224
- Reference solutions stay hidden: no root holds them, a Node server cannot open `.cs/build/`, `.cs/cases/`, `.cs/runs/` or the content root, and the library tab refuses them. Every later server that is not a Node program needs its own way to keep them out.
225225
- New code: a catalog of servers in the domain (`domain/code_intelligence.py`: command, initialization options, settings, idle time and root rule per language); a status and installation use case in the application, behind ports that locate and install servers and read the preference; their adapter; and the session route with its broker in `entrypoints/web/`, where runs already start child processes.
226226
- `editor.ts` builds its setup from `basicSetup`'s parts, and `Editor` holds two diagnostic sources, includes completion only while autocomplete applies, and lets the code-intelligence chunk replace the language supports' completion in its file.

‎docs/guides/web-ui.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Two settings give the editor what an IDE gives: errors as you type, documentatio
8484
cstudy doctor --fix
8585
```
8686

87-
(or choose **Fix** in the Health view). This downloads about 46 MB into `.cs/lsp/` in your workspace, and needs the network that one time. After that practice works offline: nothing else is downloaded and no server reaches the network. Deleting `.cs/lsp/` is safe; `--fix` installs it again.
87+
(or choose **Fix** in the Health view). This installs about 46 MB into `.cs/lsp/` in your workspace, a download of about 7 MB, and needs the network that one time. After that practice works offline: nothing else is downloaded and no server reaches the network. Deleting `.cs/lsp/` is safe; `--fix` installs it again.
8888
3. Check the result. `cstudy doctor` shows a row per language while code intelligence is on, and the Settings view lists each language's state:
8989

9090
```text

‎docs/specs/installation-and-workspaces.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ created_with = "0.1.0"
8787
progress.db # SQLite, created on first use (ignored; cstudy export backs it up)
8888
```
8989

90-
`.cs/lsp/` is a pnpm project that cstudy owns ([ADR 0018](../decisions/0018-editor-code-intelligence.md)): `package.json` and `pnpm-lock.yaml`, copied from the package data in `cli/src/coding_study/adapters/language_servers/` and rewritten when they differ, and the `node_modules/` that `pnpm install --frozen-lockfile --ignore-scripts` builds from them. The manifest pins exact versions with integrity hashes, basedpyright 1.40.2 and typescript-language-server 6.0.3 in phase 1, and a cstudy release moves them. It holds about 44 MB after a 6.7 MB download, made only by `cstudy doctor --fix` while the web UI's `code_intelligence` preference is on, so a user who never turns it on downloads nothing; after that nothing is downloaded. Deleting it is safe: `--fix` installs it again ([cli](cli.md#cstudy-doctor), [web-ui](web-ui.md#language-servers)).
90+
`.cs/lsp/` is a pnpm project that cstudy owns ([ADR 0018](../decisions/0018-editor-code-intelligence.md)): `package.json` and `pnpm-lock.yaml`, copied from the package data in `cli/src/coding_study/adapters/language_servers/` and rewritten when they differ, and the `node_modules/` that `pnpm install --frozen-lockfile --ignore-scripts` builds from them. The manifest pins exact versions with integrity hashes, basedpyright 1.40.2 and typescript-language-server 6.0.3 in phase 1, and a cstudy release moves them. It holds about 46 MB after a 6.7 MB download, made only by `cstudy doctor --fix` while the web UI's `code_intelligence` preference is on, so a user who never turns it on downloads nothing; after that nothing is downloaded. Deleting it is safe: `--fix` installs it again ([cli](cli.md#cstudy-doctor), [web-ui](web-ui.md#language-servers)).
9191

9292
A language server never sees what holds a reference solution or generated data: `.cs/build/` (the materialized references), `.cs/cases/` (generated cases with their expected outputs), `.cs/runs/` (the data of runs) and the content root. Both phase 1 servers are Node programs, so `cstudy serve` starts them with `NODE_OPTIONS=--require=<hide_paths.cjs>` and the four directories in `CSTUDY_HIDDEN_DIRECTORIES`; in them, and in every Node process they start, a path in those directories fails as a file that is not there does, whatever the document names. The broker also leaves them out of definition answers and refuses them as library files. A content root that holds the workspace is left out of the list, since the server could not work without it. A server that is not a Node program must keep them out in its own way ([web-ui](web-ui.md#hidden-directories), [ADR 0018](../decisions/0018-editor-code-intelligence.md#phases)).
9393

0 commit comments

Comments
 (0)