Skip to content

Plugin version compatibility check against CORE_VERSION#140

Merged
Nanle-code merged 1 commit into
Nanle-code:masterfrom
RemmyAcee:plugin-version
May 28, 2026
Merged

Plugin version compatibility check against CORE_VERSION#140
Nanle-code merged 1 commit into
Nanle-code:masterfrom
RemmyAcee:plugin-version

Conversation

@RemmyAcee
Copy link
Copy Markdown

Close: #118
Changes made
interface.rs

Added is_core_version_compatible(plugin_version: &str) -> bool — extracts the major version from both the plugin's declared core_version and the running CORE_VERSION, and returns true only when they match. This is the single source of truth for the compatibility rule.
Added unit tests covering: same version, different major (incompatible), same major different minor (compatible).
loader.rs

Replaced the silent println! warning with a hard anyhow::bail! that includes the plugin path, what version it was built for, what version is running, and a pointer to the docs.
The rustc ABI error message was also improved to include the plugin path and a concrete fix hint.
PluginManager::plugins now stores (Box, String) — the second field is the core_version the plugin declared, so it can be surfaced in the UI.
list_plugins() returns Vec<(&str, &str, &str)> — name, description, and built-for version.
plugin.rs

list now prints the running StarForge core version at the top.
load now prints "Built for StarForge X.Y.Z" under each loaded plugin, and also shows the core version header — so authors can immediately see whether a plugin's declared version matches what's running.
DEVELOPER_GUIDE.md

Added a new top-level section "Plugin Version Compatibility" (item 1 in the ToC) covering: how the check works, the compatibility rule table, example error messages, and a step-by-step guide for plugin authors (pin the version, use export_plugin!, rebuild on major bumps, match the toolchain).

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 26, 2026

@RemmyAcee Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RemmyAcee
Copy link
Copy Markdown
Author

Done, Close: #140

@Nanle-code Nanle-code merged commit 3583324 into Nanle-code:master May 28, 2026
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.

Issue 27: Plugin version compatibility check against CORE_VERSION

3 participants