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

Remove ProcessUtil and bump Gapotchenko.FX version #891

Merged
merged 3 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Blish HUD/Blish HUD.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
<PackageReference Include="DynamicLanguageRuntime" Version="1.3.2" PrivateAssets="all" />
<PackageReference Include="EntryPoint" Version="1.3.0" PrivateAssets="all" />
<PackageReference Include="Flurl.Http" Version="2.4.2" PrivateAssets="all" />
<PackageReference Include="Gapotchenko.FX.Diagnostics.Process" Version="2021.1.5" PrivateAssets="all" />
<PackageReference Include="Gapotchenko.FX.Diagnostics.Process" Version="2022.2.7" PrivateAssets="all" />
<PackageReference Include="Gw2Sharp" Version="1.7.4" />
<PackageReference Include="Humanizer.Core.de" Version="2.6.2" PrivateAssets="all" />
<PackageReference Include="Humanizer.Core.es" Version="2.6.2" PrivateAssets="all" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ private void HandleProcessUpdate(Process newProcess) {
}

try {
this.CommandLine = newProcess.GetCommandLine();
this.CommandLine = newProcess.ReadArguments();
} catch (Win32Exception e) {
Copy link
Member

Choose a reason for hiding this comment

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

I am curious about what exception gets thrown here if ReadArguments() fails. I'll review the lib to double-check.

Copy link
Member

@dlamkins dlamkins Jul 4, 2023

Choose a reason for hiding this comment

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

Yeah, reviewing the source for Gapotchenko.FX.Diagnostics.Process it looks like there are a couple of possible outcomes. All are ultimately probably equally unrecoverable as far as I can tell. Could we change the catch to just catch on Exception and slightly revise the logger line message?

this.CommandLine = string.Empty;
Logger.Warn(e, "A Win32Exception was encountered while trying to retrieve the process command line.");
Expand Down
158 changes: 0 additions & 158 deletions Blish HUD/_Utils/ProcessUtil.cs

This file was deleted.