I'm trying to create a simple on-disk cache, but each time I run the application my structurally equal records have a different hash value.
The behavior seems to be correct (deterministic) when I run it in LINQPad or if the record only contains an integer.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
</Project>
type Test = { test : string }
[<EntryPoint>]
let main argv =
{ test = "test" }
|> hash
|> printfn "%i"
0
I would expect that running hash on structurally equal records would always return the same value.