Skip to content

Commit 89c44e0

Browse files
committed
changes
1 parent 4288150 commit 89c44e0

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

tests/FSharp.Compiler.Service.Tests2/GraphProcessing.fs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ let processGraph<'Item, 'State, 'Result when 'Item : equality>
128128
|> lookupMany
129129
|> Array.filter (fun x ->
130130
let pdc =
131+
// TODO Not ideal, better ways most likely exist
131132
lock x (fun () ->
132133
x.ProcessedDepsCount <- x.ProcessedDepsCount + 1
133134
x.ProcessedDepsCount
@@ -136,8 +137,9 @@ let processGraph<'Item, 'State, 'Result when 'Item : equality>
136137
)
137138
unblocked
138139

140+
139141
use cts = new CancellationTokenSource()
140-
142+
141143
Parallel.processInParallel
142144
leaves
143145
work

tests/FSharp.Compiler.Service.Tests2/ParallelTypeChecking.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ open FSharp.Compiler.Service.Tests.Types
66
type FileGraph = Graph<File>
77

88
let calcFileGraph (files : SourceFiles) : FileGraph =
9+
// TODO Use DepResolving.fs
910
failwith ""
1011

1112
// TODO Use real things
@@ -18,7 +19,7 @@ let typeCheckFile (file : File) (state : State) : SingleResult
1819
file.Idx.Idx
1920

2021
// TODO Use the real thing
21-
let folder (state : string) (result : int) =
22+
let folder (state : State) (result : SingleResult) =
2223
$"{state}+{result}"
2324

2425
// TODO We probably need to return partial results as well

tests/FSharp.Compiler.Service.Tests2/Tests/RunCompiler.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ open FSharp.Compiler.Service.Tests.Graph
55
open NUnit.Framework
66

77
[<Test>]
8+
[<Explicit>]
89
let runCompiler () =
910
let args =
1011
System.IO.File.ReadAllLines(@"C:\projekty\fsharp\heuristic\tests\FSharp.Compiler.Service.Tests2\args.txt") |> Array.skip 1

tests/FSharp.Compiler.Service.Tests2/Tests/TestASTVisit.fs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ let ``Top level stuff extraction`` () =
3939
let parseResults =
4040
getParseResults
4141
"""
42-
4342
module A1 = let a = 3
4443
module A2 = let a = 3
4544
module A3 = let a = 3
@@ -70,12 +69,13 @@ module B =
7069
Y : A4.Y
7170
}
7271
73-
let c = A4.a
74-
let d = A4.A1.a
75-
open A4
76-
let e = A1.a
77-
open A1
78-
let f = a
72+
module LetBindings =
73+
let c = A4.a
74+
let d = A4.A1.a
75+
open A4
76+
let e = A1.a
77+
open A1
78+
let f = a
7979
"""
8080

8181
let stuff = findModuleAndTypeRefs parseResults

tests/FSharp.Compiler.Service.Tests2/Utils.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ type FileIdx =
1414
with
1515
member this.Idx = match this with FileIdx idx -> idx
1616
override this.ToString() = this.Idx.ToString()
17-
static member make (idx : int) = FileIdx idx
17+
static member make (idx : int) = FileIdx idx

0 commit comments

Comments
 (0)