-
Notifications
You must be signed in to change notification settings - Fork 237
Send Pester describe line and info whether Pester 4.6.0 is installed to PowerShell.RunPesterTests command #856
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
Changes from 15 commits
f26755f
a034574
c978a6f
725f643
62b101b
b6b4b4c
dbd42b5
61f62f5
ba32b20
565f2f8
32c69aa
69e7260
e5bddd0
39290a2
7245bd6
4ec3b3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
@@ -50,7 +49,7 @@ public ReferencesCodeLensProvider(EditorSession editorSession) | |
/// </summary> | ||
/// <param name="scriptFile">The PowerShell script file to get code lenses for.</param> | ||
/// <returns>An array of CodeLenses describing all functions in the given script file.</returns> | ||
public CodeLens[] ProvideCodeLenses(ScriptFile scriptFile) | ||
public async Task<CodeLens[]> ProvideCodeLenses(ScriptFile scriptFile) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You made this function There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had to change it here as well due to the signature change in the interface. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting! Typically the compiler yells if you have an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, it emits a warning though that this function won't run async as expected There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could changed the method to return: return await Task.FromResult(acc.ToArray()); to make it happy I think. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is a good idea because you might as well just suppress the warning. The compiler is happy, it is just kind to let us know that this other implementation will actually run synchronously despite the async declaration, Task.FromResult will still make it run sync but add unnecessary overhead. The warning is good to have because it is a way of tracking possible future improvement and also letting methods being called from this method know that they will actually need to adapt on a higher level if someone made them truly async as well |
||
{ | ||
var acc = new List<CodeLens>(); | ||
foreach (SymbolReference sym in _symbolProvider.ProvideDocumentSymbols(scriptFile)) | ||
|
Uh oh!
There was an error while loading. Please reload this page.