Repository navigation
Description
Summary
In a Windows C++23 mcpp project that uses HuxerUI's hcg composable transform, mcppls 0.23.0 repeatedly restarts its clangd engine and ends in a degraded state. The restart reason is a plan diff for the standard-library module units (std.ixx, std.compat.ixx), whose compile commands differ between compile sets only in include directories.
As a user-visible consequence, Format Document does nothing for the open src/app.cppm, while src/main.cpp formats normally.
Environment
| Component | Version |
|---|---|
| mcppls | 0.23.0 (win32-x64) |
| bundled clangd | 23.1.0-mcppls.12 |
| VS Code | 1.147.0 |
| OS | Windows 11 Pro 10.0.26200 |
| mcpp | 2026.11.20.1 |
| toolchain | clang 23.1.3, MSVC STL 14.52.37025, Windows SDK 10.0.26100.0 |
| target | x86_64-pc-windows-msvc |
Steps to reproduce
- Create a C++23 mcpp app that uses HuxerUI with
[[huxerui::composable]],hcgenabled, and[build] sources = []. - Run
mcpp buildonce so the build database and generated sources exist. - Open
src/app.cppmin VS Code and let mcppls settle. - Run
mcppls status. - Run Format Document on
src/app.cppm(or save witheditor.formatOnSave).
Expected
- The clangd engine stays healthy; the workspace is not
degraded. - Format Document applies the project
.clang-formatto the open file.
Actual
mcppls statusreportsdegraded.- The diagnostic bundle contains multiple
restart-backoffincidents with:
cause: plan
reason: units are compiled with other arguments (std.compat.ixx)
- The engine plan diff shows the same standard-library unit compiled with different include arguments:
firstDifference: argument 1:
-I...\mcpplibs.huxerui\...\include
->
-I...\mcpplibs-x-openkal\0.26.0\openkal-0.26.0\include
- Format Document does not modify
src/app.cppm.src/main.cppformats normally; clangd logs a successfultextDocument/formattingreply for it. - The project plan reports:
{
"issueCount": 1,
"issues": [{
"code": "ambiguous-module",
"file": "D:/WorkSpace/mcpp/hui/src/app.cppm",
"message": "module app has 2 providers; using src_app.cppm"
}],
"leftOut": ["D:/WorkSpace/mcpp/hui/src/app.cppm"],
"openSources": ["D:/WorkSpace/mcpp/hui/src/app.cppm"]
}- The CLI formatter works:
clang-format -i src/app.cppm
with clang-format 23.1.6 and the project .clang-format produces the expected formatting, so the issue is in the editor/engine path rather than in clang-format.
Analysis
The build database contains several compile sets (the host build program and the target application). The same std.ixx / std.compat.ixx unit appears in more than one set with different include directories. mcppls treats this as “units are compiled with other arguments” and restarts clangd; repeated plan changes exhaust the restart budget and leave the engine in backoff.
Two questions:
- Can mcppls avoid restarting for differences in include directories on standard-library module units that are reused, or can mcpp emit a deduplicated/consistent command for these units?
src/app.cppmisleftOutbecausehcgreplaces the original composable source withsrc_app.cppmin the compile database. The ambiguity is understandable, but an open buffer should still be formattable via clang-format even when it is not the engine's module provider. CouldtextDocument/formattingbe made independent of the engine database, or could the original path be mapped to the generated copy for semantic features while keeping formatting on the original?
Diagnostic bundle
The redacted bundle is attached in the comment below:
The bundle was exported by mcppls 0.23.0 with redacted: true; manifest.json reports residueCheck: passed and 16,234 home-directory redactions (home paths are shown as ~). It contains the manifest, environment, aggregate report, engine plan and compile commands, four restart-backoff incidents (each with incident.json and clangd.log), and the client/server logs.
Additional context
- The app builds and runs; this is an editor tooling issue.
mcpplsis configured with--fallback-style=mcpp.- The project
.clang-formatis located above the workspace root (D:\WorkSpace\.clang-format); this may be a separate sandbox/grant observation. - A minimal repro repository can be provided if needed.
Activity
yizhinailong commentedon Nov 22, 2026
mcppls-bundle-20261122T124704.140Z.zip
0.24.0: std's command follows the build, not an edit buffer, and an o…