Skip to content

Sync with Redot 26.3-stable - #39

Merged
Arctis-Fireblight merged 2 commits into
Redot-Engine:masterfrom
Arctis-Fireblight:sync-redot-26.3-stable
Oct 29, 2026
Merged

Arctis-Fireblight merged 2 commits into
Redot-Engine:masterfrom
Arctis-Fireblight:sync-redot-26.3-stable

Conversation

@Arctis-Fireblight

@Arctis-Fireblight Arctis-Fireblight commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Regenerate the GDExtension API and interface header from the official redot-26.3-stable engine tag (85e5203945af15755dd2f66cb6fdf7545fd88c0b).

Align Variant types and cleanup with the new Struct type. Initialize the generated Struct bindings without requesting unsupported Variant conversion functions or internal pointer getters. Add integration coverage for native Struct construction, script struct fields, and Variant reference cleanup.

Validated on Linux x86_64 with full SCons debug and release builds, CMake debug and release builds using the CI test profile, all 129 integration assertions for each build, and all pre-commit hooks at the manual stage.

Summary by CodeRabbit

  • New Features
    • Added support for handling GDScript structs as Variants, including passing structs, reading named values, and copying or clearing struct values.
    • Structs containing object references are handled with appropriate reference cleanup. Passing null or a non-struct value can be checked safely.

Regenerate the GDExtension API and interface header from the official
redot-26.3-stable engine tag (85e5203945af15755dd2f66cb6fdf7545fd88c0b).

Align Variant types and cleanup with the new Struct type. Initialize the
generated Struct bindings without requesting unsupported Variant conversion
functions or internal pointer getters. Add integration coverage for native
Struct construction, script struct fields, and Variant reference cleanup.

Validated on Linux x86_64 with full SCons debug and release builds, CMake
debug and release builds using the CI test profile, all 129 integration
assertions for each build, and all pre-commit hooks at the manual stage.
@Arctis-Fireblight Arctis-Fireblight self-assigned this Oct 29, 2026
@Arctis-Fireblight Arctis-Fireblight added topic:gdextension This relates to the new Godot 4 extension implementation sync:redot labels Oct 29, 2026
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6a537b2b-f3bf-435b-af54-ff37827e1101
Commits

Reviewing files that changed from the base of the PR and between 2f70af2 and 39972a3.

Files selected for processing: 3
  • .github/workflows/ci-cmake.yml
  • .github/workflows/ci-scons.yml
  • .github/workflows/static_checks.yml

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4f010542-9490-40cd-9f85-11880f730639
Commits

Reviewing files that changed from the base of the PR and between 598ec78 and 2f70af2.

Files selected for processing: 10
  • binding_generator.py
  • gdextension/extension_api.json
  • gdextension/gdextension_interface.h
  • include/godot_cpp/variant/variant.hpp
  • include/godot_cpp/variant/variant_internal.hpp
  • src/variant/variant.cpp
  • src/variant/variant_internal.cpp
  • test/project/main.gd
  • test/src/example.cpp
  • test/src/example.h

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The change adds STRUCT to the GDExtension and C++ variant type enums. It adjusts generated bindings and runtime binding initialization for Struct, includes Struct in variant clearing, and adds GDScript and C++ tests for struct values, copying, clearing, and null input.

Changes: Struct Variant Support

Layer / File(s) Summary
Struct type and binding contract
gdextension/gdextension_interface.h, include/godot_cpp/variant/variant.hpp, binding_generator.py
The variant enums gain a STRUCT value. Generated Struct bindings omit the Variant-to-Struct constructor and its initializer.
Runtime Struct handling
include/godot_cpp/variant/variant_internal.hpp, src/variant/variant.cpp, src/variant/variant_internal.cpp
Runtime binding setup skips Struct conversion and pointer-getter lookups, initializes Struct bindings separately, and includes Struct in Variant clearing.
Struct Variant tests
test/src/example.h, test/src/example.cpp, test/project/main.gd
The tests pass populated and null Struct values to the bound C++ method. They check enum values, named-value access, clearing, empty-struct copying, and reference counts.

Priority: Pending latest changes

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant GDScript
  participant Example
  participant Variant
  GDScript->>Example: test_variant_struct(TestStruct)
  Example->>Variant: inspect STRUCT and read named value
  Variant-->>Example: return value 42
  Example->>Variant: clear copied Variant
  Variant-->>Example: report type NIL
  Example-->>GDScript: return true
  GDScript->>Example: test_variant_struct(null)
  Example-->>GDScript: return false
Loading

Possibly related PRs

  • Redot-Engine/redot-cpp#38: Updates the same generated extension API and GDExtension interface for the preceding Redot stable release.
Merge Risk: Minimal · previous review 2f70a

No actionable merge-blocking risk was identified in the reviewed change.

Pre-merge checks: Passed 4 · Failed 1

Failed 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%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed 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 concisely describes the primary change: syncing with the Redot 26.3-stable engine version. The changes implement this sync through API updates and Struct support.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 9 functions across 8 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@Arctis-Fireblight
Arctis-Fireblight merged commit ef6e110 into Redot-Engine:master Oct 29, 2026
16 checks passed
@Arctis-Fireblight
Arctis-Fireblight deleted the sync-redot-26.3-stable branch October 29, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sync:redot topic:gdextension This relates to the new Godot 4 extension implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant