Repository navigation
build: compile the test project without parallel compilation - #41
Merged
Merged
Conversation
This was referenced Oct 19, 2026
The F# compiler fails now and then with "FS0073: internal error: Undefined or unsolved type variable: 'C" while it compiles the test project in Release (at SeqLikeAccessContract<'C>, for example). The failure is intermittent, and it comes more often on runners with few cores. The CI jobs of the open pull requests failed with it in Release on macOS, Ubuntu and Windows. Reported to the F# compiler: dotnet/fsharp#20812 The project now sets ParallelCompilation to false, which passes --parallelcompilation- to the compiler. 6 of 66 builds failed without the switch (12 builds, 30 builds, and 24 builds restricted to 4 cores); none of 72 builds failed with it (24 builds, and 48 builds restricted to 4 cores). The switch costs about one second per build. The compiler marks it as meant for tests only (FS0075), so the project silences that warning. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
xperiandri
force-pushed
the
build/sequential-test-compilation
branch
from
October 19, 2026 14:40
7bc75e7 to
47db96d
Compare
6 tasks done
5 of 6 tasks
Open
5 of 6 tasks
xperiandri
added a commit
that referenced
this pull request
Oct 20, 2026
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
xperiandri
added a commit
that referenced
this pull request
Nov 14, 2026
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
xperiandri
added a commit
that referenced
this pull request
Nov 14, 2026
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
xperiandri
added a commit
that referenced
this pull request
Nov 18, 2026
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Proposed Changes
The test project compiles without parallel compilation:
<ParallelCompilation>false</ParallelCompilation>, which passes--parallelcompilation-to the F# compiler. The compiler marks that switch as meant for tests only and warns with FS0075, so the project silences the warning.The F# compiler fails now and then with
error FS0073: internal error: Undefined or unsolved type variable: 'Cwhile it compiles the test project in Release. The position is a generic contract class,SeqLikeAccessContract<'C>. The Release jobs of the open pull requests that failed on 18 and 19 October all failed with this error, on macOS, Ubuntu and Windows and for bothnet8.0andnet10.0, and they passed when they ran again: the sources are not at fault. The error is reported to the compiler as dotnet/fsharp#20812, with a reproduction archive.Types of changes
What types of changes does your code introduce to FSharp.Collections.Immutable?
Put an
xin the boxes that applyA fix of an unstable build. No code of the library or of the tests changes.
Checklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
The project file explains the switch in a comment. The failure is intermittent, so the proof is a count. The test project was compiled again and again in Release for
net10.0(--no-incremental, the library built once), on a machine with 32 logical processors, and part of the runs with the process restricted to 4 logical processors, which is closer to a runner:--parallelcompilation-The switch costs about one second per build of the test project (9 to 10 s without it, 10 to 11 s with it). Only the test project failed, so the library keeps parallel compilation.
An internal error is a defect of the compiler, not of the sources, so the switch is a workaround. When that issue is fixed, the property can go; the comment in the project file links it.
🤖 Generated with Claude Code