You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FSI 4.7: expression is too large and/or complex to emit #7673
This could be related to stack overflow bugs we resolved in F# 4.7 where massive records would cause the compiler to stack overflow on .NET Core. This may have worked on FSI since it uses .NET Framework which didn't have that issue.
Seems my fix wasn't enough to handle more cases since I was able to spend a bit more time on it. I made a PR regardless though.
@kevmal , if you want this to work as is, you can put the [<NoEquality;NoComparison>] attribute on the record. This will prevent the equality + comparison methods that cause the overflows to not be generated. That is the current workaround until we figure out what we will do to resolve it.
Activity
cartermp commentedon Oct 1, 2019
cc @TIHan
This could be related to stack overflow bugs we resolved in F# 4.7 where massive records would cause the compiler to stack overflow on .NET Core. This may have worked on FSI since it uses .NET Framework which didn't have that issue.
TIHan commentedon Oct 1, 2019
Yes, this is related. I already have a fix for it for a similar issue and this one might well be the same issue. Will make a PR today.
TIHan commentedon Oct 2, 2019
Seems my fix wasn't enough to handle more cases since I was able to spend a bit more time on it. I made a PR regardless though.
@kevmal , if you want this to work as is, you can put the
[<NoEquality;NoComparison>]attribute on the record. This will prevent the equality + comparison methods that cause the overflows to not be generated. That is the current workaround until we figure out what we will do to resolve it.larjo commentedon Oct 16, 2019
I have an anonymous record with 48 fields that loads in fsi.exe but fails with Error FS0073 in fsiAnyCpu.exe.
With 47 fields it loads fine in both fsi and fsiAnyCpu.
Here is a gist: https://gist.github.com/larjo/d89b2a9184b151773de3117fa21f97fd
I am using the fsi and fsiCpuAny from the latest build tools, 16.3.5.
If I declare the anonymous record as a struct, it actually works in fsiAnyCpu. So that is a possible workaround.
cartermp commentedon Nov 27, 2019
#7678 resolves this.