mcpp projects: no root compile_commands.json by default; read mcpp's result record for fallback and refresh
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
Direzione di ricerca
Read src/project/mcpp.cppm at McppProvider::describe and the referenced mcpp design sections §7 and §5.2. Trace how the fallback selects a compilation database and how build refresh is forwarded by the editor extension; check the CLion e2e coverage. Done means the result record pointer is preferred, the root database remains a compatibility fallback, and the proposed refresh and CLion behavior are covered.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
The next mcpp release changes two things mcppls touches on mcpp projects (design: mcpp/.agents/docs/2026-10-26-control-contract-runtime-and-ide-ecosystem-design.md, §7 and §5.2):
- The project-root
compile_commands.jsonis no longer written by default. It becomes opt-in through[build] compile_commands = "<path>"inmcpp.toml(or a default in~/.mcpp/config.toml). An existing root copy is no longer updated, and mcpp prints a one-time note. The per-configuration database (target/<triple>/<fp>/compile_commands.json) stays. - mcpp writes a result record after every build (
target/<triple>/<fp>/result.json, kindmcpp.result), plus a project-level pointertarget/.last-result.jsonnaming the most recent configuration. The record carries the configuration's compile database path, the diagnostics, and the artifacts.
What this means for mcppls
- Fallback path.
McppProvider::describefalls back to a leftover rootcompile_commands.jsonwhen mcpp cannot be asked (src/project/mcpp.cppm:41). After the change, that file is usually absent. The fallback should read the database named bytarget/.last-result.jsonfirst, and the root file only when the pointer is missing (older mcpp). - Refresh after a build. Watching
target/.last-result.json(written by atomic rename) tells mcppls that a build finished, whoever ran it: a terminal, an agent's shell, or an IDE. Today the refresh is forwarded by the editor extension. - CLion. Without a root
compile_commands.json, CLion no longer loads an mcpp project as a Compilation Database workspace, soClionModelno longer treats it as CLion's and mcppls starts by default. No code change is expected; an e2e assertion would pin it.
Nothing breaks immediately: the primary path (mcpp emit build-database) is unchanged. This issue tracks adopting the result record when that mcpp release ships.
- Lingua principale
- C++
- Stelle
- 25
- Fork
- 2
- Merge medio
- 21h 5m
- PR unite (30g)
- 13
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Sunrisepeak/mcpp-language-server
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Sunrisepeak/mcpp-language-server#80 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Sunrisepeak/mcpp-language-server#66 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 1/100
Sunrisepeak/mcpp-language-server#77 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
Sunrisepeak/mcpp-language-server#59 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
Sunrisepeak/mcpp-language-server#52 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Sunrisepeak/mcpp-language-server
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
xiaoyifang/goldendict-ng#3148 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
triton-inference-server/server#9069 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 4 giorni
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100