Skip to content

0.1.1: mcppls found as the command that starts it; CLion over mcppls 0.0.19's per-system packages - #2

Merged
Sunrisepeak merged 8 commits into
mainfrom
release/0.1.1
Oct 29, 2026
Merged

Sunrisepeak merged 8 commits into
mainfrom
release/0.1.1

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

mcppls is found as the command that starts it

  • Evidence. mcppls 0.0.18 and later carry the server as an okb that the platform's runner starts: payload.json's server is bin/okrun bin/mcppls.okb. mcpp-ide 0.1.0's VS Code adapter passed <payload>/bin/mcppls.okb as a program, and the backend ran it for --version.
    • Measured against the 0.0.18 payload: starting …/mcppls.okb: permission denied, state unreadable.
    • The user data directory's payload was looked for as bin/mcppls, which does not exist.
  • Fix. A candidate is now a payload directory, whose server is started as it says, or a program; languageService/status reports the command beside the program.
    • Measured with the same payload passed as a directory: mcppls 0.0.18 at …/mcppls.okb, state ok, command […/okrun, …/mcppls.okb].
  • VS Code (mcpp-vscode 1.0.1). The candidate is the mcppls extension's payload directory (MCPPLS_PAYLOAD, else <extension>/payload), and MCPPLS_SERVER.
  • CLion (mcpp-clion 0.1.1).

The editor plugins are mide-plugins/

Directory Plugin Protocol editor
mide-plugins/vscode (was vscode/) mcpp-vscode vscode
mide-plugins/clion (was jetbrains/) mcpp-clion jetbrains, the IntelliJ platform's id, unchanged
mide-plugins/nvim (new) mcpp-nvim nvim
  • Moved with git mv; src/, webui/, spec/, protocol/ and tests/ stay at the root.
  • References that follow the move:
    • CI: working directories, the npm cache path, the Gradle cache key, the artifact paths; the CLion job's id is clion.
    • Gradle: one repository root for spec/, webui/, the fixtures and the generator's working directory.
    • The extension: its npm scripts, its tests' repository and extension directory, the panels' tests.
    • mcpp-ide-dev gen: default outputs, the VSIX staging, the translation check.
    • .gitignore, the READMEs (en, zh-CN), docs/, the CHANGELOG.
  • git grep -n -E '\b(vscode|jetbrains)/' finds only mide-plugins/… paths and the npm scope @vscode/.

mcpp-nvim: mcpp's project features in Neovim

Neovim 0.10 and later, over the same backend. Lua module mcpp, command :Mcpp, diagnostic namespaces mcpp and mcpp.toml, autocommand User McppStatus, xlings package mcpp-ide-nvim. It registers no language service: C++ files are mcppls's, through mcppls-nvim.

  • Session.
    • The backend is setup()'s backend (a program, an .okb run by okrun, or an argv), else mcpp-ide on PATH.
    • When neither is found, the plugin says xlings install mcpp-ide and starts nothing.
    • It speaks through Neovim's own JSON-RPC client (vim.lsp.rpc.start, Content-Length framing); the plugin has no framer of its own.
    • One backend per Neovim, started for the nearest mcpp.toml upward.
    • initialize sends editor = "nvim", v:lang (or mcpp.ui.language), the folder, setup()'s settings and the trust. The trust rule: Neovim has no workspace trust, so a project is trusted unless trusted = false.
    • The runtime strings and the command table come from the backend.
    • The backend ends with shutdown and exit on VimLeavePre.
  • Commands. :Mcpp <subcommand>, with completion, covers the backend's table for nvim:
    • job and rpc: streamed into mcpp://output; :Mcpp cancel stops them.
    • run: run/launch's argv, cwd and env in a terminal buffer.
    • debug: offered only when nvim-dap is present. The adapters codelldb, lldb-dap/lldb, cppdbg and gdb map to the backend's engines.
    • cache: the plan, confirmed at its level, then applied.
    • selectTarget, installToolchain, selectDefaultToolchain, newProject, library search with mcpp add, and pack: vim.ui.select and vim.ui.input.
    • targets, cache and graph view models: text in floating windows.
    • :Mcpp alone opens the quick menu.
    • selfCheck and the language service are notifications, which say xlings install mcppls-nvim when mcppls is missing or outdated.
  • Diagnostics. A build's problems go to the mcpp namespace, the manifest's to mcpp.toml; :Mcpp problems fills the quickfix list.
  • Statusline. require('mcpp').status() shows mcpp <target> · build ok; status_data() returns the same state as a table.

