refactor(gdk)!: rename GDK* classes to Xbox* to avoid collisions with console-capable Godot forks (v0.3.0) - #156
Merged
Conversation
…name
Renames every script-visible GDK type to the `Xbox*` prefix while leaving the
engine singleton registered under the name `GDK` by default. Forks already
written against the `GDK` global keep working; only type names change.
The ClassDB class name and the engine singleton name are now different
strings. Anything that class-checks the singleton must compare against
`"Xbox"`, not against the singleton name.
Renamed:
- 46 registered classes (`GDKUser` -> `XboxUser`, `GDKResult` -> `XboxResult`,
...), plus the abstract root `GDK` -> `Xbox` and `GDKXboxServices` ->
`XboxServices`.
- C++ sources `src/gdk_*.{cpp,h}` -> `src/xbox_*.{cpp,h}` with `XBOX_*_H`
include guards; internal namespaces `gdk_internal` -> `xbox_internal` and
`gdk_request_parsing` -> `xbox_request_parsing`.
- `doc_classes/GDK*.xml` -> `doc_classes/Xbox*.xml`.
- Bootstrap autoload `GDKBootstrap` -> `XboxBootstrap`.
- C# facade: namespace `GodotGdk` -> `GodotXbox`, static class `Gdk` ->
`Xbox`, and 47 `Gdk*.cs` -> `Xbox*.cs`.
- Packaging forwarder env vars `GDKPKG_*` -> `XBOXPKG_*`.
Deliberately unchanged: the `addons/godot_gdk` folder, `godot_gdk.gdextension`,
the `gdk_addon_init` entry symbol, `gdk/runtime/*` Project Settings, the
default singleton name `"GDK"`, `cmake/GDKDependencies.cmake`,
`GodotGdkCSharp.csproj`, `gdk_edition.h`, and prose referring to the Microsoft
GDK product.
No deprecated `GDK*` class aliases are provided.
GDScript:
var init: XboxResult = GDK.initialize()
if not init.success:
push_error(init.message)
return
var res: XboxResult = await GDK.users.add_default_user_async()
var user: XboxUser = res.data
print(user.gamertag)
GDK.runtime_error.connect(func(r: XboxResult) -> void: push_error(r.message))
C#:
using GodotXbox;
XboxResult init = Xbox.Initialize();
XboxResult res = await Xbox.Users.AddDefaultUserAsync();
XboxUser user = res.DataAs<XboxUser>();
GD.Print(user.Gamertag);
Validation (local, in-worktree):
- tools/check_gd_scripts_headless.ps1: pass
- tools/run_all_tests.ps1: Overall pass (gdk 292, playfab 81, gameinput 60,
C++ doctest, all bootstrap runners). Offline tier only -- live tests were
skipped (no -Live), and -AllowLiveWrites was not used.
- dotnet test tests/csharp/FacadeParity.Tests: 105/105 pass
- doc_classes <-> ClassDB parity verified: 46 registered, 46 documented, no
drift in either direction.
doc_classes, spec/gdext-gdk.md, docs/, samples, tests, and the path-scoped
agent instructions were all reconciled in this change.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rename
Calls out at the top of the README that every script-visible type moved to
the Xbox* prefix (and the C# facade to GodotXbox/Xbox), that no deprecated
GDK* aliases exist, and that the GDK singleton name is unchanged so
GDK.initialize() and friends keep working.
Also notes the consequence that the ClassDB class name (Xbox) and the
singleton name (GDK) are now different strings, so is_class("GDK") no
longer matches.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…name # Conflicts: # addons/godot_gdk/src/register_types.cpp # addons/godot_gdk/src/xbox_multiplayer_activity.cpp # addons/godot_gdk/src/xbox_presence.cpp # addons/godot_gdk/src/xbox_privacy.cpp # addons/godot_gdk/src/xbox_social.cpp # addons/godot_gdk/src/xbox_stats.cpp # addons/godot_gdk/src/xbox_user.cpp # addons/godot_gdk/src/xbox_user.h # addons/godot_gdk_csharp/Services/GdkUsers.cs # docs/gdk/api-reference.md # spec/gdext-gdk.md # tests/godot/gdk/tests/test_users.gd
Reconciles main's game-save quota threading fix (#145 / #152) and the XBOX-on-PC export delegation fix (#144 / #151) with the GDK* -> Xbox* class rename. Conflict resolutions: - xbox_game_save.{h,cpp}: took main's async XAsyncProvider-backed get_remaining_quota_async(), renamed to XboxGameSave/XboxResult/ XboxRuntime/XboxPendingSignal/XboxSignalXAsyncContext/XboxUser. The resurrected gdk_game_save.h was dropped. - XboxGameSave.cs: took main's Task<XboxResult> GetRemainingQuotaAsync(); the resurrected GdkGameSave.cs was dropped. - gdk_editor_plugin.gd / gdk_export_features_plugin.gd: kept main's new export-features plugin, renamed its preload consts to Xbox*. - README.md: kept both main's badges/tagline and the branch's breaking- change warning. - doc_classes/XboxGameSave.xml, docs/gdk/api-reference.md, spec/gdext-gdk.md, tests/godot/gdk/tests/test_game_save.gd: took main's updated Connected Storage / async-quota prose with Xbox* type names. Validation: check_gd_scripts_headless.ps1 clean; run_all_tests.ps1 overall pass (471 GUT tests, 0 failed; live tier skipped, no -Live/-AllowLiveWrites). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… version bump Release prep on top of the GDK* -> Xbox* rename. No addon behavior changes. - docs/gdk/migration-v0.3.md: full old -> new mapping for the 46 renamed classes, the C# facade (namespace GodotGdk -> GodotXbox, static Gdk -> Xbox), the GDKBootstrap -> XboxBootstrap autoload, and the GDKPKG_* -> XBOXPKG_* packaging env vars. Leads with the ClassDB-vs-singleton gotcha: the singleton is still named GDK while its class is now Xbox, so class checks must compare against "Xbox". - tools/migrate_gdk_to_xbox.ps1: codemod for consumer projects, with -WhatIf. Rewrites only the renamed API surface by explicit name list; a project's own Gdk-prefixed names need -RenameProjectGdkNames. Bare GDK is left alone (it is still the singleton) and genuinely ambiguous type positions and class checks are reported for manual review. All matching is case-sensitive so lowercase godot_gdk paths are never touched. - CHANGELOG.md: new, seeded with v0.1.0 / v0.2.0 and a v0.3.0 section led by the breaking rename. - Addon versions 0.1.0 / 0.1.0-dev -> 0.3.0 across the four source plugin.cfg files; the sample/ and tests/ mirrors are gitignored and regenerated by the CMake sync. Added <Version>0.3.0</Version> to both C# facade csproj files. - Fixed two stragglers the rename missed: a GDKResult reference in docs/gdk/api-reference.md and GDKExportPlatform in docs/gdk/editor-tools.md. - README and docs/README.md now link the migration guide. Validation (local, in-worktree, Godot 4.6.2-stable): - tools/check_gd_scripts_headless.ps1: pass - tools/run_all_tests.ps1: Overall pass (gdk 330, playfab 84, gameinput 60; 16983 asserts; C++ doctest; all bootstrap runners). Offline tier only. - tools/run_csharp_tests.ps1: 107/107 pass - tools/package_addons.ps1 -Configuration Both -Reconfigure: pass (154 files) - tools/export_samples.ps1: all four GDScript tracks export - dotnet build of all four C# tutorial projects: pass - doc_classes <-> ClassDB parity: 48 registered / 47 documented, identical to main's baseline; the undocumented one is the internal XboxPendingSignal. - Codemod verified by replaying it over main's pre-rename sample/ tree: 121 of 122 files byte-identical to the hand-renamed branch. The one difference is a private method named OnGdkRuntimeError, where Gdk is infixed rather than prefixed - out of scope for an automated codemod. Live tier not run here; see the PR body for the live-coverage decision. Godot 4.5.x and 4.7.1 legs are left to the CI PR gates (only 4.6.2 is installed locally). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b371b3be-8e04-4791-83c7-4ee613005e10
James Lenell (jameslen-atg)
requested review from
a team
and
a lite review from Copilot
August 17, 2026 21:15
James Lenell (jameslen-atg)
force-pushed
the
feature/xbox-class-rename
branch
from
August 17, 2026 21:18
91fd2be to
2bf8862
Compare
State the motivation for the GDK* -> Xbox* rename in the three places a consumer is likely to hit it first: the README breaking-change banner, the v0.3.0 CHANGELOG entry, and the migration guide. The rename exists so this addon can enable console support inside compatible Godot forks. Those forks supply the console platform layer and register their own types, and the GDK* prefix collided with names they already use. Godot registers extension classes in a single flat ClassDB namespace, so two providers exposing the same name cannot coexist in one project. The Xbox* prefix keeps this addon's script-visible types distinct so it can be dropped into such a fork instead of being blocked by a name conflict. Each location also notes that Godot itself is unchanged by this: engine console support comes from those forks, not from this repository, and within this repo the rename carries no runtime behavior change. The docs also state that a single binary covers both PC and console: there is no separate console compilation, build preset, or conditional define. godot_gdk.gdextension declares only the windows.*.x86_64 libraries, and a console-capable fork loads those same binaries. Docs-only change; no .gd files touched, so the parse gate does not apply. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b371b3be-8e04-4791-83c7-4ee613005e10
James Lenell (jameslen-atg)
force-pushed
the
feature/xbox-class-rename
branch
from
August 17, 2026 21:19
2bf8862 to
ecd5605
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
refactor(gdk)!: rename
GDK*classes toXbox*(v0.3.0)Warning
Breaking change. Every script-visible
GDK*type is renamed toXbox*. No deprecated aliases ship — this is a hard break.The engine singleton is still named
GDK.GDK.initialize()keeps working unchanged.Migration guide:
docs/gdk/migration-v0.3.mdAutomated codemod:
pwsh -File tools/migrate_gdk_to_xbox.ps1 -Path <your-project> -WhatIfThis revives the work from #143 (closed unmerged) on top of current
main, and adds the release deliverables that were missing from it: a migration guide, a codemod, a CHANGELOG, and a version bump to0.3.0.Why this rename
This rename exists to let the addon enable console support inside compatible Godot forks. Console-capable forks supply the console platform layer and register their own types, and the
GDK*prefix collided with names those forks already use. Godot registers extension classes in a single flatClassDBnamespace, so two providers exposing the same name cannot coexist in one project.Moving this addon's script-visible types to the
Xbox*prefix keeps them distinct, so the addon can be dropped into such a fork and light up console scenarios there rather than being blocked by a name conflict.A single binary covers both PC and console. There is no separate console compilation, build preset, or conditional define —
godot_gdk.gdextensiondeclares only thewindows.*.x86_64libraries, and a console-capable fork loads those same binaries. One build of the addon, both targets.Important
Godot itself is unchanged by this. The engine's console support comes from those forks, not from this repository. Within this repo the rename is a naming change only — no runtime behavior changed.
The one gotcha
The ClassDB class name and the engine singleton name are now different strings:
Only type references move. Anything that reflects on the class name by string needs updating.
Usage — GDScript
Note that only the type annotations changed — the
GDK.users/GDK.achievementsaccessors are untouched.Signal payloads and
is/as/extendspositions move the same way:Usage — C#
The C# binding is a matching
Gdk→Xboxprefix swap, and the namespace movesGodotGdk→GodotXbox. The assembly name and csproj (GodotGdkCSharp) are unchanged, so existing<ProjectReference>entries still resolve.Xboxis a static facade (Xbox.Users,Xbox.Achievements, …) — there is no.Instance.Deliberately NOT renamed
These are product/plumbing names, not script-visible types, and stay as-is:
GDKengine singleton, and theaddons/godot_gdkfolder +godot_gdk.gdextensiongdk/runtime/*andgdk/packaging/*Project Settings keysgdkexport feature tag,GDKPKG_*env vars,gdkpkgforwarderscmake/GDKDependencies.cmake,GDK_VERSION,gdk_edition.hGodotGdkCSharpassembly/csproj namePlayFab*andGameInput*types (out of scope for this release)Codemod
tools/migrate_gdk_to_xbox.ps1rewrites an explicit list of 48 GDScript API names and 54 C# API names. It does not touch a consumer's ownGdk-prefixed identifiers by default (opt in with-RenameProjectGdkNames), and it never rewrites a bareGDK(that's the singleton).It was validated by replaying it over
main's pre-renamesample/tree and diffing against this branch's hand-renamed version: 121 of 122 files came out byte-identical. The single remainder is a private method namedOnGdkRuntimeError(Gdkinfixed rather than prefixed), which is correctly out of scope for automation and is called out in the migration guide.Also in this PR
CHANGELOG.md— first changelog in the repo, seeded with v0.1.0 / v0.2.0 and this release0.1.0-dev/0.1.0→0.3.0across all fourplugin.cfgfiles;<Version>0.3.0</Version>added to both C# csproj filesGDKResultindocs/gdk/api-reference.md,GDKExportPlatformindocs/gdk/editor-tools.mdREADME.mdanddocs/README.mdValidation
All run locally against Godot 4.6.2-stable from this branch:
tools/check_gd_scripts_headless.ps1tools/run_all_tests.ps1gdk_unit_tests.exe)tools/run_csharp_tests.ps1tools/package_addons.ps1 -Configuration Both -Reconfiguretools/export_samples.ps1dotnet build× 4 C# tutorial projectsLive coverage
Live tier was run, with writes enabled, against sandbox PlayFab title
10D176:Every stage passed except the PlayFab Multiplayer orchestrator (46 / 61 scenarios). These failures are not caused by this PR:
tests/godot/mp_orchestrator/is byte-identical tomainon this branch (git diff public/main...HEAD -- tests/godot/mp_orchestratoris empty) and contains zeroGDK*/Xbox*type references.Version matrix
Only Godot 4.6.2 is installed on this machine, so the 4.5.x (
gut-4.5) and 4.7.x legs are deferred to the CI PR gates.Migration for consumers
docs/gdk/migration-v0.3.md.tools/migrate_gdk_to_xbox.ps1 -WhatIf, review, then apply.is_class("GDK")/get_class() == "GDK"string comparisons — those must become"Xbox".