Skip to content

Commit 3c2c7b8

Browse files
0.1.0: the mcpp-ide backend, shared panels, mcpp-vscode 1.0.0 and mcpp-clion 0.1.0 (#1)
The first release of mcpp-ide (mcpp design 2026-10-26 part 1 §14; 2026-10-28 §11.2): one backend for mcpp's editor integrations, the VS Code extension it now powers, and the CLion plugin. ## What is in it | Part | Content | |---|---| | `protocol/` | `protocol.schema.json` (the backend's methods and notifications) and `mcpp-contract.schema.json` (the part of mcpp's contract it reads); golden fixtures recaptured from mcpp 2026.10.27.1 (release branch at 7c5ee0bb) by `mcpp-ide-dev capture`, with the platform fixtures (`toolchain-list-platform.json`, `build-platform.ndjson`: an `aarch64-openkal` build) | | backend (`src/`) | sessions, watching, jobs (one per project, cancel, newest-supersedes), view models, cleanup plans, settings validation and migration, the command table, i18n, self-check, `--protocol-version` and `mcppls --version` handshakes, targets with the platform that configures each, normalised job/test notifications | | `spec/` | settings, commands, translations: the source of both editors' declarations, generated by `mcpp-ide-dev gen vscode\|jetbrains` (nothing generated is committed) | | `webui/` | project, targets and platforms, libraries, graphs, cache, pack, settings: one set of panels for a VS Code webview and a JCEF page | | `vscode/` | mcpp-vscode 1.0.0 (extension ID unchanged): tasks in a pseudoterminal, Testing view, debug configurations, Problems from mcpp, project tree, status bar, mcpp.toml editing help; `extensionPack: ["sunrisepeak.mcpp-language-server"]`, no language service | | `jetbrains/` | mcpp-clion 0.1.0 (ID `io.github.mcpp-community.mcpp-clion`), CLion 2025.2+: run configurations (PTY console, ▶ beside `main`), test tree, CLion's debugger, console links, the mcpp tool window; depends on `io.github.sunrisepeak.mcppls`, no language service | | `agents/` | driving the backend from an agent, and a skill | | distribution | the backend as ok images (`<arch>-openkal`, openkal-platform 0.17.3), packed as one bundle `backend/mcpp-ide.okb` (5.7 MB) that both editor packages carry with okrun for linux-x86_64, linux-aarch64, macos-aarch64 and windows-x86_64 | | CI / release | backend built and tested on Linux x64/arm64, macOS, Windows, and with the host graph on openkal-platform 0.17.3 (build programs as ok images); the bundle and the universal self-contained package (`--systems linux,macos,windows`, every okrun built over the platform's hosted arrangement) packed once, on Linux; extension unit, panel and extension-host tests (backend via setting, and the bundle the extension carries) and package; plugin tests, package and Plugin Verifier; both editor packages and the universal package opened and started on all four systems; release publishes the packages, the bundle and the universal package | ## Sizes | | before (a program per system) | after (one bundle + okrun per system) | |---|---|---| | mcpp-vscode-1.0.0.vsix | 4,686,866 B | 3,217,042 B | | mcpp-clion-0.1.0.zip | 4,605,498 B | 3,172,459 B | ## Depends on - mcpp 2026.10.27.1 (platforms, `mcpp pack --pkg-format okb`, universal packages, `--merge`): CI builds `release/2026.10.27.1` (`MCPP_SOURCE_REF` in `.github/versions.env`) until it is released. - mcpplibs/os 0.2.1 (no openkal-tools of its own beside the platform's): a git dependency on its branch until it is published. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 90ae383 commit 3c2c7b8

143 files changed

