Fix spurious type errors for provided types under parallel compilation#19969
Open
T-Gro wants to merge 2 commits into
Open
Fix spurious type errors for provided types under parallel compilation#19969T-Gro wants to merge 2 commits into
T-Gro wants to merge 2 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>
Contributor
✅ No release notes required |
Member
Author
|
CC @smoothdeveloper — thanks for the report and the debugging that pinned this down. |
Contributor
|
@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). |
Contributor
|
🔍 Tooling Safety Check — Affects-Compiler-Output, Affects-Design-Time
|
Contributor
|
Confirming the build issue is fixed in my context! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.