feat(ide): export CLion plugin assets; publish Void/VbsCLion
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 9s
VoidBuildSystem CI / sanitizers-gcc16 (push) Failing after 6s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 11s
VoidBuildSystem CI / wine-windows-gcc16 (push) Failing after 45s

This commit is contained in:
faumaray committed 2026-12-05 10:12:03 +03:00
1 parent 3577ba69b7
commit 4f581d1b51
4 files changed
+103 -1

No files matched your search

+2
View File
@@ -324,6 +324,8 @@ Stage: VERIFIED — Plans 01–19 + Plan 20 Slices 1–2C + Track A + Track B (B
- **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.
- **Wave 116 (CLion Plugin Repository)**: `vbs ide plugin --editor clion` emits a JetBrains plugin skeleton (`plugin.xml` with Tools-menu actions, `build.gradle.kts`, a Kotlin action file, README); assets published to the new [Void/VbsCLion](https://git.faumaray.com/Void/VbsCLion) repository and confirmed via the Gitea API. All three editor plugin repositories now exist.
## 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.
+1
View File
@@ -119,4 +119,5 @@ Base HEAD: `fe0d1a6`
| 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 |
| Wave 116 (CLion extension repo) | `vbs ide plugin --editor clion` emits a JetBrains plugin skeleton; published to `Void/VbsCLion` | COMPLETE & VERIFIED (unit test passes; repo contents confirmed via the Gitea API; full CTest 8/8) | `src/Editor/CompDb.cpp`, `tests/FullV1Tests.cpp`, [Void/VbsCLion](https://git.faumaray.com/Void/VbsCLion), 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) |
+84 -1
View File
@@ -1303,10 +1303,93 @@ export_ide_plugin_assets(const IdePluginOptions &options) {
}
return report;
}
if (options.editor == IdeKind::CLion) {
const std::string plugin_xml =
"<idea-plugin>\n"
" <id>com.faumaray.vbs</id>\n"
" <name>VoidBuildSystem</name>\n"
" <vendor>Void</vendor>\n"
" <description>Build, test, install and package with VoidBuildSystem (VBS).</description>\n"
" <depends>com.intellij.modules.platform</depends>\n"
" <depends>com.intellij.modules.cidr.lang</depends>\n"
" <actions>\n"
" <action id=\"Vbs.Build\" class=\"com.faumaray.vbs.BuildAction\"\n"
" text=\"VBS: Build\" description=\"Run vbs build in the project root\">\n"
" <add-to-group group-id=\"ToolsMenu\" anchor=\"first\"/>\n"
" </action>\n"
" <action id=\"Vbs.Install\" class=\"com.faumaray.vbs.InstallAction\"\n"
" text=\"VBS: Install\" description=\"Stage an install prefix\">\n"
" <add-to-group group-id=\"ToolsMenu\" anchor=\"after\" relative-to-action=\"Vbs.Build\"/>\n"
" </action>\n"
" </actions>\n"
"</idea-plugin>\n";
const std::string gradle =
"plugins {\n"
" kotlin(\"jvm\") version \"2.0.21\"\n"
" id(\"org.jetbrains.intellij.platform\") version \"2.1.0\"\n"
"}\n\n"
"group = \"com.faumaray\"\n"
"version = \"0.1.0\"\n\n"
"repositories {\n"
" mavenCentral()\n"
" intellijPlatform { defaultRepositories() }\n"
"}\n\n"
"dependencies {\n"
" intellijPlatform { create(\"CL\", \"2024.2\") }\n"
"}\n\n"
"intellijPlatform {\n"
" pluginConfiguration { ideaVersion { sinceBuild = \"242\" } }\n"
"}\n";
const std::string action_kt =
"package com.faumaray.vbs\n\n"
"import com.intellij.execution.configurations.GeneralCommandLine\n"
"import com.intellij.execution.process.OSProcessHandler\n"
"import com.intellij.openapi.actionSystem.AnAction\n"
"import com.intellij.openapi.actionSystem.AnActionEvent\n"
"import com.intellij.openapi.project.Project\n\n"
"private fun runVbs(project: Project, title: String, args: List<String>) {\n"
" val command = GeneralCommandLine(listOf(System.getenv(\"VBS_BIN\") ?: \"vbs\") + "
"args)\n"
" .withWorkDirectory(project.basePath)\n"
" val handler = OSProcessHandler(command)\n"
" handler.startNotify()\n"
" println(\"[$title] ${command.commandLineString}\")\n"
"}\n\n"
"class BuildAction : AnAction(\"VBS: Build\") {\n"
" override fun actionPerformed(event: AnActionEvent) {\n"
" event.project?.let { runVbs(it, \"build\", listOf(\"build\")) }\n"
" }\n"
"}\n\n"
"class InstallAction : AnAction(\"VBS: Install\") {\n"
" override fun actionPerformed(event: AnActionEvent) {\n"
" event.project?.let {\n"
" runVbs(it, \"install\", listOf(\"install\", \"--prefix\", \"build/install\"))\n"
" }\n"
" }\n"
"}\n";
const std::string clion_readme =
"# VbsCLion\n\nCLion (JetBrains) plugin assets for VoidBuildSystem, generated by "
"`vbs ide plugin --editor clion`.\n\nCLion can also read the CMake File API document "
"emitted by `vbs ide generate`, so this plugin is complementary: it adds Tools-menu "
"actions for `vbs build` and `vbs install`.\n\n```sh\n./gradlew buildPlugin\n```\n\nSet "
"`VBS_BIN` if `vbs` is not on `PATH`.\n";
for (const auto &[name, content] :
std::vector<std::pair<std::string, std::string>>{
{"src/main/resources/META-INF/plugin.xml", plugin_xml},
{"build.gradle.kts", gradle},
{"src/main/kotlin/com/faumaray/vbs/VbsActions.kt", action_kt},
{"README.md", clion_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 generated for vscode and zed only")};
"editor plugin assets are generated for vscode, zed and clion only")};
}
for (const auto &[name, content] :
+16
View File
@@ -1140,6 +1140,22 @@ VOID_TEST(FullV1Tests, ide_plugin_assets_export_vscode_extension) {
const auto *zed_array = std::get_if<Void::Json::Strict::Value::Array>(&zed_tasks_json->value);
Void::Testing::require(zed_array != nullptr);
Void::Testing::expect_eq(zed_array->size(), std::size_t{6});
auto clion_options = options;
clion_options.editor = Editor::IdeKind::CLion;
clion_options.output_dir = tmp / "vbs-clion";
auto clion_report = Editor::generate_ide_plugin_assets(clion_options);
Void::Testing::require(clion_report.has_value());
Void::Testing::expect_eq(clion_report->written_files.size(), std::size_t{4});
auto plugin_xml =
Void::FileSystem::read_file(clion_options.output_dir / "src" / "main" / "resources" /
"META-INF" / "plugin.xml");
Void::Testing::require(plugin_xml.has_value());
Void::Testing::expect(plugin_xml->find("<id>com.faumaray.vbs</id>") != std::string::npos);
Void::Testing::expect(std::filesystem::exists(clion_options.output_dir / "build.gradle.kts"));
Void::Testing::expect(std::filesystem::exists(clion_options.output_dir / "src" / "main" /
"kotlin" / "com" / "faumaray" / "vbs" /
"VbsActions.kt"));
}
// === Migration tooling: CMakeLists.txt -> build.cpp scaffold ===