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

Use background CancellableTask in VS instead of async & asyncMaybe #15187

Merged
merged 28 commits into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7bbfbea
wip
vzarytovskii May 4, 2023
187ea2e
iteration
vzarytovskii May 5, 2023
4710007
iteration: quickinfo, help context
vzarytovskii May 5, 2023
350669e
fantomas
vzarytovskii May 5, 2023
4451bb6
Merge remote-tracking branch 'upstream/main' into cancellable-tasks
vzarytovskii May 5, 2023
0641626
todo
vzarytovskii May 5, 2023
ab022cb
Merge remote-tracking branch 'upstream/main' into cancellable-tasks
vzarytovskii May 9, 2023
9ad35fe
Merge remote-tracking branch 'upstream/main' into cancellable-tasks
vzarytovskii May 11, 2023
4440d4f
moved tasks to editor project, fixed comment colouring bug
vzarytovskii May 11, 2023
555fd73
fantomas
vzarytovskii May 11, 2023
206e9f3
Merge main
vzarytovskii May 18, 2023
418c79f
Fantomas + PR feedback
vzarytovskii May 18, 2023
bf51b31
Update vsintegration/src/FSharp.Editor/Hints/HintService.fs
vzarytovskii May 18, 2023
008df2b
Revert "Update vsintegration/src/FSharp.Editor/Hints/HintService.fs"
vzarytovskii May 19, 2023
ab459bf
Merge branch 'main' into cancellable-tasks
KevinRansom May 19, 2023
709563e
Update CancellableTasks.fs
vzarytovskii May 22, 2023
0838ced
Merge branch 'main' into cancellable-tasks
vzarytovskii May 23, 2023
20b4921
Added missing event properties for classifications event
vzarytovskii May 23, 2023
327b215
Added measurements for startup
vzarytovskii May 23, 2023
523f5ea
Automated command ran: fantomas
github-actions[bot] May 23, 2023
cdf5e5f
Added more settings for testing, added cache for hints
vzarytovskii May 24, 2023
3f4aa2b
Merge branch 'cancellable-tasks' of https://github.com/vzarytovskii/f…
vzarytovskii May 24, 2023
2ddefa6
Automated command ran: fantomas
github-actions[bot] May 24, 2023
4d93e72
Fix test
vzarytovskii May 25, 2023
295b090
Merge branch 'cancellable-tasks' of https://github.com/vzarytovskii/f…
vzarytovskii May 25, 2023
65ef0f5
fantomas
vzarytovskii May 25, 2023
c4d980f
Enable perf telemetry automatically with posibillity to opt out
vzarytovskii May 25, 2023
95b6cdc
Update vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj
vzarytovskii May 25, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ type internal FSharpClassificationService [<ImportingConstructor>] () =
)

result.ToImmutable()


static let addSemanticClassification
sourceText
Expand Down Expand Up @@ -198,7 +197,9 @@ type internal FSharpClassificationService [<ImportingConstructor>] () =
TelemetryReporter.ReportSingleEventWithDuration(TelemetryEvents.AddSyntacticCalssifications, eventProps)

if not isOpenDocument then
let classifiedSpans = getLexicalClassifications (document.FilePath, defines, sourceText, textSpan, cancellationToken)
let classifiedSpans =
getLexicalClassifications (document.FilePath, defines, sourceText, textSpan, cancellationToken)

result.AddRange(classifiedSpans)
else
result.AddRange(
Expand Down
7 changes: 1 addition & 6 deletions vsintegration/src/FSharp.Editor/Hints/HintService.fs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@ module HintService =
|> Seq.collect (InlineParameterNameHints(parseResults).GetHintsForUnionCase symbol)
| _ -> []

let rec loop hintKinds acc =
match hintKinds with
| [] -> acc
| hintKind :: hintKinds -> (getHintsPerKind hintKind) :: (loop hintKinds acc)

loop (hintKinds |> Set.toList) []
hintKinds |> Set.toList |> List.map getHintsPerKind
vzarytovskii marked this conversation as resolved.
Show resolved Hide resolved

let private getHintsForSymbol (sourceText: SourceText) parseResults hintKinds (symbol, symbolUses) =
let hints = getHints sourceText parseResults hintKinds symbolUses symbol
Expand Down