Skip to content

Fix incorrect version macro usage in MCP module - #1259

Merged
Arctis-Fireblight merged 1 commit into
Redot-Engine:masterfrom
Arctis-Fireblight:fix-GH1254
May 17, 2026
Merged

Arctis-Fireblight merged 1 commit into
Redot-Engine:masterfrom
Arctis-Fireblight:fix-GH1254

Conversation

@Arctis-Fireblight

@Arctis-Fireblight Arctis-Fireblight commented May 17, 2026 •

Copy link
Copy Markdown
Contributor

The module was using deprecated versions of the version macros, this caused compilation failure when built with the deprecated=no build option in Scons. Updated to use the proper version macros for Redot.

Fixes #1254

Summary by CodeRabbit

  • Bug Fixes
    • Corrected version information retrieval to ensure accurate major and minor version numbers are reported in project configuration responses.

Review Change Stack

The module was using deprecated versions of the version macros, this caused compilation failure when built with the `deprecated=no` build option in Scons. Updated to use the proper version macros for Redot.
@coderabbitai

coderabbitai Bot commented May 17, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9f6ab7d4-286d-4563-8f0c-3b7b98a80b43

📥 Commits

Reviewing files that changed from the base of the PR and between 789a8d7 and 4485ff7.

📒 Files selected for processing (1)
  • modules/mcp/mcp_tools.cpp

Walkthrough

This PR fixes a compile error in the MCP module where the tool_project_config method referenced undefined VERSION_MAJOR and VERSION_MINOR constants. The fix updates lines 705–706 to use the correct constants REDOT_VERSION_MAJOR and REDOT_VERSION_MINOR.

Changes

Version constant correction

Layer / File(s) Summary
Version constant correction in tool_project_config
modules/mcp/mcp_tools.cpp
The get_info response populates the version object's major and minor fields using REDOT_VERSION_MAJOR and REDOT_VERSION_MINOR instead of the undefined VERSION_MAJOR and VERSION_MINOR.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately describes the main change: fixing incorrect version macro usage in the MCP module, which is the primary focus of this pull request.
Linked Issues check ✅ Passed The changes address the core requirement from issue #1254: replacing deprecated VERSION_MAJOR/VERSION_MINOR macros with REDOT_VERSION_MAJOR/REDOT_VERSION_MINOR to fix compilation failures when using deprecated=no.
Out of Scope Changes check ✅ Passed The changes are narrowly scoped to fixing the version macro usage in MCPTools::tool_project_config, with only 2 lines changed and no alterations to exported/public entities.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Arctis-Fireblight
Arctis-Fireblight merged commit 91ea7c1 into Redot-Engine:master May 17, 2026
17 checks passed
@github-project-automation github-project-automation Bot moved this from Open to Done in Engine Overview May 17, 2026
@Arctis-Fireblight
Arctis-Fireblight deleted the fix-GH1254 branch May 17, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

MCPTools module compile error

1 participant