-
Notifications
You must be signed in to change notification settings - Fork 999
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
Shorten long lines in VB REVIEW (3rd) AFTER #12489 DRAFT #12118
base: main
Are you sure you want to change the base?
Shorten long lines in VB REVIEW (3rd) AFTER #12489 DRAFT #12118
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12118 +/- ##
===================================================
+ Coverage 76.18249% 76.38918% +0.20668%
===================================================
Files 3194 3202 +8
Lines 640365 644086 +3721
Branches 47239 47525 +286
===================================================
+ Hits 487846 492012 +4166
+ Misses 148983 148539 -444
+ Partials 3536 3535 -1
Flags with carried forward coverage won't be shown. Click here to find out more. |
...otnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/ApplicationEvents.vb
Show resolved
Hide resolved
...Microsoft.VisualBasic.Forms/src/Microsoft/VisualBasic/Devices/Network/NetworkAvailability.vb
Outdated
Show resolved
Hide resolved
...Microsoft.VisualBasic.Forms/src/Microsoft/VisualBasic/Devices/Network/NetworkAvailability.vb
Outdated
Show resolved
Hide resolved
src/Microsoft.VisualBasic.Forms/src/Microsoft/VisualBasic/Devices/Network/NetworkDownload.vb
Outdated
Show resolved
Hide resolved
src/Microsoft.VisualBasic.Forms/src/Microsoft/VisualBasic/Devices/Network/NetworkUpload.vb
Outdated
Show resolved
Hide resolved
src/Microsoft.VisualBasic.Forms/src/Microsoft/VisualBasic/MyServices/ClipboardProxy.vb
Outdated
Show resolved
Hide resolved
src/Microsoft.VisualBasic.Forms/src/Microsoft/VisualBasic/MyServices/FileSystemProxy.vb
Outdated
Show resolved
Hide resolved
src/Microsoft.VisualBasic.Forms/src/Microsoft/VisualBasic/MyServices/Internal/HttpClientCopy.vb
Show resolved
Hide resolved
src/Microsoft.VisualBasic.Forms/src/Microsoft/VisualBasic/MyServices/Internal/HttpClientCopy.vb
Outdated
Show resolved
Hide resolved
src/Microsoft.VisualBasic.Forms/tests/UnitTests/System/Windows/Forms/NetworkDownloadTests.vb
Outdated
Show resolved
Hide resolved
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.
@paul1956 - is this PR ready for a review, or are you still waiting to merge previous PRs? I would suggest factoring out parts of this PR that are not based on the previous changes and are dedicated only to comments and long code lines.
...ft.VisualBasic.Forms/src/Microsoft/VisualBasic/ApplicationServices/ConsoleApplicationBase.vb
Outdated
Show resolved
Hide resolved
src/Microsoft.VisualBasic.Forms/src/Microsoft/VisualBasic/Devices/Clock.vb
Outdated
Show resolved
Hide resolved
|
||
Imports NetInfoAlias = System.Net.NetworkInformation | ||
|
||
Namespace Microsoft.VisualBasic.Devices |
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.
Why did you move this file, the namespace matches Microsoft\VisualBasic\Devices
path. And this directory contains only 11 items, so it is manageable. I don't see a reason for this move.
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.
Previous Feedback to move classes into their own file
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.
Into their own file, not into a new folder.
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.
@Tanya-Solyanik The entire focus of all the VB PR's was to fix the networking code. Putting it all together in a directory just make it simpler for me. Originally it was all in 1 file. I have moved them back.
src/Microsoft.VisualBasic.Forms/src/Microsoft/VisualBasic/Helpers/SafeNativeMethods.vb
Outdated
Show resolved
Hide resolved
Imports System.Threading | ||
Imports Microsoft.VisualBasic.Devices.NetworkUtilities | ||
|
||
Namespace Microsoft.VisualBasic.MyServices.Internal |
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.
Could you please pull out this refactoring from this PR into a separate one? It will be easier to review.
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.
@Tanya-Solyanik It is, this PR should be reviewed in order then only 6 files core to the issue are changed, httpClientCopy is the whole purpose of this PR. I have changed everything to DRAFT except 1.
Sorry my lack of knowledge of PR process has caused you to do large reviews and almost null reviews.
Everything I have done is to get to this PR which has the critical fix as webClient is going to be made obsolete.
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.
Did you factor out "critical fix as webClient"?
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.
Did you factor out "critical fix as webClient"?
@Tanya-Solyanik the Critical fix was to replace WebClient with HttpClient for both network upload and download.
WebCient was split into two parts the Upload part is currently unchanged because I have no acceptable way to test without 3rd party code/server (my prototype used public servers to test existing code). I created my own download server in the repo so I can test download and replaced WebClient with HttpClient for download only.
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.
We shouldn't test WebClient or HttpClient because we don't own them.
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.
@Tanya-Solyanik the replacement needs to return the identical error codes to not be a breaking change. I am not testing WebClient or HttpClient by themselves just as they are used in NetworkDownload.
|
||
Imports System.Runtime.CompilerServices | ||
|
||
<Assembly: InternalsVisibleTo("Microsoft.VisualBasic.Forms.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")> |
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.
Is this coming from another PR?
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.
Yes one being discussed by @LeafShi1 and @KlausLoeffelmann
@@ -109,7 +109,8 @@ public string LayoutName | |||
} | |||
|
|||
/// <summary> | |||
/// Returns the <see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getkeyboardlayoutnamew"> | |||
/// Returns the | |||
/// <see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getkeyboardlayoutnamew"> | |||
/// keyboard layout identifier</see> of the current input language. |
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 this better follows the pattern of the other see tags in the source code:
/// <summary>
/// Returns the
/// <see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getkeyboardlayoutnamew">
/// keyboard layout identifier
/// </see>
/// of the current input language.
/// </summary>
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.
@ricardobossan good feedback but why are you reviewing a draft PR? All the draft PRs depend on the previous ones. So there would be a tremendous amounts of duplicate work. There are 3 that need to merge before this one.
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.
Because there were comments being made already. But I'll wait out next time.
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.
@ricardobossan sorry that was my fault I did not understand the review process and only learned about Draft Friday.
There are several more I did without Draft that could be reviewed but I will need a little time at apply this comment to them.
Thanks for your understanding.
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.
@ricardobossan opened a new PR #12151 based on main to just deal with this issue, there are just a few places where it does not follow the pattern. I will address expected merge conflicts in future PR's where they occur.
The server will now write issues as text to a public property ServerFault. The tests can then verify that there were no protocal issues except here expected.
…Review-after-FixIssue#9807-3rd
Fix error in Progress Progress Dialog Labels Use Enum to define testing file sizes Get FileSize and URL from WebListner to allow 1 source of truth This will also allow easier testing with real file server
Allow skipping of tests that need server to support Unauthorized Access based on user reedentials. Make logic for file Upload detection not dependant on file name to support other Servers in testing.
Add support for real File Server Testing
…ceptions in existing code.
Improve code coverage for upload tests Support more real File Server options
Fixes VB Long lines
Proposed changes
Customer Impact
Regression?
Risk
-Minimal No code changes except formatting
Microsoft Reviewers: Open in CodeFlow