Skip to content

build: compile the test project without parallel compilation - #41

Merged
xperiandri merged 1 commit into
mainfrom
build/sequential-test-compilation
Oct 19, 2026
Merged

xperiandri merged 1 commit into
mainfrom
build/sequential-test-compilation

Conversation

@xperiandri

@xperiandri xperiandri commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

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: 'C while 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 both net8.0 and net10.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 x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

A fix of an unstable build. No code of the library or of the tests changes.

Checklist

Put an x in 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.

  • Build and tests pass locally
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

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:

Switch Builds FS0073
none 66 (12 + 30 + 24 on 4 processors) 6
--parallelcompilation- 72 (24 + 24 on 4 processors + 24 on 4 processors with the property of this pull request) 0

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

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
xperiandri force-pushed the build/sequential-test-compilation branch from 7bc75e7 to 47db96d Compare October 19, 2026 14:40
@xperiandri
xperiandri merged commit 7a7c00f into main Oct 19, 2026
7 checks passed
@xperiandri
xperiandri deleted the build/sequential-test-compilation branch October 19, 2026 14:44
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant