-
Notifications
You must be signed in to change notification settings - Fork 789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
F# compiler is really slow when trying to compile .net8.0 project with SDK 8.0.303 #17501
Comments
So, the bad news is that I can't reproduce it on my mac, on both TL;DR of the issue is: around .NET7 BCL rolled out "Static abstracts in interfaces" feature (which led to much bigger interfaces hirearchy), at the same time we rolled out support for static abstracts as well as some changes to SRTPs. And what I think is happening is that once you introduce new BCL, some of the functionality in your tests is making typechecking go brrr, and performance degrades significantly, see discussion in the issue above, as well as Don's comment in fsharp/fslang-design@71cd2e0. Conclusion: with all this in mind, the the best current course of action (for us or contributors) would be to:
As a temporary workaround(s), there were some comments from @gusty in the original issue in Fleece, which might help. |
The worst part is that the more people will move to |
I will experiment with caching stuff more once I'm off of work. |
Is it possible to link the changes that fixes this issue? |
#17668 it didn't link for some reason |
Is there an ETA on this? Has been bugging me for months and makes working in some repositories pretty much impossible. |
It will be released with 9.0.200 in January, but will be under |
Is this also going to be backported to 8.0? We compile all our repositories with the .NET 8 SDK due to this issue. |
It will be up to the team. @T-Gro, @KevinRansom thoughts? |
Can you elaborate please? Are you encountering the same/similar between NET8 and NET9 ? We would definitely appreciate your support in identifying a problem which prevents you from building using .NET9 SDK. |
We could probably use .NET 9 for our builds if we absolutely had to, I'm not aware of any current incompatibilities like with 6 and 7. But back when .NET 7 was released we had to force the build system in dozens of repositories to .NET 6. Now with the phasing out of .NET 6 we thought it'd be a good idea to keep using the LTS version of the SDK to be resilient against any issues that might arise with the .NET 9 SDK. Also seeing that the issue has never been addressed made us a bit cautious. So in short, we opt to use the .NET 8 to be on the safe side. But I think that's beside the point anyway. I'd expect a major regression like this one to be fixed in the current LTS version. |
For this bug, it's has not been a regression of the compiler - it was a consequence of many interface layers added to numeric types in NET. The cache has been added as a brand new feature, even under the language version flag for langversion=preview and NET10 eventually. In general, we are not backporting preview language features into older versions of the language. I do understand the desire, but a manually cherry-picked migration of this feature into NET8 SDK, pretending this is a NET8 feature and not a preview feature, would only add more risks. It would also slow down fixes in this area due to inability to automatically backport changes once a conflict like this would be created. |
Repro steps
Provide the steps required to reproduce the problem:
dotnet build -v:n .\tests\OpenTK.Tests\OpenTK.Tests.fsproj
Expected behavior
The compiler should compile the project (this particular commit has a runtime error, but that shouldn't matter).
Actual behavior
The compiler never finishes compiling the project.
Known workarounds
Switching to
.net6.0
fixes the issue.Related information
I also tried targeting and compiling the project with SDK Version: 9.0.100-preview.6.24328.19 and I still get the hang.
Provide any related information (optional):
The text was updated successfully, but these errors were encountered: