The sidebar was reorganised around one rule: the body shows state, the actions sit next to it, and the two are visually separate.
- Three views instead of four: 工程 / mcpp 库生态 / 缓存. The C++ Modules view is gone as a view; its state is now one row inside 工程 → 基本信息, collapsed by default. The collapsed row always carries a status icon, so a degraded language service is visible without expanding it.
- The project view is two labelled sections: 基本信息 (identity, target, toolchain,
dependencies, the language service) — collapsed by default — and 常用命令, which opens
with the nine things you can do, creation first (
new project, then build/run/test/ clean/toolchain/search-and-add/self-check/settings). Rows carry a keybinding hint where one exists, and their icons are coloured by what they act on (blue builds or adds, green runs or verifies, purple tests, red deletes, yellow manages the toolchain). - Dependencies are shown as two levels: what
mcpp.tomldeclares, and the versionmcpp.lockresolved for it. No connector lines —mcpp.lockhas no parent/child edges, and drawing them would be inventing a tree. - The cache view is a sidebar webview, not an editor tab, and it starts collapsed so the library list gets the height. 项目缓存 is always visible inside it; 全局缓存 is collapsed and shows its summary on one line. The composition and age bars are drawn once, with a single-line legend, and the age bar is a four-stop ramp (blue → green → yellow → red) so four buckets do not read as one block.
- The mcpp status bar menu groups its commands under one heading per area (project /
library / toolchain / cache / C++ Modules / settings) with a codicon per command, and it
carries the C++ Modules actions that used to be reachable only from the removed view —
including capture the logs (
mcppls.exportDiagnosticBundle) and the two places the logs and the last bundle live. mcpp.views.enabledhides the mcpp views' contents. It does not remove the activity bar icon: VS Code only hides a container that a built-in registered withhideIfEmpty, and an extension cannot mark its own container that way. Right-click the icon to remove it from the activity bar.package.json's marketplace icon is still mcpp's official logo — the same file the C++ Modules extension uses. The activity bar icon is a derived monochrome stencil of that logo's wordmark, because VS Code paints a container icon as an alpha mask in the theme's foreground colour (the badge would have been a solid block).
- mcpp 库生态 — browse the package index already on this machine, offline: search
(a row's haystack carries its namespace, so typing
compatfilters to that namespace), the已添加state on the row itself, and a per-package detail page in the editor with the real example code the index's CI builds and runs (172 example projects), the version matrix per platform, licence and repository. The page opens with what it is for: one row of buttons — Add to mcpp.toml / Switch to <version> / Open the repository / Open on the index site — and a clickable version matrix that aims that command. For a package the workspace already depends on it readsmcpp.toml(thenmcpp.lock), marks the version in hand, and offers the switch instead of a blind add.mcpp addis still the only thing that writesmcpp.toml. - Searching the other registries is a separate switch,
mcpp.library.networkSearch, off by default: that tier runsmcpp search, which may use the network and can only be read from human output on a best-effort basis. - Labels use the official index site's own vocabulary —
import/#include/tool/ 上游 mcpp.toml — read frommcpp xpkg parse --json, so the editor and the site say the same thing.
Every one of these was found by running the extension in a real profile, and each was traced to its cause rather than to its symptom.
- The library view reloaded itself forever (flicker, rows that could not be clicked, a
pegged CPU). The document announced its own load with a
readymessage and the host answered it with a repaint; assigningwebview.htmlreloads the document, and every render minted a fresh CSP nonce, so no two documents ever matched. The handshake is gone, the nonce is per view, and an identical document is never pushed. The same deadreadyshape was removed from the detail page, and both the reload rule and the missingregisterWebviewViewProvidernow have tests. - Every cache bar was solid black. The stylesheet selected
rect[data-kind=…], but the renderer stamps those attributes on the<g>that wraps the rectangle, so no rule matched and every segment took the SVG default fill.fillis now set on the group (which the rectangle inherits), and a test compares the document against the stylesheet. - The activity bar icon was a white block. VS Code draws a container icon as an alpha
mask, and the official logo is an opaque badge: as a stencil it is a filled square. The
icon is now a derived, transparent-background wordmark, regenerated from
logo.pngbytools/generate-activitybar-icon.mjs, withnpm run check:iconas the drift gate. - Quick menu rows had no icons, then no colour. Icons needed a table and a rendering
path; colour cannot come from a
ThemeIconat all (VS Code 1.132 drops its colour in a quick pick), so the rows ship generated coloured SVG assets — one per icon and palette word, light and dark — built from@vscode/codiconsbytools/generate-quick-menu-icons.mjs. The project tree'scharts.orangeturned out to be 33%-alpha, and was replaced bycharts.redfor destructive rows. mcpp.languageServer.exportDiagnosticBundlewas nearly registered twice (once through the table, once by hand after a change), which makesactivate()throw and the whole extension fail to start. A source gate now rejects a command id registered twice, and the gate was verified by reintroducing the bug.- A detail-page link click said nothing.
void vscode.env.openExternal(…)dropped the boolean that says whether the browser opened, so a failure was indistinguishable from a dead button. The click now writes apendingline immediately, and the host answers with either the result, or the URL on the clipboard plus a note in the output channel.
- The workspace-trust boundary is closed again. Three mcpp calls the new library
views had added (
xpkg parseon the detail page,mcpp searchbehind the cross-registry switch, the self-check's protocol probe) ran without checking trust, andmcpp.pathis aresource-scoped setting — so a repository could name any program and have it run in a workspace the user had explicitly marked untrusted.mcpp.pathandmcpp.clangd.pathare nowrestrictedConfigurations, every non-controller call goes through a trust-gated seam (runMcpp), and an architecture test keeps new call sites from bypassing it. Untrusted workspaces degrade in place: the detail page falls back to the descriptor's own text, the search keeps its local results, the self-check says it did not probe. - Windows: arguments are quoted on the
.cmd/.batpath. Node joins shell arguments without quoting, so an index path containing a space split in two and a search term likefoo & calcbecame two commands. Arguments now follow theCommandLineToArgvWquoting rules. - One render seam for all four webviews (
WebviewDocument): a per-view CSP nonce and an assign-only-on-change rule, with gates holding every host to it. The cache view was the real winner: a refresh that changes nothing no longer reloads the page, so the budget input and the scroll position survive. - The release pipeline publishes to two markets. A version tag tests, packages one VSIX, publishes it to GitHub Releases and Open VSX (required), and to the Visual Studio Marketplace when its token is configured (skipped with a notice otherwise) — always the same artifact the Release carries.
From 0.5.0 on, entries are written in English. Earlier entries remain as they were written.
A groundwork release: the extension now says what it is doing, in the user's language, and every claim about mcpp or the C++ Modules extension is checked by a test or a generated snapshot rather than by a comment.
- Three views under a new
mcppActivity Bar container: Project (identity, toolchain, targets and the build/run/test buttons), Cache (project artifacts and the shared build cache, with its size, age distribution, largest packages and incomplete entries) and C++ Modules (the language service's state, issues and every action, forwarded tosunrisepeak.mcpp-language-server). - A settings panel (
mcpp: Open Settings Panel) built from a single registry: search, "only modified", per-section collapse, four presets, each row showing where its value comes from, when it takes effect, and a link to the native Settings editor. - 64 settings, 29 of them public and the rest behind "show advanced". A new
data/config-registry.jsonis the single source of truth;package.jsonanddocs/settings.mdare held to it by CI. - Cache cleanup as a table of plans, with five levels of confirmation: reading
is free,
mcpp cleanasks once,--stale/gc/pruneshow a preview first,mcpp cache clean --alladditionally requires an explicit acknowledgement naming every project on the machine, and emptying the shared cache during a project clean is a separate, unticked choice. mcpp: Environment Self-check: one copyable snapshot of every version, the mcpp protocol and advertised kinds, each C++ Modules capability and its fate, the cache figures and every setting changed from its default.build.mcppintelligence without a language server: completion and hover for the 31 build directives and the five action roles, snippets, document symbols and seven static SPEC-007 diagnostics, generated from mcpp's own directive table.import std;andimport mcpp;are recognised and never reported as missing — measured behaviour, seedocs/build-script.md.mcpp.tomlediting: key completion, enum values, hover with the type, default, plane and legacy advice, seven manifest diagnostics and navigation forworkspace = true,path = …andfeatures = […].- English and Chinese: every command title, setting and runtime message follows
the editor's language.
mcpp.ui.languagecan override the runtime messages and our panels; the Command Palette and the Settings UI always follow VS Code.
- User-visible strings in
package.jsonare now%nls%references; the text lives inpackage.nls.jsonandpackage.nls.zh-cn.json. - Activation is narrower: the
onCommand:*events are gone (VS Code derives them fromcontributes.commandssince 1.74), as isonLanguage:cpp. mcpp template-free:mcpp: Cleanis nowmcpp: Clean Project Artifacts, and the language-service commands moved under themcpp.languageServer.*namespace.
- The toolchain inventory is read from
mcpp toolchain list --format jsonwhen mcpp speaks the machine-output protocol, instead of scraping the human table — the human table no longer prints the line the old parser depended on. - A failing C++ Modules call can no longer be mistaken for a failing mcpp build, and a command that a newer or older mcppls does not offer is remembered and hidden rather than retried on every click.
src/configureOnly.tsandsrc/ideWorkflow.ts: dead since 0.4.0 moved the build database to the language service, and at odds with the documented boundary.
Nothing has to be changed by hand: every 0.4.x command id and setting key below still works, a keybinding that names an old id keeps firing, and the old setting key is read as an alias. A one-time prompt offers to move renamed setting values to their new names (dismiss it and it comes back next session; the old key is never deleted without your say-so).
| 0.4.x | Now |
|---|---|
mcpp.tomlCompletion (setting) |
mcpp.toml.completion |
mcpp.configureLanguageServer |
mcpp.languageServer.selectContext |
mcpp.configureClangd |
mcpp.languageServer.selectContext |
mcpp.refreshCompilationDatabase |
runs mcpp build (which refreshes the database) |
mcpp.checkModuleSupport |
mcpp.languageServer.restartServer |
mcpp.showModuleGraph |
mcpp.languageServer.showModuleGraph |
mcpp.showLanguageServerLogs |
mcpp.languageServer.showLogs |
mcpp.clean |
alias of mcpp.cleanProjectArtifacts |
Removed outright in 0.6.0: mcpp.showCachePanel (the cache view is now in the sidebar
— mcpp.cache.focus brings it up) and the standalone C++ Modules view (its state and
actions live in 工程 → 基本信息 and the status bar menu).
- 修复缺少 CDB 时 IDE 命令看似无响应的问题:配置 clangd、刷新编译数据库、检查模块支持和一键配置现在会立即显示进度并打开
mcpp输出频道;clangd 重启与mcpp build --configure-only增加超时,避免异步操作永久占用 IDE 队列。 - 增加删除
compile_commands.json后刷新 CDB、配置 clangd、检查模块支持和一键配置的 Extension Host 回归测试。
- 将编译数据库刷新迁移到
mcpp build --configure-only:不解析 stdout 人类文本,以退出码 和可解析 CDB 作为成功条件,失败时保留 last-known-good CDB。 - 删除旧
mcpp ide configure --format ndjson解析层和重复的mcpp.configureIde命令; configure-only 与 build/run/test 共用项目操作锁,manifest 与mcpp.path变化按工程协调。 - CDB watcher 只重读已发布数据库,不反向触发 configure-only;多根工作区按事件 URI 路由, 显式刷新会分别报告 CDB 生成与 clangd 协调结果。
- 对齐 mcpp #387 的最终 workspace 契约:virtual workspace 根不作为单一 clangd 工程, 扩展消费当前活动 member 根的 CDB;rooted workspace 仍按根 package 处理。
- 将 C++ 模块语言服务依赖从官方
llvm-vs-code-extensions.vscode-clangd切换为sunrisepeak.mcpp-language-server(C++ Modules Language Server / mcppls);VS Code 最低版本 提升到 1.91。 - 删除本扩展中的 clangd 解析、匹配、配置、PCM 检查、CDB 监听和自动重启逻辑。mcpp-vscode 不再启动第二个 LSP 客户端,也不再打包语言服务 payload。
- mcpp build 完成后只通过 mcppls 公开命令刷新语言服务;新增模块图、语言服务日志和分析 上下文转发命令。
- 一键模块配置改为一次确认后执行
mcpp build并刷新 mcppls,不再安装 llvm-tools、切换 LLVM 全局默认或修改 clangd 配置。
- 移除 mcpp 已删除的
[xlings.envs]manifest 补全,并将[xlings.workspace]示例版本更新为 当前索引可用的 Node 条目。
- 修复「一键配置模块代码提示」在标准 mcpp 安装(install.sh / AUR)下无法发现 mcpp 内置
xlings 的问题:xlings 发现以
mcpp self env为权威来源(项目级契约),路径探测仅作回退; 为mcpp self env调用增加超时保护,并补齐测试(PR #11)。
- 新增 mcpp: 一键配置模块代码提示 向导:按「安装/切换工具链 → 构建 → 重载 → clangd 配置 → 模块检查」链恢复 IDE,支持取消与失败降级;仅在受信任工作区执行(issues #6/#7, PR #10)。
- 新增
mcpp.toml结构补全:段头 snippet(26 段)与依赖/feature 等写法模板,所有建议 携带显式替换范围并经真实 mcpp 契约测试;由mcpp.tomlCompletion设置控制(默认开启), 未受信任工作区仅纯文本分析(PR #9)。
- 编辑器标题栏的 mcpp 运行/测试操作按当前活动文件所属的 mcpp member 作用域执行;工作区外 打开的文件不会显示这些按钮。
- 将状态栏快捷菜单名称明确为
$(tools) mcpp: 快捷菜单,与模块可用性状态按钮区分。
- 修复 hermetic mcpp 编译数据库被插件追加
--query-driver后导致的 clangd 标准库和 模块误诊断;仅在编译命令未自带--no-default-config、-nostdinc++和显式 libc++ 路径时补充 query driver。 - 模块检查优先选择项目源码,避免误选
.mcpp依赖缓存或target生成源码,改善补全、 跳转和诊断稳定性。 - 将
build.mcpp作为独立的语法高亮语言处理,不再让 clangd 把 mcpp 构建脚本当作普通 C++ 翻译单元。
- 为精确文件名
build.mcpp增加 C++ 语言关联,复用 VS Code 内置 C++ 高亮和现有模块 语法注入;不扩大到所有*.mcpp文件。 - 为精确文件名
mcpp.toml内置独立 TOML 语法高亮,不依赖额外扩展,也不接管普通*.toml文件。
- 新增 mcpp: 一键配置模块代码提示:自动检测匹配的 clangd,缺失时通过 xlings 下载 对应版本的 llvm-tools,配置 clangd 并刷新模块状态,无需重启 VS Code。
- 检测 PCM 版本不匹配(
ast_file_version_too_new、ast_file_version_too_old、ast_file_different_branch),并在诊断信息中引导一键配置。 - 非 LLVM 工具链(GCC/MSVC)项目提供清晰的引导说明而非催促安装:状态栏点击弹出 QuickPick,一键配置向导显示原因并提供工具链安装/选择入口。
- 优化编辑器标签切换性能:相同工程内切换文件不再重复协调 clangd。
- 序列执行器使用 AsyncLocalStorage 范围标记替代全局深度计数,修复不相关并发调用 绕过队列的问题。
- 完善 xlings 检测:检查 PATH 中是否实际存在 xlings 而非无条件返回路径名,确保 未安装时的引导分支可达。
- 修复项目任务已经结束后,clangd/CDB 重协调仍占用项目锁,导致下一条 CLI 命令误报 “已有 mcpp 操作正在运行”的问题。
- 增加 GitHub tag Release 工作流:校验 tag 与扩展版本,运行测试和打包,并发布 VSIX 及其 SHA-256 校验文件。
- 新增
$(tools) mcpp状态栏快捷菜单和命令面板命令:构建、运行、测试、清理 target、 查看工具链、安装工具链、选择全局默认工具链。 - 项目任务使用 VS Code 的无 shell
ProcessExecution,显示实时任务终端;同一工程任务 互斥,工具链安装/默认值操作共享全局锁,取消不会误报成功。 - 项目任务结束后复用 CDB/clangd 自动协调;
mcpp.refreshCompilationDatabase与构建 命令共用同一任务路径,避免并发写入工程构建目录。 - 按 mcpp 官方工具链契约解析
Toolchains:、System:、Targets:和可安装列表: toolchain 与 target 分轴处理,首版 UI 不提供结构化--target选择器。 - 全局默认选择过滤普通 target-only payload,保留 mcpp 在 Windows 上将 host GCC 映射到
MinGW payload 的官方规则,并明确设置 host 默认会清空
default_target; 安装入口接受省略版本和 namespace,把兼容 spec 安全规范化为单个参数后交给 mcpp 最终解析; MSVC 走系统检测,已知 target 别名走对应 payload,泛化 triple 由 mcpp 校验。 - 工具链安装和全局默认修改均需要用户确认;Restricted Mode 不执行 mcpp 或其他外部工具。
- 打开已有编译数据库的 LLVM mcpp 工程时自动执行
clangd --check,状态栏无需点击即可显示“模块可用”或“模块不可用”。 - 编译数据库创建或变化后自动重新检查模块支持;工程内合并重复事件,共享 clangd 操作全局串行,只允许当前活动工程接管窗口级配置,并且只接受最新检查结果。
- 修改
mcpp.clangd.path或模块支持模式后自动复查,并为直接 clangd 检查增加 60 秒超时。 - 收紧 Restricted Mode:未受信任工作区不执行 CDB 编译器、mcpp 或 clangd,也不修改 clangd 配置;授予信任后自动协调。
- 补充独立安装 mcpp 的配置说明;
mcpp.path、CDB 中的编译器与mcpp.clangd.path相互独立,clang-tidy和clang-format不是当前扩展的运行依赖。
- 缺少编译数据库时,状态栏改为直接执行“刷新编译数据库”;CDB 创建或变化后会自动重新配置并重启 clangd,不再要求重载窗口。
- 增加
mcpp.path设置,允许 macOS GUI 环境显式指定 mcpp 可执行文件。 mcpp build失败后仍会检查现有 CDB;IDE 配置成功与构建失败分别提示,不再误报 clangd 已刷新。- Restricted Mode 下不会执行
mcpp build、依赖安装或build.mcpp。 - 在 README 中记录无需正式构建即可获得模块语义能力的长期核心接口、CDB 合同和插件演进计划。
- 修复 C++ 模块语法未实际注入
source.cpp的问题,import、模块名和模块分区现在会使用扩展提供的 TextMate scope。 - 增加扩展清单回归测试,防止语法注入注册字段再次写错。
- 在扩展激活和刷新编译数据库时自动配置匹配的 clangd,避免官方 clangd 扩展启动到 xlings shim。
- 模块语法高亮支持未输入分号的编辑中间态,并补充
.mpp、.ccm文件关联。 - 避免重载窗口期间异步检查向已关闭的输出频道写入。
- 修复
clangd.arguments中${workspaceFolder}未解析导致 clangd 忽略编译数据库的问题。 - 从 mcpp 的
.mcpp工具链路径自动查找用户目录下.xlings中匹配版本的 clangd。
- 为 LLVM 后端的 mcpp 工程配置官方 clangd 扩展。
- 通过直接执行
clangd --check诊断 PCM 和工具链不匹配。 - 将 GCC、MSVC 模块工程降级为语法高亮,并显示明确的能力提示。
- 增加覆盖声明、导入、模块名和分区的 C++ 模块注入语法。