-
Notifications
You must be signed in to change notification settings - Fork 790
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
FCS 43.7.200 has odd behavior for modules with errors #14757
Comments
@nojaf @auduchinok does this ring a bell to you? I remember some changes around modules. |
@baronfel in case if I need to bisect it, what would you say will be the fastest way of doing it? Do you have a FCS api snippet by any chance? |
You should be able to debug it using the code string above and breakpointing here - VS has a codefix for interpolation as well (which is why I used it as the example). But the sample overall would be very simplistic:
|
Nope, sorry. Maybe it could be related to PRs like #14399 or #14434? |
Yes, it looks like the root cause as far as I can tell (idk how code fixes work, but second comment in that PR thread might explain how it broke it) |
The change that caused this was reverted (but not backported to 17.5). It should work in 17.6. |
While updating FsAutoComplete to support F# 7 I found that something fundamental has changed in the way at least anonymous modules are parsed in the presence of errors. This leads to a large number of parse-tree-based helper methods for powering codefixes no longer functioning, and so many of the tests FSAC has validating codefix behavior are now permanently broken. For the codefixes I've directly investigated that have parallels in the VS tooling in this repo, I saw the same behavior using a VS 17.5 preview (to ensure I was on a similar FCS). Let's dig into one CodeFix in particular - the one that converts erroring single-quote string interpolation into triple-quoted interpolation.
Repro steps
Provide the steps required to reproduce the problem:
let a = $":^) {if true then "y" else "n"} d"
y
.TryRangeOfStringInterpolationContainingPos
TryRangeOfStringInterpolationContainingPos
isn't finding an interpolated string expression, why?decls
in theSynModuleOrNamespace
:This is the case for many other codefixes, and they present the same way in VS as well.
The text was updated successfully, but these errors were encountered: