-
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# Error When Adding suggested open is added on top of namespace and this breakes compilation #12083
Comments
To me it's not a big issue but it is annoying. |
This only reproduces when namespace in on the 1st line of the document, because of this ( fsharp/src/fsharp/service/ServiceParsedInputOps.fs Lines 1665 to 1677 in 76e65ac
I'm not entirely sure why this is the logic, maybe @cartermp remembers? |
I didn't write that code so I'm not sure. I know that it was a bit tricky to debug though. Shouldn't the code also try to insert an If so I also think this should really be bumped down in priority, and it's also not a regression |
It first tries to determine where to insert the open, for that it either I have added the check if we are on the first line - if it's the |
Aha! I think this caused some regressions for opens in FSAC as well during our FCS 41 update! We also try to do the things that @cartermp mentioned, to better or worse success. |
It does try to align with existing opens, later on, after it calculates the line to insert to first time. |
This is my version of the fix: https://github.com/dotnet/fsharp/pull/12443/files. Probably could be simplified with removing the codnition alltogether.
|
This issue has been moved from a ticket on Developer Community.
[severity:It's more difficult to complete my work]
The suggestion for adding the open breakes the compilation as open is added on top, before naspace declaration.
Original Comments
Feedback Bot on 6/9/2021, 07:43 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: