Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactor tests #7702
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
base: main
Are you sure you want to change the base?
Refactor tests #7702
Changes from all commits
e3c34c2f8cf469File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
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 file appears to be unrelated scope creep in a "Refactor tests" PR — it only sets a personal Marquee
npm-statswidget config and is unrelated to test reliability. Consider dropping it from the change. (It is also missing a trailing newline.)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.
These
async () => { ... }lambdas contain noawait, producing CS1998 ("runs synchronously"). Harmless at runtime since the body executes on the UI thread afterSwitchToMainThreadAsync()inside the helper, but if the harness project setsTreatWarningsAsErrorsthe build breaks. Drop theasynckeyword (returnTask.CompletedTask) to silence the warning.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.
CreateTaskOnUIThreadreturns the raw.Taskfrom aJoinableTask, and the caller blocks witht.Wait(1000, cts.Token). Extracting and blocking onJoinableTask.Taskbypasses JTF's joinable-collection deadlock mitigation. It's safe today only becauseOpenProjectruns off the UI thread and the lambda bodies are synchronous; ifOpenProjectis ever invoked on the UI thread, the scheduled main-thread continuation can't run whileWait()blocks that thread, deadlocking until the 30s CTS fires. Prefer returning theJoinableTaskand driving the dialog-poll loop viaJoin()/JoinAsync.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.
The threading fix is incomplete: the new comment states "everything from the IVs* APIs need to run on the UI thread," but
IVsUIShell.GetDialogOwnerHwndhere — andvsProject.GetPropertyat ~1057 — still run on the calling background thread while their neighbors (GetSolutionInfo,EnumerateLoadedProjects,GetGuidOfProject,ReloadProject) were wrapped inRunOnUIThread. Off-threadIVs*calls can throwRPC_E_WRONG_THREADor silently COM-marshal. Either wrap these inRunOnUIThreadtoo, or narrow the "everything" wording to match reality.