You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run M-x eglot in a buffer where fsharp-mode is enabled, an zip archive containing the FsAutoComplete distribution files is downloaded and unpackaged into ~/.emacs.d/FsAutoComplete. Then eglot start the LSP server by running the equivalent of mono /home/.../.emacs.d/.emacs.d/FsAutoComplete/netframework/fsautocomplete.exe --background-service-enabled. This last command is returned by eglot-fsharp.
is forwarded to the LSP server (as shown in the buffer *EGLOT (test/fsharp-mode) events*), and the server respond with the following error:
[server-reply] (id:1) ERROR Tue Nov 17 13:51:44 2020:
(:jsonrpc "2.0" :id 1 :error
(:code -32603 :message "System.TypeInitializationException: The type initializer for
'Microsoft.Data.Sqlite.SqliteConnection' threw an exception. --->
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.DllNotFoundException:
e_sqlite3 assembly:<unknown assembly> type:<unknown type>
member:(null)\n at (wrapper managed-to-native)
SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods.sqlite3_libversion_number()\n
at
SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number
() [0x00000] in <60b9636eddae467abf835d7bde5925d6>:0 \n at
SQLitePCL.raw.SetProvider (SQLitePCL.ISQLite3Provider imp) [0x00008]
in <4a65135bb20943459d36511273e609dc>:0 \n at
SQLitePCL.Batteries_V2.Init () [0x00005] in
<635106fb54074b6697e6f94014d8533a>:0 \n at (wrapper
managed-to-native)
System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)\n
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj,
System.Reflection.BindingFlags
invokeAttr,
System.Reflection.Binder
binder,
System.Object[]
parameters,
System.Globalization.CultureInfo
culture)
[0x0007c] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 \n --- End of
inner exception stack trace ---\n at
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj,
System.Reflection.BindingFlags
invokeAttr,
System.Reflection.Binder
binder,
System.Object[]
parameters,
System.Globalization.CultureInfo
culture)
[0x0009a] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 \n at
System.Reflection.MethodBase.Invoke (System.Object obj,
System.Object[]
parameters)
[0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 \n at
Microsoft.Data.Sqlite.Utilities.BundleInitializer.Initialize ()
[0x0002f] in <b46e232ade014524baa458345f270c50>:0 \n at
Microsoft.Data.Sqlite.SqliteConnection..cctor () [0x00000] in
<b46e232ade014524baa458345f270c50>:0 \n --- End of inner exception
stack trace ---\n at (wrapper managed-to-native)
System.Object.__icall_wrapper_mono_generic_class_init(intptr)\n at
SymbolCache+PersistenCacheImpl.initializeCache (System.String dir)
[0x00049] in <56a19b898b41d0b0a931c1ad7999f115>:0 \n at
FsAutoComplete.Commands`1[analyzer].StartBackgroundService
(Microsoft.FSharp.Core.FSharpOption`1[T] workspaceDir) [0x00016] in
<56a19b898b41d0b0a931c1ad7999f115>:0 \n at
[email protected] (Microsoft.FSharp.Core.Unit
unitVar) [0x00033] in
<c54a29a614138c8bdb825198c178886d>:0 \n at
Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult]
(Microsoft.FSharp.Control.AsyncActivation`1[T] ctxt, TResult result1,
Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]
part2) [0x00005] in
<039b17603f7a807e0eeaa652dc64c784>:0 \n at
Microsoft.FSharp.Control.Trampoline.Execute
(Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] firstAction) [0x00020]
in <039b17603f7a807e0eeaa652dc64c784>:0 "))
(roughly reformatted for lisibility), and then the server crashes. Note that the foder ~/.emacs.d/FsAutoComplete/netframework/ contains e_sqlite3.dll, as well as SQLitePCLRaw.provider.e_sqlite3.dll.
Repro steps
Given the relevent configuration in ~/.emacs.d/init.el given below, open a .fs file.
Expected behavior
FsAutoComplete.exe should start successfully, and not crash, failing to load a DLL related to e_sqlite3.dll.
Actual behavior
FsAutoComplete.exe raise an exception while handling the first json-rpc request it receive. Error message talks about System.DllNotFoundException: e_sqlite3. The error message fills the minibuffer.
Known workarounds
None that I know of.
Related information
Operating system: Ubuntu 20.04, running in WSL on Windows 10.0
Mono is considered unsupported (for fsautocomplete). Upstream quote
FsAutoComplete can run on .NET/mono or .NET Core. We highly recommend using .Net Core version of FSAC as we plan to remove "full framework" version soon - read more
We should remove Mono support in eglot-fsharp to prevent starting a broken LSP-server in the first place.
juergenhoetzel
changed the title
FsAutoComplete raise an exception after first request
FsAutoComplete (mono) raise an exception after first request
Mar 30, 2021
Description
When I run
M-x eglot
in a buffer wherefsharp-mode
is enabled, an zip archive containing theFsAutoComplete
distribution files is downloaded and unpackaged into~/.emacs.d/FsAutoComplete
. Theneglot
start the LSP server by running the equivalent ofmono /home/.../.emacs.d/.emacs.d/FsAutoComplete/netframework/fsautocomplete.exe --background-service-enabled
. This last command is returned byeglot-fsharp
.After the connection is established, the request
is forwarded to the LSP server (as shown in the buffer
*EGLOT (test/fsharp-mode) events*
), and the server respond with the following error:(roughly reformatted for lisibility), and then the server crashes. Note that the foder
~/.emacs.d/FsAutoComplete/netframework/
containse_sqlite3.dll
, as well asSQLitePCLRaw.provider.e_sqlite3.dll
.Repro steps
~/.emacs.d/init.el
given below, open a.fs
file.Expected behavior
FsAutoComplete.exe
should start successfully, and not crash, failing to load a DLL related to e_sqlite3.dll.Actual behavior
FsAutoComplete.exe
raise an exception while handling the first json-rpc request it receive. Error message talks aboutSystem.DllNotFoundException: e_sqlite3
. The error message fills the minibuffer.Known workarounds
None that I know of.
Related information
FsAutoComplete 0.41.1 (git sha 7016e936b45e0354323a7d8f153f64f14522c054)
GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.14) of 2020-03-26, modified by Debian
.emacs.d/init.el
:The text was updated successfully, but these errors were encountered: