Skip to content

F# open Codefix does not work if file contains only one line #9757

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

Closed
Tracked by #15408
vsfeedback opened this issue Jul 22, 2020 · 1 comment
Closed
Tracked by #15408

F# open Codefix does not work if file contains only one line #9757

vsfeedback opened this issue Jul 22, 2020 · 1 comment
Labels
Area-LangService-CodeFixes Code fixes associated with diagnostics

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


In Version 16.5.0 Preview 1.0, if you try to apply a suggested 'open' Codefix in a file that contains only one line, it does not actually apply the Codefix. If you however add an empty line before or after the line where the codefix is offered, it works as expected. This applies to .fs and .fsx files both.

Steps to reproduce:

  1. Create any F# Project
  2. Create a new file (either .fs or .fsx)
  3. Write a single line that provokes an 'open' Codefix, such as let test = Console.WriteLine()
  4. Try to apply one of the offered 'open' Codefixes, both will fail
  5. Add an empty line before or after the line and both will work as expected

Possible workaround is to just add an empty line before or after as this only seems to happen with files that contain exactly one line only.


Original Comments

Feedback Bot on 12/30/2019, 01:53 AM:

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.

Feedback Bot on 2/6/2020, 07:32 PM:

I have detected that for the last 35 days, this issue didn't have much product team activity and a very small amount of new votes or comments. Based on this, its severity, and affected area, it’s my experience that this issue is very unlikely to be fixed.

Feedback Bot on 3/13/2020, 07:49 PM:

Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2019#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We’ll keep you posted on any updates to this feedback.


Original Solutions

(no solutions)

@cartermp
Copy link
Contributor

This one was fixed - dupe of #9167

@psfinaki psfinaki added the Area-LangService-CodeFixes Code fixes associated with diagnostics label Jun 15, 2023
@psfinaki psfinaki mentioned this issue Jun 15, 2023
85 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-LangService-CodeFixes Code fixes associated with diagnostics
Projects
None yet
Development

No branches or pull requests

3 participants