Skip to content

Parallel compilation of scripts - #19649

Merged
T-Gro merged 9 commits into
dotnet:mainfrom
majocha:parallelcompilation-fsx
May 7, 2026
Merged

Parallel compilation of scripts#19649
T-Gro merged 9 commits into
dotnet:mainfrom
majocha:parallelcompilation-fsx

Conversation

@majocha

@majochamajocha commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Graph based type checking did not handle compilations that include script files.
Previous workaround was to simply sequentially check files up to the last script on the sources list.

The actual bug was that graph checking did not record modules implicitly provided by any script file in the compilation, in effect missing dependencies like :

// A.fsxletvalue=41
// B.fsx
#load "A.fsx"letresult= A.value +1

@github-actions

github-actionsBot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

❗ Release notes required


✅ Found changes and release notes in following paths:

Change pathRelease notes pathDescription
src/Compilerdocs/release-notes/.FSharp.Compiler.Service/11.0.100.md

@majocha

Copy link
Copy Markdown
ContributorAuthor

So, the diamondAssembly test is the only failing one.

Interestingly, the failure is not a new one, looking at git history: 90c4e66

@majocha

Copy link
Copy Markdown
ContributorAuthor

The issue is caused by singling out AnonModule during trie mapping. If we want to be correct, we need to collect AnonModules that loaded script files implicitly provide.

@majocha
majochaforce-pushed the parallelcompilation-fsx branch from 0803290 to fb40499CompareMay 4, 2026 09:35
Comment threadsrc/Compiler/Driver/GraphChecking/DependencyResolution.fs
Comment threadsrc/Compiler/Driver/GraphChecking/TrieMapping.fs
@majocha
majocha marked this pull request as ready for review May 4, 2026 15:22
@majocha
majocha requested a review from a team as a code ownerMay 4, 2026 15:22
@github-project-automationgithub-project-automationBot moved this from New to In Progress in F# Compiler and ToolingMay 6, 2026
@T-Gro
T-Gro enabled auto-merge (squash) May 6, 2026 12:30
@T-Gro

T-Gro commented May 6, 2026

Copy link
Copy Markdown
Member

So, the diamondAssembly test is the only failing one.

Interestingly, the failure is not a new one, looking at git history: 90c4e66

Would be great if we could find a bigger repo structured as a bunch of #loaded scripts glued together - and add it to the regression testing matrix.

(i.e. an overuser of scripts, yes :)) )

@T-Gro

T-Gro commented May 7, 2026

Copy link
Copy Markdown
Member

Did some scouting, what about https://github.com/Refsa/FuncIRC and https://github.com/Refsa/FuncIRC/blob/master/FuncIRC/FuncIRC.fsproj in particular ?

Looks like a nice web with many #loads, inside a single .fsproj ?

T-Gro
T-Gro approved these changes May 7, 2026
@T-Gro
T-Gro merged commit ae2bdd9 into dotnet:mainMay 7, 2026
50 checks passed
@T-Gro
T-Gro self-requested a review May 7, 2026 16:24
@T-GroT-Gro added AI-reviewed PR reviewed by AI review council and removed AI-reviewed PR reviewed by AI review council labels May 7, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants

@majocha@T-Gro