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

Autocomplete is not working #235

Open
anquegi opened this issue Dec 22, 2019 · 5 comments
Open

Autocomplete is not working #235

anquegi opened this issue Dec 22, 2019 · 5 comments
Assignees

Comments

@anquegi
Copy link

anquegi commented Dec 22, 2019

Description

I get this error on messages:

Company: An error occurred in auto-begin
Company: backend company-capf error "jsonrpc-error: "request id=17 failed:", (jsonrpc-error-code . -32603), (jsonrpc-error-message . "no type check results"), (jsonrpc-error-data)" with args (candidates Newt)

Repro steps

THis is my configuration, I'm using MAC OS X catalina and dotnet 3.1

;;; my-fsharp.el --- fsharp configuration -- lexical-binding: t; --
;;; Commentary:
;;
;;; Code:
(use-package fsharp-mode
:defer t
:ensure t)
(add-to-list 'auto-mode-alist '("\.fs[iylx]?$" . fsharp-mode))

(require 'eglot-fsharp)

(setq inferior-fsharp-program "dotnet fsi")

(require 'dotnet)
(add-hook 'fsharp-mode-hook 'dotnet-mode)

(provide 'my-fsharp)

;;; my-fsharp.el ends here

Expected behavior

After M-x eglot, it start well ,

[eglot] Connected! Server EGLOT (FSNetCore/fsharp-mode)' now managing fsharp-mode' buffers in project `FSNetCore'.

I'm creating the project from here https://docs.microsoft.com/es-es/dotnet/fsharp/get-started/get-started-command-line

Actual behavior

but then start error with autocomplete

Related information

  • Operating system

Mac os catalina 10.15.2
learn/functional-programming/FSNetCore via .NET 3.1.100
➜ dotnet --version
3.1.100

  • Emacs version

27

@juergenhoetzel
Copy link
Collaborator

Did you restore your project: dotnet restore?

Could you provide the content of your *EGLOT (PROJECT_NAME/fsharp-mode) events* buffer?

@anquegi
Copy link
Author

anquegi commented Dec 22, 2019

Thanks for the quick reply. after restoring it worked better. but I get the error in this file

module Library

open Newtonsoft.Json

let getJsonNetJson value =
sprintf "I used to be %s but now I'm %s thanks to JSON.NET!" value (JsonConvert.SerializeObject(value))

Getting this error in messages.


Company: An error occurred in auto-begin
Company: backend company-capf error "jsonrpc-error: "request id=5 failed:", (jsonrpc-error-code . -32603), (jsonrpc-error-message . "no type check results"), (jsonrpc-error-data)" with args (candidates mod)
No completion found
[eglot] val sprintf: 
(...truncated. Full help is in `*eglot-help for sprintf*')
[eglot] val sprintf: 
(...truncated. Full help is in `*eglot-help for sprintf*')
Mark set
Auto-saving...done
[eglot] type JsonConvert
(...truncated. Full help is in `*eglot-help for JsonConvert*')
[eglot] JsonConvert.SerializeObject(value: obj) : string
(...truncated. Full help is in `*eglot-help for value*')
A

The buffer you mentioned is attached in a file
eglot-events-buffer.txt
:

@juergenhoetzel
Copy link
Collaborator

I can reproduce the issue. Adding -v to the fsautocomplete.dll parameters reveals:

[Checker] ParseAndCheckFileInProject - /home/juergen/fsharp/FSNetCore/src/Library/Library.fs completed with errors [unknown (1,1)-(1,1) parameter error Assembly reference 'mscorlib.dll' was not found or is invalid

Related Ionideissue: ionide/ionide-vscode-fsharp#398

@juergenhoetzel juergenhoetzel self-assigned this Oct 4, 2020
@serezlan
Copy link

serezlan commented Dec 8, 2021

Hello,

I'm experiencing this problem as well. I have restore my project and use the latest package. Please advice.

@serezlan
Copy link

serezlan commented Dec 8, 2021

Attached is my eglot buffer output
eglot.txt

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

3 participants