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

Exception Using Master release (mono) with emacs-fsharp #331

Closed
paytonrules opened this issue Jan 29, 2019 · 21 comments
Closed

Exception Using Master release (mono) with emacs-fsharp #331

paytonrules opened this issue Jan 29, 2019 · 21 comments
Assignees

Comments

@paytonrules
Copy link

I'm trying to build FSAutoComplete from master and use it with emacs-fsharp-mode, and it currently appears to throw an exception on loading fsharp files. I've got the exception information below:

Unexpected internal error. Please report at https://github.com/fsharp/FsAutoComplete/issues, attaching the exception information:
System.InvalidOperationException: object_op ---> System.EntryPointNotFoundException: SystemNative_RealPath
  at (wrapper managed-to-native) Interop+Sys.RealPath(string)
  at System.IO.CoreFX.FileSystemWatcher+RunningInstance.Start () [0x00000] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at System.IO.CoreFX.FileSystemWatcher.StartRaisingEvents () [0x00067] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at System.IO.CoreFX.FileSystemWatcher.StartRaisingEventsIfNotDisposed () [0x00019] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0001d] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at (wrapper remoting-invoke-with-check) System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents(bool)
  at System.IO.CoreFXFileSystemWatcherProxy+<>c.<StartDispatching>b__9_0 (System.IO.CoreFX.FileSystemWatcher internal_fsw, System.IO.FileSystemWatcher fsw) [0x00048] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action‘4[T1,T2,T3,T4] map_op, System.Action‘2[T1,T2] object_op, System.Object handle, System.Action‘2[T1,T2] cancel_op) [0x00184] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
   --- End of inner exception stack trace ---
  at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action‘4[T1,T2,T3,T4] map_op, System.Action‘2[T1,T2] object_op, System.Object handle, System.Action‘2[T1,T2] cancel_op) [0x001a6] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at System.IO.CoreFXFileSystemWatcherProxy.StartDispatching (System.Object handle) [0x00004] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at System.IO.FileSystemWatcher.Start () [0x0001b] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at System.IO.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0003d] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileSystemWatcher.set_EnableRaisingEvents(bool)
  at FsAutoComplete.Project..ctor (System.String projectFile, Microsoft.FSharp.Core.FSharpFunc‘2[T,TResult] onChange) [0x000e2] in <59ba4889f78c97f6a74503838948ba59>:0 
  at <StartupCode$FsAutoComplete-Core>[email protected] (Microsoft.FSharp.Core.Unit _arg1) [0x00001] in <59ba4889f78c97f6a74503838948ba59>:0 
  at <StartupCode$FsAutoComplete-Core>[email protected] (Microsoft.FSharp.Core.Unit unitVar) [0x00043] in <59ba4889f78c97f6a74503838948ba59>:0 
  at Microsoft.FSharp.Control.AsyncBuilderImpl+callA@851[b,a].Invoke (Microsoft.FSharp.Control.AsyncParams‘1[T] args) [0x00047] in <561d4e1d904cf4daa74503831d4e1d56>:0 
@luis3m
Copy link

luis3m commented Feb 3, 2019

I got exactly the same error. Any update @paytonrules?

@paytonrules
Copy link
Author

Not so far, but I haven't tried to debug much, at least not at the code level.

@enricosada
Copy link
Contributor

hi @paytonrules @luis3m

what OS and mono version?

@juergenhoetzel
Copy link
Contributor

I'm trying to build FSAutoComplete from master and use it with emacs-fsharp-mode, and it currently appears to throw an exception on loading fsharp files. I've got the exception information below:

I can't confirm this issue. I just did a build using make install ac_from_src=yes (fsharp/emacs-fsharp-mode#192).

  • Arch Linux
  • Mono 5.18.0

@paytonrules
Copy link
Author

I'm currently using the release @juergenhoetzel made this morning and it's working great. I had given up trying to self-build (which is why I never got back to you @enricosada ).

I suspect I wasn't including all the necessary assemblies when moving fsautocomplete in with the emacs plugin.

@enricosada
Copy link
Contributor

Np :)

I’ll check later with editor maintainers about how to allow easier testing of new FSAC builds

My idea is like:

  • get zip from ci/localbuild (both net/net core)
  • unzip in a dir and set an config/envvar to enable it

@TOTBWF
Copy link

TOTBWF commented Apr 19, 2019

