Skip to content

Commit 1cf73f2

Browse files
committed
Remove hardcoded local examples.
1 parent 48e4194 commit 1cf73f2

5 files changed

Lines changed: 14 additions & 449 deletions

File tree

tests/ParallelTypeCheckingTests/Code/ParallelTypeChecking.fs

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,19 @@ let CheckMultipleInputsInParallel
5454
})
5555

5656
let graph = DependencyResolution.mkGraph sourceFiles
57-
graph |> Graph.map (fun idx -> sourceFiles.[idx].File) |> Graph.print
58-
59-
let graphDumpPath =
60-
let graphDumpName =
61-
tcConfig.outputFile
62-
|> Option.map Path.GetFileName
63-
|> Option.defaultValue "project"
64-
65-
$"{graphDumpName}.deps.json"
66-
67-
graph
68-
|> Graph.map (fun idx -> sourceFiles.[idx].File)
69-
|> Graph.serialiseToJson graphDumpPath
57+
// graph |> Graph.map (fun idx -> sourceFiles.[idx].File) |> Graph.print
58+
59+
// let graphDumpPath =
60+
// let graphDumpName =
61+
// tcConfig.outputFile
62+
// |> Option.map Path.GetFileName
63+
// |> Option.defaultValue "project"
64+
//
65+
// $"{graphDumpName}.deps.json"
66+
//
67+
// graph
68+
// |> Graph.map (fun idx -> sourceFiles.[idx].File)
69+
// |> Graph.serialiseToJson graphDumpPath
7070

7171
let _ = ctok // TODO Use
7272
let diagnosticsLogger = DiagnosticsThreadStatics.DiagnosticsLogger
@@ -109,8 +109,6 @@ let CheckMultipleInputsInParallel
109109
// printfn $"Finished Processing AST {file.ToString()}"
110110
return
111111
(fun (isFinalFold: bool) (state: State) ->
112-
if isFinalFold then
113-
printfn "final fold for %s" input.FileName
114112

115113
// printfn $"Applying {file.ToString()}"
116114
let tcState, priorErrors = state

tests/ParallelTypeCheckingTests/Code/TrieMapping.fs

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -232,43 +232,3 @@ and mkTrieForNestedSigModule (fileIndex: int) (decl: SynModuleSigDecl) : KeyValu
232232

233233
let mkTrie (files: FileWithAST array) : TrieNode =
234234
mergeTrieNodes 0 (Array.Parallel.map mkTrieNodeFor files)
235-
236-
// ==================================================================================================================================================
237-
// ==================================================================================================================================================
238-
open FSharp.Compiler.Service.Tests.Common
239-
open NUnit.Framework
240-
241-
[<Test>]
242-
let ``Fantomas Core trie`` () =
243-
let files =
244-
[|
245-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\obj\Debug\netstandard2.0\.NETStandard,Version=v2.0.AssemblyAttributes.fs"
246-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\obj\Debug\netstandard2.0\Fantomas.Core.AssemblyInfo.fs"
247-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\AssemblyInfo.fs"
248-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\ISourceTextExtensions.fs"
249-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\RangeHelpers.fs"
250-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\AstExtensions.fsi"
251-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\TriviaTypes.fs"
252-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\Utils.fs"
253-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\SourceParser.fs"
254-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\AstTransformer.fsi"
255-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\Version.fs"
256-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\Queue.fs"
257-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\FormatConfig.fs"
258-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\Defines.fsi"
259-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\Trivia.fsi"
260-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\Trivia.fs"
261-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\SourceTransformer.fs"
262-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\Context.fs"
263-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\CodePrinter.fsi"
264-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\CodeFormatterImpl.fsi"
265-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\Validation.fs"
266-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\Selection.fsi"
267-
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\CodeFormatter.fsi"
268-
|]
269-
|> Array.mapi (fun idx file ->
270-
let ast = parseSourceCode (file, System.IO.File.ReadAllText(file))
271-
{ Idx = idx; File = file; AST = ast })
272-
273-
let trie = mkTrie files
274-
ignore trie

tests/ParallelTypeCheckingTests/Program.fs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,6 @@ open ParallelTypeCheckingTests.TestUtils
2626
// Method = mode
2727
// WorkingDir = workingDir
2828
// }
29-
open ParallelTypeCheckingTests
30-
open ParallelTypeCheckingTests.DependencyResolution
3129

3230
[<EntryPoint>]
33-
let main _argv =
34-
let filesWithAST =
35-
ParallelTypeCheckingTests.Tests.DependencyResolutionTests.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
44-
0
31+
let main _argv = 0

0 commit comments

Comments
 (0)