Conversation
| ) | ||
|
|
||
| return | ||
| (fun tcState -> |
There was a problem hiding this comment.
Is this how TcState is merged? Seems surprisingly easy
| |> fun results -> | ||
| ((sequentialTcState, sequentialPriorErrors, ImmutableQueue.Empty), results) | ||
| ||> Array.fold (fun (tcState, priorErrors, partialResults) result -> | ||
| let partialResult, logger, nextTcState = result tcState |
There was a problem hiding this comment.
@safesparrow here, I fold the callback over here and everything plays out as it would in sequence.
|
I really like this idea @nojaf . I spent some time thinking about doable and opt-in way into this. What would you think about checking a module-level attribute at the very first definition of the file. That is only a single check of the parsed tree, without any deep traversal.
Files that are within a linear chain of files and at the same time have the same |
|
I'm in process of developing the heuristic with @nojaf's help and insights. It already kinda works and is very quick. Needs some polishing before I can share it. The way it works is for each file it checks what top-level modules/namespaces are reachable in that file based on module and type references in that file, then marks all files whose top-level modules/namespaces are in the set. It obviously gives false positives, but that's expected and fine as long as it gives enough true positives. Atm it runs in 230ms for .fs files in FSharp.Compiler.Service project. For comparison parsing takes ~4s and compilation as a whole something around/under a minute. |
Sweet! Would you folks be open to meeting and chatting about it? |
|
I don't really know how we'd know if things are independent but I'm looking forward to seeing the proposal! Make sure it's sound please :) |
We can set up a meeting and chat about it when it's ready. I'm sure @auduchinok @baronfel @abelbraaksma @gusty and the team would love to talk about it! We can have an open meetup even, for anyone interested, if folks won't mind. |
|
@vzarytovskii sure, would love that! Btw, talking of parallelism (which really has three l’s, not four, @nojaf 😆), I was hoping to chat with @dsyme, if you have time, on Sorry for the brief hijack. An open meeting sounds excellent! |
That is really good. |
|
Happy to see I managed to sell the heuristic idea 😅 While we (mostly me) are optimistic about it working soon, we don't have it working end-to-end atm. Specifically the piece we're missing atm (but think is relatively easy, although we/I might be wrong) is the branching/merging of @vzarytovskii I'd be happy to take part in a chat about this and possibly related ideas/PoCs mentioned in this discussion. Also, I send my apologies to @nojaf for hijacking this PR's discussion - I blame @T-Gro 's comment 😝 |
Yes, I share this concern about that approach.
I was also thinking along the lines of having something in the <ItemGroup>
<Compile Include="FsUnit.fs" />
<Compile Include="TestHelpers.fs" />
<ParallelCompilationGroup>
<Compile Include="UtilsTests.fs" />
<Compile Include="QueueTests.fs" />
<Compile Include="StringTests.fs" />
<Compile Include="CommentTests.fs" />
<Compile Include="ShebangTests.fs" />
<Compile Include="OperatorTests.fs" />
<Compile Include="ComparisonTests.fs" />
<Compile Include="ControlStructureTests.fs" />
<Compile Include="PipingTests.fs" />
<Compile Include="AppTests.fs" />
<Compile Include="ModuleTests.fs" />
<Compile Include="UnionTests.fs" />
<Compile Include="RecordTests.fs" />
</ParallelCompilationGroup>
<Compile Include="SomeOtherFile.fs" />
</ItemGroup>But passing that information to the compiler might be tricky.
Works for me. I do prefer to wait until it is ready.
Apologies accepted, but please all do stop now. |
|
I will put this on my list of things to check. Changes in the .fsproj might delay initial testing of this feature - integration of tooling, msbuild, FCS api a FSC command line api might make the list of changes and decisions to do a lot bigger. => My preference to be to have a experimental version for experts for testing and evaluation before those decisions have to be done. |
It'd be great! Next week works for me, pretty sure for other folks too. Let me know what works for you and I can set something up. |
|
Can I close? This was experimental anyway, right? |
|
Yup, can be closed. |
Prototype to type check files that are unrelated in parallel.