Make parallel compilation features work with deterministic builds
Currently only parallel reference resolution is supported. (see #18998)
The following do not work and are automatically disabled for deterministic builds:
- [x] Parallel ILX Gen
- [x] Graph based type checking (dedicated issue: #14734)
- [x] Parallel Optimizations
According to comments https://github.com/dotnet/fsharp/pull/14390#issuecomment-1426369485 The issue most probably lies in embedded PDB generation.
Name generation in CompilerGlobalState.fs does not play well with parallel compilation, too.
I'll gather some relevant comments here: https://github.com/dotnet/fsharp/pull/14390#issuecomment-1455210364
The saga of graph type checking determinism is scattered among many PRs that I wasn't paying much attention to at the time. I'm only getting up to speed now. It seems at some point it worked / almost worked? (#15003)
Also #14850