Skip to content

server 0.24.2, vscode 0.24.2: modules that include <Windows.h> build for 32-bit Windows targets (#100) - #101

Merged
Sunrisepeak merged 5 commits into
mainfrom
fix/issue-100-i686-msasm
Nov 26, 2026
Merged

Sunrisepeak merged 5 commits into
mainfrom
fix/issue-100-i686-msasm

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Owner

Fixes #100. The fix is in the engine: mcppls-clangd PR 25 (0.0.24, patch 0049, 23.1.0-mcppls.13), which this PR tests through packaging/engine-candidate.json before the engine is merged (docs/92-release.md "A new engine"); the candidate file goes away with the lock switch to the released archives.

Cause (the report took it for an engine without X86; it has always had one): clang parses MS-style __asm { } with the target's MC and assembly parser, which clangd did not register. The editor path hides the error, but a module build cannot: clang writes no module interface once an error has been reported, so the module and everything that imports it failed. winnt.h uses __asm only under _M_IX86, hence x86_64 was never affected.

Here:

  • conformance fixture compdb-i686-asm (linux-x64): a module with an __asm block for i686-pc-windows-msvc in a compile_commands.json. Locally: fails on the unmodified engine (2 failures: the module and its importer), passes on the patched one.
  • conformance fixture compdb-clangxx-msvc-i686-windows-h (win32-x64): the report's shape, <Windows.h> in a global module fragment for i686-pc-windows-msvc, built by clang++ first as the project builds it.
  • server 0.24.2 and VS Code 0.24.2 (version --bump), CHANGELOG and troubleshooting entries (en, zh-CN).
  • design and review decisions: .agents/docs/2026-11-26-issue-100-engine-batch-design.md (including why filtering the diagnostic in the module worker, the first design, cannot work).

Not carried from the batch: mcppls-clangd#19 (needs openkal's process-start API) and #66 (needs the package roots from mcpp); both stay open with the finding.

Sunrisepeak and others added 5 commits November 26, 2026 02:46
…for 32-bit Windows targets (#100)

The report: for i686-windows-msvc the bundled clangd failed every module that
includes <Windows.h> with "MS-style inline assembly is not available: target MC
unavailable" (winnt.h's Int64ShllMod32 family uses __asm under _M_IX86), and every
module downstream with it, while the project's own build was clean. It took the cause
for an engine without the X86 target; the engine has always had one.

The cause is in the engine: clang parses __asm with the target's MC and assembly
parser, clangd registered neither, and a module build writes no interface once an error
was reported (the editor path hides the diagnostic, a module build cannot). Fixed in
mcppls-clangd 0.0.24 (patch 0049, 23.1.0-mcppls.13).

Here: the tests. compdb-i686-asm (a module with an __asm block for
i686-pc-windows-msvc in a compile_commands.json, linux-x64: fails on the unmodified
engine, passes on the fixed one) and compdb-clangxx-msvc-i686-windows-h (the report's
shape, the SDK's own <Windows.h> for i686, win32-x64, built by clang++ first as the
project builds it). Server 0.24.2 and VS Code 0.24.2 carry the engine, with the
changelog and the troubleshooting entries.

Design: .agents/docs/2026-11-26-issue-100-engine-batch-design.md (with the review
decisions, the finding that filtering the diagnostic in the worker cannot work, and the
items of the batch not carried: mcppls-clangd#19, mcpp-language-server#66).

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…033943

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… the finding is in the changelog, the troubleshooting entry and the design

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…inked for arm64), run 45695804666

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…sed; the candidate file is gone

Size and SHA-256 of clangd-23.1.0-mcppls.13-openkal.tar.gz were checked against two downloads and the published .sha256 (f47bf7dc65eb300ea58f0e938f05cff05ba6c313ec07b8a67c0adee8c8bcf749, 52089145 bytes).

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
@Sunrisepeak
Sunrisepeak merged commit 6450c74 into main Nov 26, 2026
168 of 170 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant