-
Notifications
You must be signed in to change notification settings - Fork 783
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
FSI sometimes gets confused by tabs: "Unexpected symbol # in interaction. Expected incomplete structured construct at or before this point" #14779
Comments
I'm experiencing this same issue with VS 2022 Version 17.5.1 and 17.5.2 as well. The code inside of methods that used to be able to be sent and executed that has any indentation now reports the following error: stdin(1,1): error FS0010: Unexpected symbol # in interaction. Expected incomplete structured construct at or before this point, ';', ';;' or other token. Note It seems the additional code that is sent by VS to fsi that does not appear in the interactive console has a bug in it. I believe it might be related to the System.IO.File call since it shows an indent in front of the expression. |
This is also happening on: as well. I was not able to revert back further than 17.5.1 but I know it was working 8 weeks ago or so. |
Yeah, I still see it on latest |
@abonie That workaround only works if you're selecting one item at that indentation level. If you selected two items it would give an error. For example with this code: let f() =
()
let g() =
() If you select both functions but only from the first let f() =
()
let g() =
() The only actual workaround I know is to temporarily unindent all of the code so it starts at column 1, select it, send it to FSI and undo the indentation. It's really awkward. |
This is a relatively recent bug. I was a little bit behind on updating VS and F# locally, but now I'm experiencing the same behavior. As others have already mentioned, it is a really confusing and annoying error, and non-trivial to work around. Also of note, I lose the prompt and it doesn't come back. |
So, I think everyone realizes this, but just to clarify, the problem is any indentation, not just tabs. The issue title should probably be changed. |
When will this actually show up in a Visual Studio preview? 17.7 preview 3 was release today and this still doesn't work. Is there a way to build the VS integration and side load it into VS would that be in the contributor section? |
The fix should have been in p3, not sure why it still shows cc @KevinRansom |
I can confirm that building from main and installing the VSIX does have the fix then.
From: Vlad Zarytovskii ***@***.***>
Sent: Wednesday, July 12, 2023 3:25 AM
To: dotnet/fsharp ***@***.***>
Cc: Patrick Simpson ***@***.***>; Comment ***@***.***>
Subject: Re: [dotnet/fsharp] FSI sometimes gets confused by tabs: "Unexpected symbol # in interaction. Expected incomplete structured construct at or before this point" (Issue #14779)
The fix should have been in p3, not sure why it still shows
cc @KevinRansom<https://github.com/KevinRansom>
—
Reply to this email directly, view it on GitHub<#14779 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADTVWHQHFFLFV7PHZGNGFODXPZUPLANCNFSM6AAAAAAVDZQH2U>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Ah, probably wasn't inserted then. |
Fixed in #15384 |
FSI sometimes gets confused by tabs.
Repro steps
Open Microsoft (R) F# Interactive version 12.5.0.0 for F# 7.0
Type in the following program
Expected behavior
FSI should evaluate and return 3.
Actual behavior
Error.
Known workarounds
Un-indent code before sending it to F# interactive.
Related information
The text was updated successfully, but these errors were encountered: