language-ext
language-ext copied to clipboard
Release build fails for a big application
We have an application that it contains a lot of code. Building the app in Visual Studio in debug mode it always works fine. When attempting to build in release mode, it takes a much longer time and in the end it throws these errors in the log (see attached files). This happens if I build both in Visual Studio or from command line.
The reason I opened the ticket here is that I noticed that it is related to this library. release build - partial log 1.txt release build - partial log 2.txt
Looks like a compiler bug to me. I'd make sure everything is up to date (latest compiler, latest .NET SDK). If it still doesn't work you'll have to report it on the Roslyn repo I think
Another thing that I guess could be worth considering: are you using AOT or any other tree-shaking?
I'm on Mircea's team and have been staring hard at this weird error too. :)
We were wondering something like that ourselves. We have tried turning off AOT and changing the linker behavior to don't link. Unfortunately, we got the same error. Any other settings to tweak?
To be clear, this is occurring in the Windows and Android release builds.
Not that I know of. Differences between a debug and release build really would hint to me that it's compiler related, I'd look for the difference in builds and try working out what setting is the cause. Other than that it's anybody's guess.
System.OverflowException: Arithmetic operation resulted in an overflow.
-- is also pretty suspect. Obviously, without knowing the internals of the roslyn IL code-gen I can't know what the problem is, but an integer overflow might suggest they're using byte
or short
for something, possibly number of members, number of types, or number of variables. Do you have an excess of those in that area of the code?
I would still expect it to fall over in the debug build though. Unless this is literally part of the release-IL optimisation.