-
Notifications
You must be signed in to change notification settings - Fork 234
Add more logging and internal documentation #1474
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
Conversation
src/PowerShellEditorServices/Services/PowerShellContext/PowerShellContextService.cs
Outdated
Show resolved
Hide resolved
src/PowerShellEditorServices.Hosting/Internal/EditorServicesRunner.cs
Outdated
Show resolved
Hide resolved
src/PowerShellEditorServices/Server/PsesServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
As opposed to `PowerShellEditorServices.Hosting`. Same namespace, different assembly.
169e227
to
6728a90
Compare
/// </summary> | ||
/// <remarks> | ||
/// The logical stack of the program is: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rjmholt Did I get this right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think that looks right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This was super useful (to me) to work through and document.
/// </summary> | ||
/// <remarks> | ||
/// The logical stack of the program is: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think that looks right
/// This is a strange class that is generally <c>null</c> or otherwise just has a single path | ||
/// set. It is eventually parsed one-by-one when setting up the PowerShell runspace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is used for configuring profile path values, which are set by the client. Different clients conceptually implement different hosts (so VSCode implements a different host to vim or IntelliJ), so they need different profile paths. This is how they configure that.
provider.GetService<OmniSharp.Extensions.LanguageServer.Protocol.Server.ILanguageServerFacade>(), | ||
hostStartupInfo)) | ||
.AddSingleton<TemplateService>() | ||
.AddSingleton<TemplateService>() // TODO: What's the difference between this and the TemplateHandler? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handlers handle requests from the LSP client, like ASP.NET controllers.
Services internally manage some conceptual area, and generally implement the business logic behind handlers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Helpful!
eb3769c
to
dab4e3c
Compare
Also change handled exceptions to warning instead of error.
dab4e3c
to
43f5e1b
Compare
Just writing up what I've learned and odd stuff I've spotted while reading through the code. Also added at least a bit more logging to help debug PowerShell/vscode-powershell#3306.