Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Microsoft.Terminal.Remoting.dll #8607

Merged
22 commits merged into from
Jan 7, 2021
Merged

Add Microsoft.Terminal.Remoting.dll #8607

22 commits merged into from
Jan 7, 2021

Conversation

zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented Dec 17, 2020

Adds a Microsoft.Terminal.Remoting.dll to our solution. This DLL will
be responsible for all the Monarch/Peasant work that's been described in
#7240 & #8135.

This PR does not implement the Monarch/Peasant architecture in any
significant way. The goal of this PR is to just to establish the project
layout, and the most basic connections. This should make reviewing the
actual meat of the implementation (in a later PR) easier. It will also
give us the opportunity to include some of the basic weird things we're
doing (with CoRegisterClass) in the Terminal now, and get them
selfhosted, before building on them too much.

This PR does have windows registering the Monarch class with COM. When
windows are created, they'll as the Monarch if they should create a new
window or not. In this PR, the Monarch will always reply "yes, please
make a new window".

Similar to other projects in our solution, we're adding 3 projects here:

  • Microsoft.Terminal.Remoting.lib: the actual implementation, as a
    static lib.
  • Microsoft.Terminal.Remoting.dll: The implementation linked as a DLL,
    for use in WindowsTerminal.exe.
  • Remoting.UnitTests.dll: A unit test dll that links with the static
    lib.

There are plenty of TODOs scattered about the code. Clearly, most of
this isn't implemented yet, but I do have more WIP branches. I'm using
projects/5 as my
notation for TODOs that are too small for an issue, but are part of the
whole Process Model 2.0 work.

References

PR Checklist

  • Closes nothing, this is just infrastructure
  • I work here
  • Tests added/passed
  • [n/a] Requires documentation to be updated

Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marking req changes so I can see what changed since I publish these. They're not super pressing comments, though.

src/cascadia/Remoting/CommandlineArgs.cpp Show resolved Hide resolved
src/cascadia/Remoting/WindowManager.cpp Outdated Show resolved Hide resolved
src/cascadia/Remoting/WindowManager.h Show resolved Hide resolved
src/cascadia/WindowsTerminal/AppHost.cpp Outdated Show resolved Hide resolved
tools/tests.xml Outdated Show resolved Hide resolved
@ghost ghost added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Dec 17, 2020
@zadjii-msft
Copy link
Member Author

@DHowett you and I discussed being worried about peasants crashing after their original monarch is closed. Turns out, we don't need to worry about that in this PR! The monarch is only ever talked to once, at startup. After that, the window totally behaves as if business as usual.

Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues with the implementation. Really you're just missing a few copyright headers haha

_root->ProcessStartupActions(actions, false);
}

return result; // TODO:MG does a return value make sense
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you're not using it for now, so I guess don't return a value and change it later if/when we need it?

src/cascadia/Remoting/WindowManager.cpp Outdated Show resolved Hide resolved
src/cascadia/Remoting/WindowManager.cpp Show resolved Hide resolved
src/cascadia/Remoting/WindowManager.cpp Outdated Show resolved Hide resolved
src/cascadia/Remoting/WindowManager.cpp Outdated Show resolved Hide resolved
src/cascadia/Remoting/MonarchFactory.h Outdated Show resolved Hide resolved
src/cascadia/Remoting/Monarch.idl Show resolved Hide resolved
src/cascadia/Remoting/Monarch.h Show resolved Hide resolved
src/cascadia/Remoting/Monarch.cpp Show resolved Hide resolved
src/cascadia/Remoting/Monarch.cpp Outdated Show resolved Hide resolved
@DHowett
Copy link
Member

DHowett commented Jan 3, 2021

Is the new project audit-enabled? Should it be?

@zadjii-msft
Copy link
Member Author

Is the new project audit-enabled? Should it be?

Added audit to it in the last push ✔️

@zadjii-msft zadjii-msft removed their assignment Jan 5, 2021
Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moderately worried about the header things, but you can merge it if you plan to address it better later.

