Closes #5369: Cannot move Bind/PlatformKeyBinding to Input namespace (binary compat blocker)#5372
Closed
Copilot wants to merge 2 commits into
Closed
Closes #5369: Cannot move Bind/PlatformKeyBinding to Input namespace (binary compat blocker)#5372Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Copilot
AI
changed the title
[WIP] Fix namespace for Bind and PlatformKeyBinding
Fixes #3988. Move Bind and PlatformKeyBinding to Terminal.Gui.Input namespace
May 22, 2026
tig
approved these changes
May 22, 2026
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 89bfb9863b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
BDisp
approved these changes
May 22, 2026
Collaborator
|
Be aware of failing tests. |
Move only the Bind static class to namespace Terminal.Gui.Input to match its directory location and sibling types (Key, KeyBinding, KeyBindings, etc.). PlatformKeyBinding remains in namespace Terminal.Gui for now because the external Terminal.Gui.Editor NuGet package (v2.2.1-develop.133) has compiled IL referencing Terminal.Gui.PlatformKeyBinding. Moving it would cause TypeLoadException at runtime. PlatformKeyBinding will be moved in a follow-up once the Editor package is updated. Partial fix for #5369. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
eed955a to
1efc47d
Compare
…l.Gui.Bind The Terminal.Gui.Editor NuGet package has compiled IL references to both Terminal.Gui.Bind and Terminal.Gui.PlatformKeyBinding. Moving either type to Terminal.Gui.Input causes System.TypeLoadException at runtime in the NativeAot smoke test. Until the Editor package is recompiled against the new namespace, these types cannot be moved without breaking binary compatibility. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
8 tasks
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.
Summary
This PR was created to move
BindandPlatformKeyBindingfromnamespace Terminal.Guitonamespace Terminal.Gui.Inputper #5369.Finding: Binary Compatibility Blocker
Both types cannot be moved because the
Terminal.Gui.EditorNuGet package (all published versions through 2.2.5) has compiled IL metadata referencing:Terminal.Gui.BindTerminal.Gui.PlatformKeyBindingMoving either type to
Terminal.Gui.InputcausesSystem.TypeLoadExceptionat runtime in the NativeAot smoke test (which instantiates the Editor).Why standard workarounds don't apply:
[TypeForwardedTo]only works across assemblies, not for namespace changes within the same assemblyBind.All()returnsPlatformKeyBindinginstances that can't implicitly upcast to a derived shim typeResolution path:
gui-cs/Editorto referenceTerminal.Gui.Input.BindandTerminal.Gui.Input.PlatformKeyBindingCurrent state
The PR branch has no net code changes (the move was reverted after discovering the blocker). This PR documents the issue for #5369.
Recommendation: Close this PR and track the dependency update in #5369.