-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
Fix (some) build warnings #1314
Conversation
CS1572 CS1573 CS0168 CS8073 CA2200 VSTHRD110 VSTHRD200 VSTHRD105 SYSLIB0013 CS8524
While it reflects reality it may prevent some launches on systems that are happily using Flow without hitting specific APIs.
Before: 400 warnings |
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.
It's a non-trivial refactor. Thank you so much for taking time to do it!
@@ -127,7 +127,7 @@ public void CreateUninstallerEntry() | |||
|
|||
using (var portabilityUpdater = NewUpdateManager()) | |||
{ | |||
portabilityUpdater.CreateUninstallerRegistryEntry(); | |||
_ = portabilityUpdater.CreateUninstallerRegistryEntry(); |
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.
I think we should make CreateUninstallerEntry either async Task
or async void
. I am curious what this method is doing.
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.
async void
needs to be avoided, in fact I want to clean up some of those in the next step if I get a chance.
For this one, it just so happens that Squirrel's function is async, but we're not bothering to call it asynchronously. In fact, nothing in IPortable.cs
seems to be async
.
I'm happy to create a follow up task for this, but changing the signature of the interface seems like a more invasive task than just removing the warning from the existing flow.
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.
if we didn't await the task, any exception thrown won't be caught. I wonder whether that may create some issue (previously I have been deeply hurt by this suppression).
@nachmore One of the build test has failed. Would you please take a look on what's causing that? |
I'm looking at this now - it's due to a change in behaviour handling |
See comment inline re:JSON null
Looking at build mismatch... |
Intellisense for the non-win
I'm going to pause the warnings elimination work as this PR is large enough already. So when folks have time, can you please review these changes, I'll address comments and then continue in a separate PR. Thanks! |
@@ -540,7 +539,7 @@ internal string LogoUriFromManifest(AppxPackageHelper.IAppxManifestApplication a | |||
if (logoKeyFromVersion.ContainsKey(Package.Version)) | |||
{ | |||
var key = logoKeyFromVersion[Package.Version]; | |||
app.GetStringValue(key, out string logoUri); | |||
_ = app.GetStringValue(key, out string logoUri); |
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.
same as above
Down to 118. Could I please get a review of these changes? I created follow up tasks for some of the fundamental comments that were uncovered during this PR (but not directly related to these changes). |
Sure, just give me sometime. |
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.
Thank you so much for making such a huge change. There's a small pieces that worth taking a look before merging. After addressing them, I think we shall be able to merge.
Let's wrap this with Task.Run
and make the method Async
Main.StartProcess(Process.Start, info); |
Sorry if it sounded like I was rushing you - I am blown away by the speed of CRs in this project, it's incredible! Thank you for the super quick support... |
Na you are good. It's always easier for me to review than you writing the code, and it will be super nice to hear feedback quickly when contributing. |
I think this may not be useful and we are ready to merge. |
Primarily fixing a bunch of:
Not a comprehensive fix, but removes a large number of warnings.