src/cascadia/Remoting/MonarchFactory.h Outdated Show resolved Hide resolved
@DHowett DHowett changed the title Adds Microsoft.Terminal.Remoting.dll Add Microsoft.Terminal.Remoting.dll Jan 6, 2021
@zadjii-msft zadjii-msft added Area-Build Issues pertaining to the build system, CI, infrastructure, meta AutoMerge Marked for automatic merge by the bot when requirements are met Product-Terminal The new Windows Terminal. labels Jan 7, 2021
@ghost
Copy link

ghost commented Jan 7, 2021

Hello @zadjii-msft!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@zadjii-msft
Copy link
Member Author

@msftbot don't merge this PR until 9pm

@ghost
Copy link

ghost commented Jan 7, 2021

Hello @zadjii-msft!

I think you told me that you want to delay the approval for a certain amount of time, but I am not confident that I have understood you correctly.

Please try rephrasing your instruction to me.

@zadjii-msft
Copy link
Member Author

@msftbot wait 4 hours to merge this PR

@ghost
Copy link

ghost commented Jan 7, 2021

Hello @zadjii-msft!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I won't merge this pull request until after the UTC date Fri, 08 Jan 2021 01:27:12 GMT, which is in 4 hours

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

@zadjii-msft
Copy link
Member Author

@msftbot forget everything I just told you

@ghost
Copy link

ghost commented Jan 7, 2021

Hello @zadjii-msft!

Because you've told me to reset the custom auto-merge settings, I'll use the configured settings for this repository when I'm merging this pull request.

@ghost ghost merged commit 7d503a4 into main Jan 7, 2021
@ghost ghost deleted the dev/migrie/f/remoting.dll branch January 7, 2021 22:59
@ghost
Copy link

ghost commented Jan 28, 2021

🎉Windows Terminal Preview v1.6.10272.0 has been released which incorporates this pull request.:tada:

Handy links:

mpela81 pushed a commit to mpela81/terminal that referenced this pull request Jan 28, 2021
Adds a `Microsoft.Terminal.Remoting.dll` to our solution. This DLL will
be responsible for all the Monarch/Peasant work that's been described in
microsoft#7240 & microsoft#8135. 

This PR does _not_ implement the Monarch/Peasant architecture in any
significant way. The goal of this PR is to just to establish the project
layout, and the most basic connections. This should make reviewing the
actual meat of the implementation (in a later PR) easier. It will also
give us the opportunity to include some of the basic weird things we're
doing (with `CoRegisterClass`) in the Terminal _now_, and get them
selfhosted, before building on them too much.

This PR does have windows registering the `Monarch` class with COM. When
windows are created, they'll as the Monarch if they should create a new
window or not. In this PR, the Monarch will always reply "yes, please
make a new window".

Similar to other projects in our solution, we're adding 3 projects here:
* `Microsoft.Terminal.Remoting.lib`: the actual implementation, as a
  static lib.
* `Microsoft.Terminal.Remoting.dll`: The implementation linked as a DLL,
  for use in `WindowsTerminal.exe`.
* `Remoting.UnitTests.dll`: A unit test dll that links with the static
  lib. 

There are plenty of TODOs scattered about the code. Clearly, most of
this isn't implemented yet, but I do have more WIP branches. I'm using
[`projects/5`](https://github.com/microsoft/terminal/projects/5) as my
notation for TODOs that are too small for an issue, but are part of the
whole Process Model 2.0 work.

## References

* microsoft#5000 - this is the process model megathread
* microsoft#7240 - The process model 2.0 spec.
* microsoft#8135 - the window management spec. (please review me, I have 0/3
  signoffs even after the discussion we had 😢)
* microsoft#8171 - the Monarch/peasant sample. (please review me, I have 1/2)

## PR Checklist
* [x] Closes nothing, this is just infrastructure
* [x] I work here
* [x] Tests added/passed
* [n/a] Requires documentation to be updated
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Build Issues pertaining to the build system, CI, infrastructure, meta AutoMerge Marked for automatic merge by the bot when requirements are met Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants