Skip to content

Commit 2d98905

Browse files
committed
Hard coded test in entry point.
1 parent 18ef04e commit 2d98905

1 file changed

Lines changed: 33 additions & 24 deletions

File tree

tests/ParallelTypeCheckingTests/Program.fs

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,40 @@
55
open FSharp.Compiler.CompilerConfig
66
open ParallelTypeCheckingTests.TestUtils
77

8-
let _parse (argv: string[]) : Args =
9-
let parseMode (mode: string) =
10-
match mode.ToLower() with
11-
| "sequential" -> Method.Sequential
12-
| "parallelfs" -> Method.ParallelCheckingOfBackedImplFiles
13-
| "graph" -> Method.Graph
14-
| _ -> failwith $"Unrecognised mode: {mode}"
15-
16-
let path, mode, workingDir =
17-
match argv with
18-
| [| path |] -> path, Method.Sequential, None
19-
| [| path; method |] -> path, parseMode method, None
20-
| [| path; method; workingDir |] -> path, parseMode method, Some workingDir
21-
| _ -> failwith "Invalid args - use 'args_path [method [fs-parallel]]'"
22-
23-
{
24-
Path = path
25-
LineLimit = None
26-
Method = mode
27-
WorkingDir = workingDir
28-
}
8+
// let _parse (argv: string[]) : Args =
9+
// let parseMode (mode: string) =
10+
// match mode.ToLower() with
11+
// | "sequential" -> Method.Sequential
12+
// | "parallelfs" -> Method.ParallelCheckingOfBackedImplFiles
13+
// | "graph" -> Method.Graph
14+
// | _ -> failwith $"Unrecognised mode: {mode}"
15+
//
16+
// let path, mode, workingDir =
17+
// match argv with
18+
// | [| path |] -> path, Method.Sequential, None
19+
// | [| path; method |] -> path, parseMode method, None
20+
// | [| path; method; workingDir |] -> path, parseMode method, Some workingDir
21+
// | _ -> failwith "Invalid args - use 'args_path [method [fs-parallel]]'"
22+
//
23+
// {
24+
// Path = path
25+
// LineLimit = None
26+
// Method = mode
27+
// WorkingDir = workingDir
28+
// }
29+
open ParallelTypeCheckingTests.Code.TrieApproach
30+
open ParallelTypeCheckingTests.Code.TrieApproach.DependencyResolution
2931

3032
[<EntryPoint>]
3133
let main _argv =
32-
let args = _parse _argv
33-
let args = { args with LineLimit = None }
34-
TestCompilationFromCmdlineArgs.TestCompilerFromArgs args
34+
let filesWithAST =
35+
fcsFiles
36+
|> Array.Parallel.mapi (fun idx file ->
37+
{
38+
Idx = idx
39+
AST = FSharp.Compiler.Service.Tests.Common.parseSourceCode (file, System.IO.File.ReadAllText(file))
40+
File = file
41+
})
42+
43+
let _graph = mkGraph filesWithAST
3544
0

0 commit comments

Comments
 (0)