Skip to content

Commit

Permalink
Transparent compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
auduchinok committed Feb 10, 2025
1 parent e02068e commit b756c5d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Compiler/Service/TransparentCompiler.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1610,6 +1610,8 @@ type internal TransparentCompiler
caches.ParseAndCheckFileInProject.Get(
projectSnapshot.FileKeyWithExtraFileSnapshotVersion fileName,
async {
use! _holder = Cancellable.UseToken()

use _ =
Activity.start "ComputeParseAndCheckFileInProject" [| Activity.Tags.fileName, fileName |> Path.GetFileName |> (!!) |]

Expand Down Expand Up @@ -1861,6 +1863,7 @@ type internal TransparentCompiler
caches.AssemblyData.Get(
projectSnapshot.SignatureKey,
async {
use! _holder = Cancellable.UseToken()

try

Expand Down Expand Up @@ -1908,6 +1911,7 @@ type internal TransparentCompiler
caches.ParseAndCheckProject.Get(
projectSnapshot.FullKey,
async {
use! _holder = Cancellable.UseToken()

match! ComputeBootstrapInfo projectSnapshot with
| None, creationDiags ->
Expand Down Expand Up @@ -1980,6 +1984,8 @@ type internal TransparentCompiler

let tryGetSink (fileName: string) (projectSnapshot: ProjectSnapshot) =
async {
use! _holder = Cancellable.UseToken()

match! ComputeBootstrapInfo projectSnapshot with
| None, _ -> return None
| Some bootstrapInfo, _creationDiags ->
Expand Down

0 comments on commit b756c5d

Please sign in to comment.