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

fsautocomplete is started with inexisting --background-service-enabled #66

Closed
rbauduin opened this issue Apr 2, 2023 · 7 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@rbauduin
Copy link

rbauduin commented Apr 2, 2023

Describe the bug
fsautocomplete is started with inexisting --background-service-enabled which appears to be an old option that has been removed

To Reproduce
Steps to reproduce the behaviour:

  1. install ionide-vim in a fresh neovim install
  2. open a .fs file
  3. Look into ~/.local/state/nvim/lsp.log
  4. See error Unrecognized command or argument '--background-service-enabled'
    An error is also reported in the editor.

Expected behaviour
fsautocomplete is started successfully with default config

Environment (please complete the following information):

  • OS: GNU/Linux (Ubuntu)
  • Vim / Neovim version: NVIM v0.9.0-dev-1291+gbad218cd6
  • dotnet SDK version: 6.0.407
  • fsautocomplete: $ fsautocomplete --version
    0.59.4+a8b489d365c432aff1d83e0f4cfe275ce3d37878

It seems this is the problematic config: https://github.com/ionide/Ionide-vim/blob/master/autoload/fsharp.vim#L237

@rbauduin rbauduin added the bug Something isn't working label Apr 2, 2023
@cannorin
Copy link
Member

cannorin commented Apr 4, 2023

Related: #63

In addition to this, I suspect that there was a change in the schema of FSAC's configuration JSON, and Ionide-vim won't work with the latest FSAC just by removing the --background-service-enabled option.

I'll take a look at this later this week, but feel free to open a PR if you managed to fix the issue at your end.

@cannorin
Copy link
Member

cannorin commented Apr 4, 2023

Also, downgrading FSAC to v0.58.0 may workaround the issue as my local FSAC is still v0.58.0 and it's working for me. v0.58.{1,2,3,4} might also work, but I haven't tested.

@rbauduin
Copy link
Author

rbauduin commented Apr 4, 2023

It seems to load correctly when I set

let g:fsharp#fsautocomplete_command =  ['fsautocomplete']

in my init.vim. :FSharpShowLoadedProjects lists the correct .fsproj files loaded. But I haven't tested further, eg the lsp features, which I still need to discover.
This is with fsautocomplete

0.59.4+a8b489d365c432aff1d83e0f4cfe275ce3d37878

@baronfel
Copy link

baronfel commented Apr 4, 2023

@cannorin/@rbaudin if you wouldn't mind, could you clone and try to use ionide/FsAutoComplete#1096 before I merge it to see if it fixes the issues you see?

@rbauduin
Copy link
Author

rbauduin commented Apr 5, 2023

@cannorin/@rbaudin if you wouldn't mind, could you clone and try to use fsharp/FsAutoComplete#1096 before I merge it to see if it fixes the issues you see?

I tried to build it (Linux, dotnet 6) but it failed:

/usr/share/dotnet/sdk/6.0.407/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(112,5): error NETSDK1152: Found multiple publish output files with the same relative path: /tmp/FsAutoComplete/src/FsAutoComplete.BackgroundServices/bin/Release/net5.0/fsautocomplete.backgroundservices.runtimeconfig.json, /tmp/FsAutoComplete/src/FsAutoComplete/../FsAutoComplete.BackgroundServices/bin/Release/net5.0/fsautocomplete.backgroundservices.runtimeconfig.json. [/tmp/FsAutoComplete/src/FsAutoComplete/FsAutoComplete.fsproj]
NETSdkWarning: /usr/share/dotnet/sdk/6.0.407/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'net5.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy.
NETSdkError: /usr/share/dotnet/sdk/6.0.407/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(112,5): error NETSDK1152: Found multiple publish output files with the same relative path: /tmp/FsAutoComplete/src/FsAutoComplete.BackgroundServices/bin/Release/net5.0/fsautocomplete.backgroundservices.runtimeconfig.json, /tmp/FsAutoComplete/src/FsAutoComplete/../FsAutoComplete.BackgroundServices/bin/Release/net5.0/fsautocomplete.backgroundservices.runtimeconfig.json.
Finished (Failed) 'DotNet:publish' in 00:00:19.9821860
Finished (Failed) 'LocalRelease' in 00:00:19.9832977

---------------------------------------------------------------------
Build Time Report
---------------------------------------------------------------------
Target                      Duration
------                      --------
Restore                     00:00:04.5958695
ReplaceFsLibLogNamespaces   00:00:00.0151029
LocalRelease                00:00:19.9831978   (Exception of type 'Fake.DotNet.MSBuildException' was thrown.)
ReleaseArchive              00:00:00           (skipped)
Total:                      00:00:24.6386065
Status:                     Failure
---------------------------------------------------------------------

Not sure why there's a reference to a dotnet 5. I'm not sure I want to investigate this much further ;-)
Especially as the fix should probably be in Ionide-vim too anyway, as it uses a deprecated option.

@cannorin
Copy link
Member

cannorin commented Apr 8, 2023

Got the same compilation error on my end too.

I also tried the latest FSAC with the --background-service-enabled option removed, but I didn't see any problem with my configuration. Some options might be broken, but I think we can just remove the option and see if someone (including future me) stumbles on some problematic options.

@cannorin
Copy link
Member

cannorin commented Apr 8, 2023

Removed in d41ef95.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants