Skip to content

Regression matrix: build unmodified repos against local FSharp.Core - #20240

Open
T-Gro wants to merge 2 commits into
mainfrom
t-gro-regression-local-fsharpcore
Open

Regression matrix: build unmodified repos against local FSharp.Core#20240
T-Gro wants to merge 2 commits into
mainfrom
t-gro-regression-local-fsharpcore

Conversation

@T-Gro

@T-Gro T-Gro commented Aug 10, 2026

Copy link
Copy Markdown
Member

Reworks the local-compiler regression shim so an unmodified repo builds against the locally built compiler and FSharp.Core, still resolving the right FSharp.Core flavor (netstandard2.0 vs netstandard2.1) per target framework.

It supplies FSharp.Core as the packed .nupkg through a local NuGet feed, not as a raw FSharp.Core.dll <Reference>. A .dll forces one flavor on every project and clashes with package references; the .nupkg lets restore pick the matching lib/netstandard2.x asset per project.

Supersedes #20072. Adds Lanayx/Oxpecker (#20065) to the matrix.

@github-actions

Copy link
Copy Markdown
Contributor

✅ No release notes required

@github-actions github-actions Bot added the AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed label Aug 10, 2026
@T-Gro
T-Gro force-pushed the t-gro-regression-local-fsharpcore branch from 1939c61 to 6a9e1c6 Compare August 10, 2026 12:08
T-Gro and others added 2 commits August 10, 2026 14:22
Gate 1 (LoadLocalFSharpBuild): redirect compiler/build tasks/targets to the
local build and carry --nowarn:75 --times (moved from the prepare fsx).
Gate 2 (RegressionLocalCore, matrix-only): serve the locally built FSharp.Core
the SDK's own way via FSCorePackageVersion plus a staged library-packs restore
source, so each repo resolves the ns2.0/ns2.1 core it would normally get. Only
engages when the repo has not pinned FSharp.Core (FSharpCoreImplicitPackageVersion
empty and FSCorePackageVersionSet not already set), so pinned/CPM/Update repos are
untouched. We deliberately don't set FSharpCoreImplicitPackageVersion so a repo's
own conditional pin keeps working.
Gate 3 (LoadLocalFSharpBuild without the matrix, i.e. CompilerCompat/VS): keep the
direct local FSharp.Core reference. Previously this and DisableImplicitFSharpCoreReference
were unconditional, which suppressed the implicit reference for the matrix too.

Set LoadLocalFSharpBuild=True in the VS integration standalone project so it keeps
using the local compiler now that the redirect is gated.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add eng/scripts/BuildWithLocalFSharp.fsx, an OS-agnostic runner (dotnet fsi is
the only dependency) that CI and a contributor invoke identically: it discovers
the freshly packed FSharp.Core, exports the environment the 3-gate
UseLocalCompiler props reads, then runs the repo's own build command from its
own directory (';;'-separated, fail-fast; per-OS shell; never chmod or edit the
checkout). With --verify it asserts the local core was actually restored. A
failed regression therefore reproduces locally with one command, no pipeline.

- Delete eng/scripts/PrepareRepoForRegressionTesting.fsx: nothing rewrites the
  target repo anymore; the shim is injected only via CustomAfterDirectoryBuildProps.
- eng/templates/regression-test-jobs.yml: replace the inline build logic with a
  single fsx call, pin global.json to the exact compiler SDK, and on failure
  print an OS-agnostic local-repro block. No pwsh-specific build logic remains.
- azure-pipelines-PR.yml: stage the packed FSharp.Core into the existing
  UseLocalCompilerProps artifact and mark the implicit-core matrix entries
  expectLocalCore: true; 120-minute timeout.
- docs + compiler-perf-investigator agent: document the fsx-based OS-agnostic
  local workflow.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 39f45ce2-37e7-4026-b55a-e09360417611
@T-Gro
T-Gro force-pushed the t-gro-regression-local-fsharpcore branch from 6a9e1c6 to 1077063 Compare August 10, 2026 12:22
@T-Gro
T-Gro requested a review from abonie August 11, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

1 participant