Closed chengh42 closed 2 years ago
... just found in the Output terminal the error messages, which seem to be the same case as reported in https://github.com/Zaid-Ajaj/Npgsql.FSharp.Analyzer/issues/37 :
[Error - 5:29:54 PM] Request textDocument/documentHighlight failed.
Message: No symbol information found
Code: -32603
[17:29:54.616 ERR] [Analyzers] Analyzer Npgsql.FSharp.Analyzer errored while processing c:\mydojo\codingDojo\NpgsqlFSharp\Program.fs: Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.MissingMethodException: Method not found: 'ParsedInput FSharp.Analyzers.SDK.Context.get_ParseTree()'.
at Npgsql.FSharp.Analyzers.SqlAnalyzer.sqlAnalyzerContext(Context ctx)
at Npgsql.FSharp.Analyzers.SqlAnalyzer.queryAnalyzer(Context ctx) in C:\projects\NpgsqlFSharpAnalyzer\src\NpgsqlFSharpAnalyzer\SqlAnalyzer.fs:line 40
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at FSharp.Analyzers.SDK.Client.getAnalyzerFromMemberInfo@39-1.Invoke(Context ctx) in /Users/chethusk/oss/FSharp.Analyzers.SDK/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fs:line 39
at FSharp.Analyzers.SDK.Client.runAnalyzersSafely@117.Invoke(Tuple`2 tupledArg) in /Users/chethusk/oss/FSharp.Analyzers.SDK/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fs:line 120
... sorry, did not check thoroughly beforehand!
Duplicate of #37
Describe the bug
Hi, we would love to use the Analyzer along with Npgsql.FSharp for query syntax check, however cannot have it work following the instructions. We are using vscode with the Ionide-fsharp extension.
Attaching the code: NpgsqlFSharp.zip ... where we've checked the following:
NPGSQL_FSHARP
, where the connection string was placed, in the root directoryNpgsqlFSharpAnalyzer
in a specialized group Analyzers; checked that analyzer packages were downloaded physically in thepackages/analyzers
directory.vscode/settings.json
Expected behavior
Edit the query with invalid table name etc., expected to get error highlighting; but there were no query syntax check (see screenshot below).
Versions
dotnet --info