The protocol and the backend

  • nvim joins initialize's and commands/list's editor enum.
  • Each commands/list row names its subcommand: the id after mcpp., or the row's own. mcpp.cancelJob is cancel.
  • spec/commands.json:
    • Neovim gets mcpp.problems (action kind problems) and the quick menu.
    • Neovim leaves out the settings panel and the two palette-hidden entry pages, each with its reason in omitted.
    • The VS Code and CLion declarations it generates are unchanged.
  • spec::offered_in is now the one rule shared by the backend and mcpp-ide-dev gen.
  • Each cache inventory row carries bytesText.
  • check-i18n reads the plugin's Lua; its new strings have zh-cn entries.

CI

  • New job nvim (Neovim plugin, Ubuntu): it builds the backend, installs nvim@0.10.4 and nvim@0.12.5 from xlings, and runs mide-plugins/nvim/tests/smoke.lua headless on each over the mock mcpp, then once over the real mcpp, which builds the test's project.
    • Neovim runs outside the checkout: inside it, xlings use switches the project's own subos, which .xlings.json gives mcpp only.
  • Results on this branch (run 40810066503):
    • Pass: the five backend legs, the VS Code extension (unit, panels, e2e on VS Code 1.91 with the setting's backend and with the bundle, the package), and the Neovim plugin (38, 38 and 34 checks).
    • Fail, as expected: the CLion plugin, at the configuration-time fetch of mcppls-clion-0.0.19-linux-x64.zip, which is not released yet.
    • Skipped: packages, which needs the CLion job.

Verified locally

What Result
mcpp test (mcpp 2026.10.27.1) 8/8, including the nvim command table, the spec's reasons and the rows' sizes
mcpp-ide-dev check-i18n 0 missing
The extension's unit tests 10/10
The panels' tests 10/10
check:webui clean
The VS Code e2e (VS Code 1.108.0, headless) 7/7
The generated VS Code package.json and CLion actions identical to before the move, apart from the version
The Neovim suite over the mock mcpp, Neovim 0.12.5 and 0.10.4 38/38 each
The Neovim suite over the real mcpp 2026.10.27.1 34/34

The suite covers the missing-backend message, start and initialize, the table, completion, a streamed build, a failed build's problem and the quickfix list, the manifest's problem, the views, the run terminal, the nvim-dap configuration, a cleanup, the quick menu, the language service, the self-check, cancel, library add, pack, the target, and shutdown.

The CLion plugin is not built locally; its Kotlin and Gradle changes are path fixes only. The CLion job fetches mcppls-clion-0.0.19-linux-x64.zip from the mcppls release, so it passes once mcppls 0.0.19 is released.

Co-authored-by: speak-agent 248744407+speak-agent@users.noreply.github.com

Sunrisepeak and others added 8 commits October 29, 2026 09:37
…0.0.19's packages

mcppls 0.0.18 and later carry the server as an okb that the platform's
runner starts (payload.json's `server`). The backend ran the okb itself
for `--version`, so the VS Code extension's mcppls was reported as not
reporting its version, and the user data directory's payload was looked
for as `bin/mcppls`. A candidate is now a payload directory or a program;
languageService/status reports the command.

- VS Code (mcpp-vscode 1.0.1): the mcppls extension's payload directory.
- CLion (mcpp-clion 0.1.1): the payload the mcppls CLion plugin carries
  (mcppls 0.0.19, one package per system); since-build 261, as the
  plugin it depends on; Install/Update mcppls open Settings | Plugins.

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

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… (mcpp-vscode), mide-plugins/clion (mcpp-clion, the editor id jetbrains)

The adapters move with their history (git mv); the backend, webui/, spec/, protocol/ and tests/ stay at the
root. Every reference follows: CI's working directories, npm cache path, Gradle cache key and artifact
paths (the CLion job is `clion`); Gradle's repository root for spec/, webui/, the fixtures and the
generator's working directory; the extension's npm scripts and its tests' repository; the panels' tests;
mcpp-ide-dev gen's default outputs, staging and the translation check; .gitignore; the READMEs and docs.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…d; the protocol's editor nvim

mide-plugins/nvim (Lua module `mcpp`, command `:Mcpp`), Neovim 0.10 and later. It starts one
`mcpp-ide serve` per Neovim -- setup()'s `backend`, else `mcpp-ide` on PATH, else it says
`xlings install mcpp-ide` -- for the nearest mcpp.toml upward, through Neovim's own JSON-RPC client
(vim.lsp.rpc: no framer of its own), and initializes it as the editor `nvim` with v:lang, the trust
(always, unless `trusted = false`), the folder and setup()'s settings. `:Mcpp <subcommand>` offers the
backend's command table for nvim, with completion: jobs streamed into mcpp://output and cancelled with
`:Mcpp cancel`, the run in a terminal buffer, nvim-dap when it is there, the cleanup plans confirmed at
their level, targets, toolchains, new projects, libraries and pack through vim.ui.select/input, the
targets, cache and graph view models as text in floating windows, the quick menu, the self-check and
the language service as notifications (`xlings install mcppls-nvim` when mcppls is missing or older).
mcpp's diagnostics are the namespaces `mcpp` and `mcpp.toml`; `:Mcpp problems` fills the quickfix
list; `require('mcpp').status()` is a statusline component. No language service is registered.

The backend: `nvim` in the protocol's editor enums; each commands/list row names its `subcommand`;
spec/commands.json gives Neovim `mcpp.problems` (action `problems`) and the quick menu, leaves out the
settings panel and the panels' entry pages and says why (`omitted`); `offered_in` is one function,
spec::offered_in, for the backend and mcpp-ide-dev gen; the cache inventory's rows carry `bytesText`.
The check-i18n scan reads the plugin's Lua. Tests: the nvim command table and the spec's reasons
(test_protocol), the rows' sizes (test_views), and tests/smoke.lua -- a headless suite against the
backend built here, over the mock mcpp or a real one. CI's `nvim` job runs it on Neovim 0.10.4 and
0.12.5 (xlings) over the mock, then over the real mcpp. README, docs, CHANGELOG 0.1.1.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…through the global subos

Inside the checkout `xlings use nvim` switched the project's own subos (.xlings.json, which holds
mcpp only) and failed: "nvim is not installed in this subos (_)". The Neovim steps now run in
$RUNNER_TEMP, check that `nvim` is the version selected, and start the suite by its path.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
initialize's checks were said as errors and the language service's again with
`xlings install mcppls-nvim` (seen in CI, where no mcppls is installed); the check is now left to the
second.

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

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…s stay inside the payload

- mcpp-nvim: vim.lsp.rpc drops the requests in flight when the process ends. They are now failed
  with -32099, the jobs followed end as failed, and a start still initializing fails, so :Mcpp and
  :Mcpp <Tab> no longer wait on a backend that has ended. The projects it watched are learned again
  by the next backend, however it is started. The quick menu finds a row by id in the whole table, so
  Debug without nvim-dap says what it needs. A client that runs an okb outside a payload is left to
  the backend's own search instead of naming its runner as mcppls.
- languageservice: payload.json's server.runner and server.path are followed only as relative paths
  with no '..' part, as mcppls's payload reader holds them.
- mcpp-clion: the payload's runner is made executable again before the backend runs it for
  mcppls's version (a plugin install may drop the bit).
- tests: test_languageservice (paths outside the payload), BackendTest (the runner's bit), the
  Neovim smoke (a backend that ends while it starts, and mid-build).

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
@Sunrisepeak
Sunrisepeak merged commit cc0f28e into main Oct 29, 2026
20 of 21 checks passed
@Sunrisepeak
Sunrisepeak deleted the release/0.1.1 branch October 29, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant