|
5 | 5 | open FSharp.Compiler.CompilerConfig |
6 | 6 | open ParallelTypeCheckingTests.TestUtils |
7 | 7 |
|
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 |
29 | 31 |
|
30 | 32 | [<EntryPoint>] |
31 | 33 | 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 |
35 | 44 | 0 |
0 commit comments