Skip to content
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

Anaylizer does not work in vscode #38

Closed
chengh42 opened this issue Jan 10, 2022 · 2 comments
Closed

Anaylizer does not work in vscode #38

chengh42 opened this issue Jan 10, 2022 · 2 comments

Comments

@chengh42
Copy link

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:

  • Created a file NPGSQL_FSHARP, where the connection string was placed, in the root directory
  • Installed NpgsqlFSharpAnalyzer in a specialized group Analyzers; checked that analyzer packages were downloaded physically in the packages/analyzers directory
  • Updated Ionide settings in .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).

Screenshot 2022-01-10 170201

Versions

  • FSharp.Analyzers.SDK v0.10.1
  • NpgsqlFSharpAnalyzer v3.26.1
  • Ionide-fsharp v5.10.2

dotnet --info

.NET SDK (reflecting any global.json):
 Version:   6.0.100     
 Commit:    9e8b04bbff  

Runtime Environment:    
 OS Name:     Windows   
 OS Version:  10.0.19043
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.100\

Host (useful for support):
  Version: 6.0.0
  Commit:  4822e3c3aa

.NET SDKs installed:
  3.1.405 [C:\Program Files\dotnet\sdk]
  5.0.100-rc.2.20479.15 [C:\Program Files\dotnet\sdk]
  5.0.201 [C:\Program Files\dotnet\sdk]
  6.0.100 [C:\Program Files\dotnet\sdk]
@chengh42
Copy link
Author

... just found in the Output terminal the error messages, which seem to be the same case as reported in #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 [email protected](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!

@chengh42
Copy link
Author

Duplicate of #37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant