[PR #9472] [MERGED] Rename Microsoft.Terminal.TerminalControl to .Control; Split into dll & lib #27592

Open
opened 2026-01-31 09:22:51 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9472
Author: @zadjii-msft
Created: 3/12/2021
Status: Merged
Merged: 3/17/2021
Merged by: @undefined

Base: mainHead: dev/migrie/r/split-terminalcontrol-into-lib


📝 Commits (9)

  • 2402c59 Hokay, so that gets the control as a lib/dll split
  • 24765d7 its-all-coming-together.gif
  • 54f443b can I get a big woop woop from all my homies
  • 322d511 Fix the tests
  • 8f8cf59 Rename Microsoft.Terminal.TerminalControl to just Microsoft.Terminal.Control
  • eee5bee some dead code
  • 04d403c Change the GUID, project name
  • e8d06d7 Merge remote-tracking branch 'origin/main' into dev/migrie/r/split-terminalcontrol-into-lib
  • f8e969e oh! IT CAUGHT AN ISSUE! YAY!

📊 Changes

109 files changed (+514 additions, -378 deletions)

View changed files

📝 OpenConsole.sln (+58 -16)
📝 build/scripts/Test-WindowsTerminalPackage.ps1 (+1 -1)
📝 src/cascadia/LocalTests_SettingsModel/CommandTests.cpp (+1 -1)
📝 src/cascadia/LocalTests_SettingsModel/DeserializationTests.cpp (+1 -1)
📝 src/cascadia/LocalTests_SettingsModel/KeyBindingsTests.cpp (+1 -1)
📝 src/cascadia/LocalTests_SettingsModel/SerializationTests.cpp (+1 -1)
📝 src/cascadia/LocalTests_SettingsModel/SettingsModel.LocalTests.vcxproj (+1 -1)
📝 src/cascadia/LocalTests_SettingsModel/TerminalSettingsTests.cpp (+1 -1)
📝 src/cascadia/LocalTests_SettingsModel/TestUtils.h (+4 -4)
📝 src/cascadia/LocalTests_TerminalApp/FilteredCommandTests.cpp (+1 -1)
📝 src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp (+1 -1)
📝 src/cascadia/LocalTests_TerminalApp/TerminalApp.LocalTests.vcxproj (+1 -1)
📝 src/cascadia/LocalTests_TerminalApp/TestHostApp/TestHostApp.vcxproj (+1 -1)
📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+1 -1)
📝 src/cascadia/TerminalApp/AppKeyBindings.cpp (+1 -1)
📝 src/cascadia/TerminalApp/AppKeyBindings.h (+1 -1)
📝 src/cascadia/TerminalApp/AppKeyBindings.idl (+1 -1)
📝 src/cascadia/TerminalApp/AppLogic.cpp (+1 -1)
📝 src/cascadia/TerminalApp/CommandPalette.cpp (+1 -1)
📝 src/cascadia/TerminalApp/PaletteItem.cpp (+1 -1)

...and 80 more files

📄 Description

BE NOT AFRAID. I know that there's 107 files in this PR, but almost
all of it is just find/replacing TerminalControl with Control.

This is the start of the work to move TermControl into multiple pieces,
for #5000. The PR starts this work by:

  • Splits TerminalControl into separate lib and dll projects. We'll
    want control tests in the future, and for that, we'll need a lib.
  • Moves ICoreSettings back into the Microsoft.Terminal.Core
    namespace. We'll have other types in there soon too.
    • I could not tell you why this works suddenly. New VS versions? New
      cppwinrt version? Maybe we're just better at dealing with mdmerge
      bugs these days.
  • RENAMES Microsoft.Terminal.TerminalControl to
    Microsoft.Terminal.Control. This touches pretty much every file in
    the sln. Sorry about that (not sorry).

An upcoming PR will move much of the logic in TermControl into a new
ControlCore class that we'll add in Microsoft.Terminal.Core.
ControlCore will then be unittest-able in the
UnitTests_TerminalCore, which will help prevent regressions like #9455

Detailed Description of the Pull Request / Additional comments

You're really gonna want to clean the sln first, then merge this into
your branch, then rebuild. It's very likely that old winmds will get
left behind. If you see something like

Error    MDM2007    Cannot create type
Microsoft.Terminal.TerminalControl.KeyModifiers in read-only metadata
file Microsoft.Terminal.TerminalControl.

then that's what happened to you.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/9472 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 3/12/2021 **Status:** ✅ Merged **Merged:** 3/17/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/r/split-terminalcontrol-into-lib` --- ### 📝 Commits (9) - [`2402c59`](https://github.com/microsoft/terminal/commit/2402c59f3da0062e2e297ef269affb93539d697a) Hokay, so that gets the control as a lib/dll split - [`24765d7`](https://github.com/microsoft/terminal/commit/24765d708a437c2c952cd300a0715cc716975cdf) its-all-coming-together.gif - [`54f443b`](https://github.com/microsoft/terminal/commit/54f443b17f29b89b80ef5db0e83cfce1a27116f7) can I get a big woop woop from all my homies - [`322d511`](https://github.com/microsoft/terminal/commit/322d511034ae4cb73ba740db6e37714a97b5787f) Fix the tests - [`8f8cf59`](https://github.com/microsoft/terminal/commit/8f8cf5996eb216c53cf9bc9e8eeda34078ef59b2) Rename Microsoft.Terminal.TerminalControl to just Microsoft.Terminal.Control - [`eee5bee`](https://github.com/microsoft/terminal/commit/eee5beeaf37b215ed326679d95ab469c847950f1) some dead code - [`04d403c`](https://github.com/microsoft/terminal/commit/04d403ca97a09887a6bdf392fbba7ef82329a3b0) Change the GUID, project name - [`e8d06d7`](https://github.com/microsoft/terminal/commit/e8d06d7a74d30c5e4624fc6edc7a768983fd516a) Merge remote-tracking branch 'origin/main' into dev/migrie/r/split-terminalcontrol-into-lib - [`f8e969e`](https://github.com/microsoft/terminal/commit/f8e969e44b58bf0e4529255db15614a21108a604) oh! IT CAUGHT AN ISSUE! YAY! ### 📊 Changes **109 files changed** (+514 additions, -378 deletions) <details> <summary>View changed files</summary> 📝 `OpenConsole.sln` (+58 -16) 📝 `build/scripts/Test-WindowsTerminalPackage.ps1` (+1 -1) 📝 `src/cascadia/LocalTests_SettingsModel/CommandTests.cpp` (+1 -1) 📝 `src/cascadia/LocalTests_SettingsModel/DeserializationTests.cpp` (+1 -1) 📝 `src/cascadia/LocalTests_SettingsModel/KeyBindingsTests.cpp` (+1 -1) 📝 `src/cascadia/LocalTests_SettingsModel/SerializationTests.cpp` (+1 -1) 📝 `src/cascadia/LocalTests_SettingsModel/SettingsModel.LocalTests.vcxproj` (+1 -1) 📝 `src/cascadia/LocalTests_SettingsModel/TerminalSettingsTests.cpp` (+1 -1) 📝 `src/cascadia/LocalTests_SettingsModel/TestUtils.h` (+4 -4) 📝 `src/cascadia/LocalTests_TerminalApp/FilteredCommandTests.cpp` (+1 -1) 📝 `src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp` (+1 -1) 📝 `src/cascadia/LocalTests_TerminalApp/TerminalApp.LocalTests.vcxproj` (+1 -1) 📝 `src/cascadia/LocalTests_TerminalApp/TestHostApp/TestHostApp.vcxproj` (+1 -1) 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+1 -1) 📝 `src/cascadia/TerminalApp/AppKeyBindings.cpp` (+1 -1) 📝 `src/cascadia/TerminalApp/AppKeyBindings.h` (+1 -1) 📝 `src/cascadia/TerminalApp/AppKeyBindings.idl` (+1 -1) 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+1 -1) 📝 `src/cascadia/TerminalApp/CommandPalette.cpp` (+1 -1) 📝 `src/cascadia/TerminalApp/PaletteItem.cpp` (+1 -1) _...and 80 more files_ </details> ### 📄 Description **BE NOT AFRAID**. I know that there's 107 files in this PR, but almost all of it is just find/replacing `TerminalControl` with `Control`. This is the start of the work to move TermControl into multiple pieces, for #5000. The PR starts this work by: * Splits `TerminalControl` into separate lib and dll projects. We'll want control tests in the future, and for that, we'll need a lib. * Moves `ICoreSettings` back into the `Microsoft.Terminal.Core` namespace. We'll have other types in there soon too. * I could not tell you why this works suddenly. New VS versions? New cppwinrt version? Maybe we're just better at dealing with mdmerge bugs these days. * RENAMES `Microsoft.Terminal.TerminalControl` to `Microsoft.Terminal.Control`. This touches pretty much every file in the sln. Sorry about that (not sorry). An upcoming PR will move much of the logic in TermControl into a new `ControlCore` class that we'll add in `Microsoft.Terminal.Core`. `ControlCore` will then be unittest-able in the `UnitTests_TerminalCore`, which will help prevent regressions like #9455 ## Detailed Description of the Pull Request / Additional comments You're really gonna want to clean the sln first, then merge this into your branch, then rebuild. It's very likely that old winmds will get left behind. If you see something like ``` Error MDM2007 Cannot create type Microsoft.Terminal.TerminalControl.KeyModifiers in read-only metadata file Microsoft.Terminal.TerminalControl. ``` then that's what happened to you. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:22:51 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27592