-
Notifications
You must be signed in to change notification settings - Fork 9k
Description
Right now we have one big dll that is declaring both cppwinrt types (e.g. AppKeyBindings, App) and pure c++ types (Tab, Profile, etc.).
If one were to try and create a unittesting project for the TerminalApp project, you unfortunately would be unable to do this, because many of the types are only linked into this TerminalApp.dll. For pure cppwinrt types, this isn't that big of a deal, because instantiating the types just does cppwinrt magic to activate them. However, for pure cpp classes, we can't actually link them. This means we can't test things like json parsing, Pane recursing, settings synthesis.
So we'll have to pull all the types that aren't winrt types out into their own lib, and have the TerminalApp project consume that lib.
I'm not worried about TermControl and TermConnection so much, since those are only using cppwinrt types at the moment. Should they get more elaborate, then it might be necessary to do a similar refactoring.
Worries:
- Does this mean we're going to have now two
pch.pchfiles for the TerminalApp, one for the lib and one for the dll? could we avoid that? See Share PCH files #946. - The lib seems to need to include
winrt/coroutine.h(and any other cppwinrt headers that components might need). Those are generated files. Right now they're generated by the TerminalApp(dll) build, but theoretically they'll need to be created before that, because the lib will theoretically be built before the dll. This may mean that the lib needs to have some sort of cppwinrt tooling turned on, but I don't know what quite yet.