Lines changed: 18940 additions & 698 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitattributes‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Text is LF everywhere; the golden fixtures are mcpp's bytes, compared and replayed exactly.
2+
* text=auto eol=lf
3+
protocol/fixtures/** -text
4+
*.png binary
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: Set up mcpp
2+
description: Install xlings, the pinned mcpp (built from MCPP_SOURCE_REF when it is set) and (for macOS and Windows targets) the pinned LLVM, with the package store cached.
3+
inputs:
4+
llvm:
5+
description: Install LLVM and make it mcpp's default toolchain.
6+
default: 'false'
7+
runs:
8+
using: composite
9+
steps:
10+
- name: Version pins
11+
shell: bash
12+
run: |
13+
set -euo pipefail
14+
while IFS='=' read -r name value; do
15+
case "$name" in ''|\#*) continue ;; esac
16+
if [ -z "${!name:-}" ]; then echo "$name=$value" >> "$GITHUB_ENV"; fi
17+
done < .github/versions.env
18+
- name: Install xlings (Unix)
19+
if: runner.os != 'Windows'
20+
shell: bash
21+
run: |
22+
curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 \
23+
https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh \
24+
| bash -s "$XLINGS_VERSION"
25+
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
26+
- name: Install xlings (Windows)
27+
if: runner.os == 'Windows'
28+
shell: pwsh
29+
run: |
30+
irm https://d2learn.org/xlings-install.ps1.txt | iex
31+
"$env:USERPROFILE\.xlings\subos\current\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
32+
- name: Cache the mcpp package store
33+
uses: actions/cache@v5
34+
with:
35+
path: ~/.mcpp/registry/data/xpkgs
36+
key: mcpp-xpkgs-${{ runner.os }}-${{ runner.arch }}-${{ env.MCPP_VERSION }}-${{ hashFiles('mcpp.toml', 'mcpp.lock') }}
37+
restore-keys: mcpp-xpkgs-${{ runner.os }}-${{ runner.arch }}-${{ env.MCPP_VERSION }}-
38+
- name: Install mcpp
39+
shell: bash
40+
run: |
41+
set -euo pipefail
42+
for attempt in 1 2 3 4 5; do
43+
xlings update > /dev/null 2>&1 || true
44+
if xlings install "mcpp@$MCPP_VERSION" -y -g; then break; fi
45+
[ "$attempt" = 5 ] && { echo "::error::mcpp@$MCPP_VERSION could not be installed"; exit 1; }
46+
sleep 30
47+
done
48+
mcpp --version
49+
mcpp self config --mirror GLOBAL
50+
- name: Install LLVM
51+
if: inputs.llvm == 'true'
52+
shell: bash
53+
run: |
54+
set -euo pipefail
55+
for attempt in 1 2 3; do
56+
if mcpp toolchain install llvm "$LLVM_VERSION"; then break; fi
57+
[ "$attempt" = 3 ] && exit 1
58+
sleep 30
59+
done
60+
mcpp toolchain default "llvm@$LLVM_VERSION"
61+
# MCPP_SOURCE_REF: mcpp built from that ref, before the ref is released; the program is kept per
62+
# commit and system, and put first on PATH.
63+
- name: Resolve MCPP_SOURCE_REF
64+
id: source
65+
if: env.MCPP_SOURCE_REF != ''
66+
shell: bash
67+
run: |
68+
set -euo pipefail
69+
sha="$(git ls-remote https://github.com/mcpp-community/mcpp.git "refs/heads/$MCPP_SOURCE_REF" "refs/tags/$MCPP_SOURCE_REF" | head -1 | cut -f1)"
70+
[ -n "$sha" ] || { echo "::error::mcpp-community/mcpp has no branch or tag $MCPP_SOURCE_REF"; exit 1; }
71+
echo "sha=$sha" >> "$GITHUB_OUTPUT"
72+
- name: Restore mcpp built from ${{ env.MCPP_SOURCE_REF }}
73+
id: kept
74+
if: env.MCPP_SOURCE_REF != ''
75+
uses: actions/cache/restore@v5
76+
with:
77+
path: ~/.mcpp-source/bin
78+
key: mcpp-source-${{ runner.os }}-${{ runner.arch }}-${{ steps.source.outputs.sha }}
79+
- name: mcpp from ${{ env.MCPP_SOURCE_REF }}
80+
id: built
81+
if: env.MCPP_SOURCE_REF != ''
82+
shell: bash
83+
env:
84+
SHA: ${{ steps.source.outputs.sha }}
85+
run: |
86+
set -euo pipefail
87+
case "$RUNNER_OS" in Windows) exe=mcpp.exe ;; *) exe=mcpp ;; esac
88+
bin="$HOME/.mcpp-source/bin"
89+
# A kept program that does not start (its toolchain's run-time is not in this store) is built again.
90+
if ! "$bin/$exe" --version > /dev/null 2>&1; then
91+
src="$RUNNER_TEMP/mcpp-source"
92+
rm -rf "$src"
93+
git init -q "$src"
94+
git -C "$src" fetch -q --depth 1 https://github.com/mcpp-community/mcpp.git "$SHA"
95+
git -C "$src" checkout -q FETCH_HEAD
96+
# mcpp builds itself with the release its .xlings.json pins (xlings sets the project up).
97+
for attempt in 1 2 3; do
98+
if (cd "$src" && xlings install -y); then break; fi
99+
[ "$attempt" = 3 ] && { echo "::error::the mcpp $MCPP_SOURCE_REF pins could not be installed"; exit 1; }
100+
sleep 30
101+
done
102+
(cd "$src" && mcpp --version && mcpp build)
103+
built="$(find "$src/target" -type f -name "$exe" -path '*/bin/*' ! -path '*/dist/*' | head -1)"
104+
[ -n "$built" ] || { echo "::error::building mcpp at $MCPP_SOURCE_REF left no $exe"; exit 1; }
105+
mkdir -p "$bin"
106+
cp "$built" "$bin/$exe"
107+
echo "fresh=true" >> "$GITHUB_OUTPUT"
108+
fi
109+
"$bin/$exe" --version
110+
case "$RUNNER_OS" in Windows) cygpath -w "$bin" ;; *) echo "$bin" ;; esac >> "$GITHUB_PATH"
111+
# Kept as soon as it is built, so a job that fails later does not build it again.
112+
- name: Keep mcpp built from ${{ env.MCPP_SOURCE_REF }}
113+
if: env.MCPP_SOURCE_REF != '' && steps.built.outputs.fresh == 'true' && steps.kept.outputs.cache-hit != 'true'
114+
uses: actions/cache/save@v5
115+
with:
116+
path: ~/.mcpp-source/bin
117+
key: ${{ steps.kept.outputs.cache-primary-key }}

‎.github/scripts/check-package.sh‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
# check-package.sh <package> <root inside the archive>
3+
#
4+
# What an editor package carries of the backend, checked on the system this runs on (CI runs it on
5+
# every system): the ok-image bundle (mcpp design 2026-10-28 part 2 §15), exactly one
6+
# backend/mcpp-ide.okb; an okrun for every system and architecture CI packs; and the one for this
7+
# system starting the bundle.
8+
set -euo pipefail
9+
package="$1" prefix="$2"
10+
dir="$(mktemp -d)"
11+
trap 'rm -rf "$dir"' EXIT
12+
unzip -q "$package" -d "$dir"
13+
root="$dir/$prefix"
14+
15+
case "$(uname -s)" in Linux) os=linux ;; Darwin) os=macos ;; *) os=windows ;; esac
16+
case "$(uname -m)" in x86_64|amd64|AMD64) arch=x86_64 ;; aarch64|arm64|ARM64) arch=aarch64 ;; *) arch="$(uname -m)" ;; esac
17+
exe=""; [ "$os" = windows ] && exe=".exe"
18+
19+
answers() { # <argv...>: the backend says who it is
20+
local said
21+
said="$("$@" --version)"
22+
echo "$said"
23+
grep -q '^mcpp-ide ' <<< "$said"
24+
}
25+
26+
okbs="$(find "$root" -name '*.okb' | wc -l | tr -d ' ')"
27+
[ "$okbs" = 1 ] || { echo "::error::$package carries $okbs ok-image bundles; one is expected"; exit 1; }
28+
[ -f "$root/backend/mcpp-ide.okb" ] || { echo "::error::the bundle is not backend/mcpp-ide.okb"; exit 1; }
29+
for want in linux-x86_64 linux-aarch64 macos-aarch64 windows-x86_64; do
30+
ls "$root/backend/okrun/$want/"okrun* > /dev/null 2>&1 || { echo "::error::$package carries no okrun for $want"; exit 1; }
31+
done
32+
[ -d "$root/bin" ] && { echo "::error::$package carries bin/ beside the bundle"; exit 1; }
33+
okrun="$root/backend/okrun/$os-$arch/okrun$exe"
34+
chmod +x "$okrun" 2>/dev/null || true
35+
answers "$okrun" "$root/backend/mcpp-ide.okb"
36+
echo "$package: one bundle; okrun for $os-$arch starts it"

‎.github/versions.env‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# The versions CI builds and tests with, in one file; .github/actions/setup-mcpp exports them.
2+
# The released mcpp CI installs and uses: the control contract the fixtures were captured from
3+
# (protocol/fixtures/version.txt) and the platforms (openkal-platform 0.17.3) the backend's ok images
4+
# are built on.
5+
MCPP_VERSION=2026.10.27.1
6+
# A ref of mcpp-community/mcpp CI builds mcpp from and uses instead, for a contract not yet released.
7+
# Empty: the release above is used.
8+
MCPP_SOURCE_REF=
9+
# The LLVM the backend builds with on macOS and Windows (the targets mcpp reaches there with it).
10+
LLVM_VERSION=23.1.3
11+
# The xlings mcpp 2026.10.27.1 bundles, which reads the current index.
12+
XLINGS_VERSION=v2026.10.26.1
13+
# The oldest VS Code the extension supports (engines.vscode), which its tests run in.
14+
VSCODE_VERSION=1.91.0

0 commit comments

Comments
 (0)