Skip to content

Name virtual-callback layers after user-facing I* virtuals - #1662

Merged
Bromeon merged 1 commit into
masterfrom
mtnc/callback-names
Jul 21, 2026
Merged

Name virtual-callback layers after user-facing I* virtuals#1662
Bromeon merged 1 commit into
masterfrom
mtnc/callback-names

Conversation

@Bromeon

@Bromeon Bromeon commented Jul 21, 2026

Copy link
Copy Markdown
Member

Panic messages still reported old names, e.g. on_get surfaced as MyClass::get_property(). And there was quite a big inconsistency on how the same thing was named, partly due to renames in #1555, partly due to 1 Rust function mapping to 2 Godot ones, partly because naming simply wasn't aligned at the time.

Now uses same terms across 7 layers:

  • handle_on_set (macro codegen)
  • Decls::on_set_impl (macro codegen)
  • shard builder with_on_set
  • ITraitImpl::user_set_fn field
  • set (extern "C" callback)
  • callback panic message
  • T::__godot_on_set capability trait method

The extern "C" callbacks now match their GDExtension slots exactly: set_property -> set, get_property -> get, on_notification -> notification.

@Bromeon Bromeon added c: ffi Low-level components and interaction with GDExtension API maintenance Internal change, not user-facing, developer QoL. Refactors, dep updates, etc. labels Jul 21, 2026
@Bromeon
Bromeon force-pushed the mtnc/callback-names branch from 0272e05 to e9c23dd Compare July 21, 2026 20:30
@GodotRust

Copy link
Copy Markdown

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-1662

@Bromeon
Bromeon force-pushed the mtnc/callback-names branch from e9c23dd to d59dd51 Compare July 21, 2026 20:39
Panic messages still reported old names, e.g. `on_get` surfaced as `MyClass::get_property()`.

Now uses same terms across 7 layers:
* `handle_on_set` (macro codegen)
* `Decls::on_set_impl` (macro codegen)
* shard builder `with_on_set`
* `ITraitImpl::user_set_fn` field
* `set` (extern "C" callback)
* callback panic message
* `T::__godot_on_set` capability trait method

The `extern "C"` callbacks now match their GDExtension slots exactly:
`set_property` -> `set`, `get_property` -> `get`, `on_notification` -> `notification`.
@Bromeon
Bromeon force-pushed the mtnc/callback-names branch from d59dd51 to fec190a Compare July 21, 2026 21:24
@Bromeon
Bromeon added this pull request to the merge queue Jul 21, 2026
Merged via the queue into master with commit 107a87e Jul 21, 2026
17 checks passed
@Bromeon
Bromeon deleted the mtnc/callback-names branch July 21, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: ffi Low-level components and interaction with GDExtension API maintenance Internal change, not user-facing, developer QoL. Refactors, dep updates, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants