## Summary Replace the push-based compilation model with a pull-based (lazy) model where compilation is driven entirely by feature requests. ### Server core (`master_server.cpp/h`) - **Remove** `schedule_build()`, `run_build_drain()`, debounce timers, and `DocumentState` flags (`build_running`, `build_requested`, `drain_scheduled`) - **Remove** `debounce_ms` config field - `didOpen`/`didChange` only update `DocumentState` and mark `ast_dirty` — no compilation triggered - `didSave` marks dependent docs dirty via `CompileGraph::update()`, invalidates PCH hashes, marks **all** open documents `ast_dirty` (header saves), and queues background indexing - **Implement** `ensure_compiled(path_id)` — the pull-based entry point called by `forward_stateful()`/`forward_stateless()` before every feature request: 1. Fast-path if `!ast_dirty` 2. Compile C++20 module deps via `compile_graph->compile_deps()` 3. Build/reuse PCH via `ensure_pch()` (only attach on success) 4. Send `CompileParams` to stateful worker 5. Publish diagnostics, clear dirty, schedule indexing 6. Generation mismatch → return `false`, keep dirty for retry - `forward_stateless()` now also calls `compile_graph->compile_deps()` before stateless requests (completion/signatureHelp) - Move module-implementation-unit implicit dependency handling into `resolve_fn` (was duplicated in `run_build_drain` and `ensure_compiled`) ### CompileGraph (`compile_graph.cpp/h`) - **Add** `compile_deps(path_id)` — compiles all transitive module dependencies but NOT the file itself (used for plain .cpp files that `import` modules) - Unify `compile`/`compile_deps` via `compile_impl(path_id, ancestors, dispatch_self)` parameter - `compile_deps` compiles dependencies concurrently via `when_all` - Extract `finish()` lambda to deduplicate `compiling=false; completion->set()` cleanup across all exit paths - Use `std::ranges::remove` instead of legacy `std::remove` ### Test infrastructure (`conftest.py`) - `open_and_wait()` now sends a hover request to trigger `ensure_compiled()` (pull-based model requires a feature request to compile) - Fix URI handling: send percent-encoded URI on the wire, normalize for internal lookups, store diagnostics under both raw and normalized URI keys - Add `_normalize_uri()` helper using `urllib.parse.unquote` ### Integration tests - Update all tests for pull-based model: no more waiting on `didOpen` diagnostics - `_wait_for_index()` sends hover to trigger compilation before polling `workspace/symbol` - `test_hover_save_close` simplified — hover directly triggers compilation - `test_save_recompile` and `test_pch_*` wait for fresh diagnostics after hover-triggered recompilation ### Unit tests (`compile_graph_tests.cpp`) - Extract `compiled`/`graph` as TEST_SUITE members with `std::optional<CompileGraph>` - Extract `execute(callback)` helper to deduplicate event_loop boilerplate - Add 8 new `compile_deps` tests: no-deps, single dep, chain, diamond, failure, plain-cpp, concurrent dedup, resolve-once - Remove redundant `inline` on file-scope helpers ## Test plan - [x] Unit tests: 426 passed, 5 skipped - [x] Smoke tests: 1/1 passed - [x] Integration tests: 69 passed, 0 failed, no hangs 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
clice
clice is a next-generation language server designed for modern C++. Through excellent asynchronous task scheduling and intelligent caching, it achieves a lower memory footprint and faster response times.
Beyond performance, clice provides instantiation-aware template processing, supports switching header contexts between different source files (including non-self-contained headers), and offers comprehensive support for C++20 modules, from code completion to go-to-definition. Our goal is to provide C++ developers with a truly fast, precise, and intelligent development companion.
Important
Support for header contexts and C++20 modules are core features currently under active development. They will be progressively refined in upcoming releases. Stay tuned!
Getting started
Download the latest clice binary from the releases page and install the vscode extension. Then, add the following configuration to your .vscode/settings.json file:
{
// Optional: Set this to an empty string to turn off the clangd.
"clangd.path": "",
// Point this to the clice binary you downloaded.
"clice.executable": "/path/to/your/clice/executable",
}
Note
As an early version, please do not use it in a production environment. Crashes are expected, and we welcome you to submit issues.
Documentation
To learn more about building, installing, and configuring clice, or to dive deep into its features and architecture, please visit our official documentation at clice.io.