Skip to content

Fix non-deterministic reference assembly MVIDs#19801

Open
T-Gro wants to merge 1 commit into
mainfrom
fix/mvid
Open

Fix non-deterministic reference assembly MVIDs#19801
T-Gro wants to merge 1 commit into
mainfrom
fix/mvid

Conversation

@T-Gro
Copy link
Copy Markdown
Member

@T-Gro T-Gro commented May 25, 2026

Fixes #19751

TypeHashing.hashText delegated to F#'s hash on strings → String.GetHashCode() → randomized per-process since .NET 6+. This made --refout MVIDs non-deterministic across builds.

Fix: FNV-1a 32-bit deterministic hash. All other hash calls in TypeHashing audited — only strings were affected.

SKIP CCR REVIEW

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

❗ Release notes required


✅ Found changes and release notes in following paths:

Change path Release notes path Description
src/Compiler docs/release-notes/.FSharp.Compiler.Service/11.0.100.md

@github-actions github-actions Bot added the AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed label May 25, 2026
Replace randomized String.GetHashCode with deterministic FNV-1a 32-bit
hash in TypeHashing.hashText and hashILTypeRef. The per-process hash
seed in .NET 6+ caused --refout / ProduceReferenceAssembly to emit a
different MVID on every build.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Cannot generate deterministic MVIDs for reference assemblies under any circumstances

1 participant