I'm trying to build from master, also using emacs-fsharp-mode, and I'm getting the same error.

I'm using

  • OSX
  • mono 5.20

@enricosada enricosada reopened this Apr 19, 2019
@enricosada
Copy link
Contributor

enricosada commented Apr 19, 2019

@TOTBWF let me reopen this so.

I'll add now mono 5.20 to travis build matrix to check

@TOTBWF can you try run it in debug to check what is the issues? seems a file watcher failure, so dunno if will repro in ci

@enricosada enricosada self-assigned this Apr 19, 2019
@TOTBWF
Copy link

TOTBWF commented Apr 19, 2019

I think this may have to do with the difference in-between the version of emacs-fsharp-mode on elpa (which comes from https://github.com/rneatherway/emacs-fsharp-mode-bin) and what building from source results in.

@enricosada
Copy link
Contributor

that's strange, ideally emacs should:

  • or use FSAC as paket repo, and build LocalRelease and bundle built binaries
  • or use new releases. i think is fixed now after your PR

@juergenhoetzel
Copy link
Contributor

juergenhoetzel commented Apr 19, 2019

I'm trying to build from master, also using emacs-fsharp-mode, and I'm getting the same error.

You are trying to build fsautocomplete.exe (i.e. this project) and get an build error?

Or you can successfully build but get the same runtime-exception as the OP when using it from within Emacs/fsharp-mode ?

I think this may have to do with the difference in-between the version of emacs-fsharp-mode on elpa

I suspect you mean melpa? fsharp-mode isn't on elpa.

(which comes from https://github.com/rneatherway/emacs-fsharp-mode-bin) and what building from source results in.

Coul'd you verify fsharp-mode is using the correct version of fsautocomplete.exe via flycheck-verify-setup?

fsharp-mode on melpa ships fsautocomplete-0.36.0.zip (I need to update).

@TOTBWF
Copy link

TOTBWF commented Apr 19, 2019

I was working on emacs-fsharp-mode, using the ac_from_src option in the makefile. However, I tried using the version from melpa, and I got the same issue. As for flycheck-verify-setup, it does appear to be using the correct version. Output is here:

  fsharp-fsautocomplete
    - may enable:                  yes
    - predicate:                   nil
    - FSharp.AutoComplete process: mono /Users/reedmullanix/.emacs.d/.local/packages/elpa/fsharp-mode-20190304.1317/bin/fsautocomplete.exe
    - F# Project:                  None
    - Loaded Projects:             No projects loaded

  fsharp-fsautocomplete-lint
    - may enable:                  yes
    - predicate:                   nil
    - FSharp.AutoComplete process: mono /Users/reedmullanix/.emacs.d/.local/packages/elpa/fsharp-mode-20190304.1317/bin/fsautocomplete.exe
    - F# Project:                  None
    - Loaded Projects:             No projects loaded

@juergenhoetzel
Copy link
Contributor

I was working on emacs-fsharp-mode, using the ac_from_src option in the makefile. However, I tried using the version from melpa, and I got the same issue. As for flycheck-verify-setup, it does appear to be using the correct version. Output is here:

Would you mind sharing a minimal project designed to reproduce the error?

@TOTBWF
Copy link

TOTBWF commented Apr 19, 2019

It fails for every project, so any project ought to work.

@TOTBWF
Copy link

TOTBWF commented Apr 19, 2019

So it turns out that the version of mono installed via brew is subtly broken. Installing mono directly works.

@paytonrules
Copy link
Author

@TOTBWF Can you clarify how mono is broken on the brew install?

@kqr
Copy link

kqr commented May 21, 2019

@paytonrules do you have any suggestion on how I can check how it's broken? I had the same issue on Mono installed from homebrew, and managed to solve it by installing Mono from www.mono-project.com instead.

@paytonrules
Copy link
Author

No clue - I did the same thing. The versions appear to be the same.

@kqr
Copy link

kqr commented May 21, 2019

I have submitted this to Homebrew: Homebrew/homebrew-core#40138

If anyone knows how to reproduce in a more minimal example than the entire FSAC, please do contribute to that issue!

@wanderley
Copy link

I had the same problem in MacOS, and it was solved by installing mono from the official download page.

@Krzysztof-Cieslak
Copy link
Member

@TOTBWF managed to get latest master working with emacs lsp-mode - emacs-lsp/lsp-mode#880

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

8 participants