From 3577ba69b77c17b87f8aaaa379df2e389eca5a14 Mon Sep 17 00:00:00 2001 From: "Aleksei (Faumaray) Selikhov" Date: Sat, 5 Dec 2026 10:02:11 +0300 Subject: [PATCH] feat(ide): export Zed task assets; publish Void/VbsZed --- docs/agent-workflow/STATE.md | 2 ++ docs/agent-workflow/TASKS.md | 1 + docs/agent-workflow/VERIFICATION.md | 7 +++++ docs/roadmap/22-superiority-and-gaps.md | 2 +- src/Editor/CompDb.cpp | 38 ++++++++++++++++++++++++- tests/FullV1Tests.cpp | 12 +++++++- 6 files changed, 59 insertions(+), 3 deletions(-) diff --git a/docs/agent-workflow/STATE.md b/docs/agent-workflow/STATE.md index 8731360..372d12f 100644 --- a/docs/agent-workflow/STATE.md +++ b/docs/agent-workflow/STATE.md @@ -322,6 +322,8 @@ Stage: VERIFIED โ€” Plans 01โ€“19 + Plan 20 Slices 1โ€“2C + Track A + Track B (B - **Wave 114 (VS Code Extension Repository)**: `vbs ide plugin` now emits a portable extension (workspace-folder based, `VBS_BIN`/`vbs` fallback) and the assets were published to the new [Void/VbsVsCode](https://git.faumaray.com/Void/VbsVsCode) repository (`package.json` with six commands, `extension.js`, README, MIT LICENSE, `.vscodeignore`). Zed/CLion plugin repositories remain. +- **Wave 115 (Zed Extension Repository)**: `vbs ide plugin --editor zed` now emits `extension.toml`, `tasks.json` (six tasks) and a README; the assets were published to the new [Void/VbsZed](https://git.faumaray.com/Void/VbsZed) repository and confirmed via the Gitea API. The plugin asset unit test now covers both VS Code and Zed. + ## Remaining future scope - **Superiority plan ([22-superiority-and-gaps.md](../roadmap/22-superiority-and-gaps.md), 2026-12-05)**: revised platform strategy - **macOS deferred**, **Windows via MinGW-w64 cross-compilation + Wine execution** (`dev cpp-gcc -p pkgsCross.mingwW64.stdenv.cc`, `dev cpp-gcc -p wine64`), native MSVC deferred; plus packaging parity (ZIP/DEB/RPM), IDE ecosystem, migration tooling, test-runner parity, benchmarks, CI runners, and remote execution in prioritized order. diff --git a/docs/agent-workflow/TASKS.md b/docs/agent-workflow/TASKS.md index 6fe53ae..521727f 100644 --- a/docs/agent-workflow/TASKS.md +++ b/docs/agent-workflow/TASKS.md @@ -118,4 +118,5 @@ Base HEAD: `fe0d1a6` | Wave 112 (`vbs migrate`) | Bounded CMakeLists importer rendering a build.cpp scaffold, with notes for untranslated constructs | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; unit test and CLI contract pass) | `include/Void/Build/Config/CmakeImport.hpp`, `src/Config/CmakeImport.cpp`, `src/Main.cpp`, `tests/{FullV1Tests,CliContracts}.cpp/cmake`, docs | | Wave 113 (Editor plugin assets) | `vbs ide plugin --editor vscode --output DIR` emits extension assets; other editors rejected | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; unit test and CLI contract pass) | `include/Void/Build/Editor/CompDb.hpp`, `src/Editor/CompDb.cpp`, `src/Main.cpp`, `tests/{FullV1Tests,CliContracts}.cpp/cmake`, docs | | Wave 114 (VS Code extension repo) | Portable `vbs ide plugin` output published to `Void/VbsVsCode` (6 commands, LICENSE, README) | COMPLETE & VERIFIED (unit test and CLI contract pass; repo contents confirmed via the Gitea API) | `src/Editor/CompDb.cpp`, `tests/FullV1Tests.cpp`, [Void/VbsVsCode](https://git.faumaray.com/Void/VbsVsCode), docs | +| Wave 115 (Zed extension repo) | `vbs ide plugin --editor zed` emits extension.toml/tasks.json/README; published to `Void/VbsZed` | COMPLETE & VERIFIED (unit test passes; repo contents confirmed via the Gitea API) | `src/Editor/CompDb.cpp`, `tests/FullV1Tests.cpp`, [Void/VbsZed](https://git.faumaray.com/Void/VbsZed), docs | | Future (Plan 20 Slice 3 / Tracks C, E3 editor extensions) |"}] Live `conan` CLI verification; macOS/Windows/cross-compile; binary-variant signing and key distribution; daemon-side dependency materialization and editor plugins; `Void::Net`/`Void::Sqlite` alignment | PLANNED (unimplemented) | [21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md), [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md) | diff --git a/docs/agent-workflow/VERIFICATION.md b/docs/agent-workflow/VERIFICATION.md index ef59a30..eeea4a1 100644 --- a/docs/agent-workflow/VERIFICATION.md +++ b/docs/agent-workflow/VERIFICATION.md @@ -1628,6 +1628,13 @@ vbs ide plugin --project --build-dir --editor vscode --output 0) { + zed_tasks += ",\n"; + } + zed_tasks += " {\"label\":" + json_quote(command.title) + + ",\"command\":\"vbs\",\"args\":" + json_array(command.args, json_quote) + + ",\"use_new_terminal\":false,\"allow_concurrent_runs\":false}"; + } + zed_tasks += "\n]\n"; + const std::string zed_manifest = + "id = \"vbs\"\n" + "name = \"VoidBuildSystem\"\n" + "description = \"Zed task assets for VoidBuildSystem (VBS).\"\n" + "version = \"0.1.0\"\n" + "schema_version = 1\n" + "authors = [\"Void contributors\"]\n" + "repository = \"https://git.faumaray.com/Void/VbsZed\"\n"; + const std::string zed_readme = + "# VbsZed\n\nZed task assets for VoidBuildSystem, generated by `vbs ide plugin " + "--editor zed`.\n\nCopy `tasks.json` to `.zed/tasks.json` in your project (or install " + "this extension) and run the tasks from Zed's task menu. Set `VBS_BIN` if `vbs` is not " + "on `PATH`.\n"; + + for (const auto &[name, content] : + std::vector>{{"extension.toml", zed_manifest}, + {"tasks.json", zed_tasks}, + {"README.md", zed_readme}}) { + if (auto written = write_asset(output / name, content); !written) { + return std::unexpected{written.error()}; + } + } + return report; + } if (options.editor != IdeKind::VsCode) { return std::unexpected{Void::System::make_system_error( Void::System::SystemErrorCode::unsupported, - "editor plugin assets are currently generated for vscode only")}; + "editor plugin assets are generated for vscode and zed only")}; } for (const auto &[name, content] : diff --git a/tests/FullV1Tests.cpp b/tests/FullV1Tests.cpp index 2d825ea..9136cd8 100644 --- a/tests/FullV1Tests.cpp +++ b/tests/FullV1Tests.cpp @@ -1128,8 +1128,18 @@ VOID_TEST(FullV1Tests, ide_plugin_assets_export_vscode_extension) { auto zed_options = options; zed_options.editor = Editor::IdeKind::Zed; + zed_options.output_dir = tmp / "vbs-zed"; auto zed_report = Editor::generate_ide_plugin_assets(zed_options); - Void::Testing::expect(!zed_report.has_value()); + Void::Testing::require(zed_report.has_value()); + Void::Testing::expect_eq(zed_report->written_files.size(), std::size_t{3}); + Void::Testing::expect(std::filesystem::exists(zed_options.output_dir / "extension.toml")); + auto zed_tasks = Void::FileSystem::read_file(zed_options.output_dir / "tasks.json"); + Void::Testing::require(zed_tasks.has_value()); + auto zed_tasks_json = Void::Json::Strict::parse(*zed_tasks); + Void::Testing::require(zed_tasks_json.has_value()); + const auto *zed_array = std::get_if(&zed_tasks_json->value); + Void::Testing::require(zed_array != nullptr); + Void::Testing::expect_eq(zed_array->size(), std::size_t{6}); } // === Migration tooling: CMakeLists.txt -> build.cpp scaffold ===