-
Notifications
You must be signed in to change notification settings - Fork 803
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
The new intellisense parsing, VS2022 dies to StackOverflow in CheckDeclarations.fs #17726
Comments
It doesn't work like that unfortunately, to do anything it should typecheck everything dependant. Regardless, it should be fixed in #17654 |
Ok, hope to get the fix soon to live. It's VS2022 release we need to wait for and not FSharp.Core, right? |
Yes, 17.12 |
Tried it with current 17.12 preview-2 released 4 days ago, and I can confirm this is not fixed.
The current source-code seems to match the lines of the Github main. |
It is not in preview2 yet, p2 was done (frozen) when fix was merged. Either 3 or 4. It was just inserted into vs 4 days ago: #17693 preview builds are usually done days before release, so p2 is likely ~10d old, maybe even more. |
This is a .vsix built now. |
Hi, But the main thing confirmed: the Visual Studio is not randomly dying anymore. |
Cold start is kinda expected to be slow on big files. We hope to address it once we migrate to new out-of-proc LSP-based extension in future. Or rather we will be able to do more, now we are tied to net472 hosting-in-process in VS, which brings a lot of limitations :( |
Sadly this wasn't even a cold-start... But the code uses multiple type-providers and query-expressions, etc, and I think major part of slowness is (in the ecosystem, but) outside FSharp core itself. The slowness (and also full memory-footprint reduction) could be addressed by trying to optimize e.g. the the ProvidedTypes.fs, for example: If type-providers are accepted to be large amount of independent type entities, why does the interface expect (linked-)lists and not arrays? Many F# libraries seem to use recklessly ConcurrentDictionaries as caches, one per type. And so on. |
In case they are not being reused, we could move some of them from lists to ImmutableArrays. |
Which release is it expected to appear? |
17.12 |
@T-Gro I tried the VSIX above and autocomplete execution takes 40 seconds for popup to appear |
I am sorry about that. Was it the first autocomplete (possibly causing a lot of .dll loading and JITing), or is it that slow all the time? |
After latest F# and VS2022 batches the Visual Studio has went unreliable and just disappears sometimes when writing new text, leaving Windows Eventlog a devenv.exe error entry.
I attached another Visual Studio instance to my Visual Studio to see why it dies.
I have an F# file of 9313 lines, and meanwhile writing to anywhere really, it seems to be that compiler intellisense throws stack-overflow and that ends-up killing the whole VisualStudio 2022. Maybe the code after error, the unknown-part, is too big for the compiler to try to parse?
Here the "Cannot evaluate expression. Unknown error 0x80040014 from .NET debugging services." makes totally sense, as meanwhile typing the source-code cannot be parsed, I'm in a middle of a word!
The stackoverflow seems to come from CheckDeclarations.fs function TcMutRecDefns_Phase2:
fsharp/src/Compiler/Checking/CheckDeclarations.fs
Line 2110 in c910057
Callstack:
Event-log:
Environment:
Microsoft Visual Studio Professional 2022 (64-bit) - Current Version 17.11.3
Windows 11 - Dotnet 8.0.400
I don't need intellisense outside my screen, so there is no reason to try to parse the whole file through!
And in case of any parsing error, it should just give-up and not parse.
The text was updated successfully, but these errors were encountered: