-
Notifications
You must be signed in to change notification settings - Fork 156
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
Latest fcs #1122
Latest fcs #1122
Conversation
Looks like StructuredLogging versioning mismatches - can you bump that dependency and rerun? |
src/FsAutoComplete.Core/Lexer.fs
Outdated
@@ -48,7 +48,7 @@ module Lexer = | |||
|> Seq.choose (fun s -> if s.StartsWith "--define:" then Some s.[9..] else None) | |||
|> Seq.toList | |||
|
|||
let sourceTokenizer = FSharpSourceTokenizer(defines, Some "/tmp.fsx") | |||
let sourceTokenizer = FSharpSourceTokenizer(defines, Some "/tmp.fsx", None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should check if we have langVersion available via the project options - we should try to provide it here if possible. This can be a follow-up issue if you don't want to tackle it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I got it.
Some tests are failing because properties now have a symbol for both getters and setters. The code on the main branch currently finds a single symbol (the getter), found usages of that and thus does not return the code action. In this PR, the setter symbol was returned and does not contain any usage. See dotnet/fsharp#15213 why properties now have two symbols. In order to get both symbols, dotnet/fsharp#15285 was added and I think some of the code will need to be extended to take this into account. //cc @dawedawe |
@@ -115,7 +115,7 @@ let fix (getParseResultsForFile: GetParseResultsForFile) : CodeFix = | |||
let commentsAndPos = tryGetCommentsAndSymbolPos parseAndCheck.GetAST fcsPos | |||
|
|||
match commentsAndPos with | |||
| Some(docLines, docRange, symbolPos) -> | |||
| Some(docLines, docRange, symbolPos, isAutoProperty) -> | |||
let lineStrOfSymbol = _sourceText.GetLine symbolPos |> Option.defaultValue "" | |||
let signatureData = parseAndCheck.TryGetSignatureData symbolPos lineStrOfSymbol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The signatureData for the setter was returned here.
This does indeed have a member parameter.
no XML parameter section for AutoProperties
…Or is it? Meanwhile, adjust the reflection code to the changes in FCS.
Adjust reflection code to changes i FCS
Something seems to be pretty wrong in find all references now for some reason :( |
I think that's caused by failing reflection code. I tried to fix that in ionide/proj-info#192 |
- Update to latest FCS beta package
Update to Ionide.ProjInfo nightly and latest FCS beta
@baronfel could you re-run that failing Mac build? This might be a hiccup... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks so much for this! Left some feedback.
src/FsAutoComplete.Core/Commands.fs
Outdated
symbolUse | ||
} | ||
|
||
let symbolUseWorkspace2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep a separate implementation or could you leave a comment for why there's a second implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, we still mean to clean that up. Not sure if we should rename or consider moving everything to the v2 implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a version that uses v2 for everything and takes the simplest approach 😏
nojaf#5
@TheAngryByrd Let me know, if you prefer a version that keeps the symbol(s) in it's return type.
consolidate to use new TryGetSymbolUses
Oh hey - we're green! Thanks folks! |
WHAT
🤖 Generated by Copilot at b09798e
Updated the code base to use the latest F# compiler service API, which has some breaking changes in the syntax tree representation and the tokenizer. Fixed the code fixes and the untyped AST utilities to work with the new API.
🤖 Generated by Copilot at b09798e
🔄🐛🚀
WHY
HOW
🤖 Generated by Copilot at b09798e
paket.dependencies
to use the latest dotnet7 feed and prerelease (link, link)InlayHints.fs
andUnionPatternMatchCaseGenerator.fs
to use the named field elementPats instead of the deprecated tuple syntax (link, link)Lexer.fs
to pass an optional argument for the target framework, which is required by the latest version of the F# compiler service (link)UntypedAstUtils.fs
to use the named fields instead of the deprecated tuple syntax, and remove the SynSimplePats.Typed case, which is no longer used by the F# compiler service (link, link, link)AddExplicitTypeAnnotation.fs
, as it is no longer needed by the logic of the code fix (link)Contains API changes for the latest FCS (43.7.400-preview.23319.6)