mcpp projects: no root compile_commands.json by default; read mcpp's result record for fallback and refresh
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp
- Lĩnh vực
- backend-api-design, developer-experience
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C++
- Star
- 25
- Fork
- 2
- Merge trung bình
- 21 giờ 5 phút
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Sunrisepeak/mcpp-language-server
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Sunrisepeak/mcpp-language-server#80 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Sunrisepeak/mcpp-language-server#66 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 1/100
Sunrisepeak/mcpp-language-server#77 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
Sunrisepeak/mcpp-language-server#59 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Sunrisepeak/mcpp-language-server#52 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Sunrisepeak/mcpp-language-server
Issue tương tự
-
#2754 make deepseek api not workĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
xiaoyifang/goldendict-ng#3148 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
triton-inference-server/server#9069 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 4 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100