Fix spurious type errors for provided types under parallel compilation#19969
Fix spurious type errors for provided types under parallel compilation#19969T-Gro wants to merge 4 commits into
Conversation
Intern provided-type entities by name so the same provided type linked from multiple files under graph-based parallel checking yields one entity, avoiding spurious FS0001 type mismatches from identity comparisons. Capture the systemRuntimeContainsType closure stably so TypeProviders-SDK providers load under an unoptimized compiler (the SDK reflects on a field named tcImports whose name was previously codegen-dependent). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… fixes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ No release notes required |
|
CC @smoothdeveloper — thanks for the report and the debugging that pinned this down. |
|
@T-Gro thanks for getting to the bottom of it! I'll check the changes solves the issue in my context (edit: change to CompilerImports.fs is in the PR already). |
|
🔍 Tooling Safety Check — Affects-Compiler-Output, Affects-Design-Time
|
|
Confirming the build issue is fixed in my context! |
…esthost hang) All 47 jobs passed except IcedTasks_Test_Debug, which timed out at 120min after all but one test target completed. The identical suite passed in IcedTasks_Test_Release (8m) and IcedTasks does not use type providers, so this PR's type-provider-only changes cannot affect its build or test runtime. The CI agent reported 95% memory usage and one net9.0 testhost hung. Re-running to clear the transient failure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
The only failing check was IcedTasks_Test_Debug (regression test), which timed out at the 120-minute job limit. All other 46 jobs passed, including IcedTasks_Build and IcedTasks_Test_Release (the identical test suite in Release completed in ~8 minutes). The agent log shows 95% memory usage and a single net9.0 testhost hung after every other target had already passed, so this is a transient resource-starvation timeout rather than a code issue — IcedTasks does not use type providers, and this PR only changes type-provider code paths. /azp run fsharp-ci |
Two type-provider failures that appear only in full parallel builds, not in the IDE:
The same provided type used from multiple files was checked into separate entities, so identity comparisons failed and reported spurious FS0001 type mismatches. Provided-type entities are now interned by name, so all files linking a given provided type share one entity and parallel checking stays enabled.
Hosting a TypeProviders-SDK provider under an unoptimized compiler failed with "a field called tcImports must exist in the systemRuntimeContainsType closure", because the closure field the SDK reflects on was named by codegen and only matched in optimized builds. It is now captured stably in every configuration.