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

Cant start coc-fsharp #6

Closed
vushu opened this issue Jul 9, 2019 · 14 comments
Closed

Cant start coc-fsharp #6

vushu opened this issue Jul 9, 2019 · 14 comments

Comments

@vushu
Copy link

vushu commented Jul 9, 2019

I not sure what happened but
here is CocInfo


## versions

vim version: NVIM v0.3.1
node version: v8.10.0
coc.nvim version: 0.0.72-8c7241d7e3
term: xterm-kitty
platform: linux

## Messages

## Output channel: highlight
[Info  - 11:09:31] Highlight server running in node v8.10.0


## Output channel: fsharp
Listening on stdin

Couldn't find System.ComponentModel.Composition.dll in /home/vushu/.config/coc/extensions/node_modules/coc-fsharp/out/server/linux-x64
Add workspace root /home/vushu/coding/fsharp/sharptd
output: 2.1.700 [/usr/share/dotnet/sdk]
output: 2.2.300 [/usr/share/dotnet/sdk]
dotnet pack folders: ["/usr/share/dotnet/packs"]
New configuration {
  "trace": {
    "server": "off"
  },
  "project": {
    "define": [],
    "otherFlags": [],
    "includeCompileBefore": false
  },
  "codelens": {
    "references": true
  }
}
analyzeLater: /home/vushu/coding/fsharp/sharptd/build.fsx
analyzeLater: /home/vushu/coding/fsharp/sharptd/sharptd.fsproj
analyzeLater: /home/vushu/coding/fsharp/sharptd/Source/test.fsx
No cracked project references RenderSystem.fs, looking at uncracked projects...
The text of sharptd.fsproj contains the string 'RenderSystem.fs', cracking
Analyzing sharptd.fsproj
Failed to build sharptd.fsproj: Could not load project /home/vushu/coding/fsharp/sharptd/sharptd.fsproj in ProjectCollection. Available tools: ["/usr/share/dotnet/sdk/2.2.300 "]. Message: The SDK 'Microsoft.NET.Sdk' specified could not be found.
--------- Project references -----------------
---------- otherProjectReferences ----------------
----------- packageReferences ---------------
----------- directReferences ---------------
----------- systemReferences ---------------
----------- ConditionalCompilationDefines ---------------
----------- OtherCompilerFlags ---------------
--------------------------
/home/vushu/coding/fsharp/sharptd/sharptd.fsproj: 
  ProjectFileName: "/home/vushu/coding/fsharp/sharptd/sharptd.fsproj"
  SourceFiles: [||]
  ReferencedProjects: []
  OtherOptions: [|"--noframework"|]
  LoadTime: 7/9/19 10:57:52 AM
  ExtraProjectInfo: <null>
  IsIncompleteTypeCheckEnvironment: false
  OriginalLoadReferences: []
  ExtraProjectInfo: <null>
  Stamp: <null>
  UnresolvedReferences: <null>
  UseScriptResolutionRules: false
No cracked project references RenderSystem.fs, looking at uncracked projects...
Autocompleting at /home/vushu/coding/fsharp/sharptd/Source/Systems/RenderSystem.fs(27,5)
No cracked project references RenderSystem.fs, looking at uncracked projects...
Finished typecheck, looking for completions...
Check failed, ignored 1 errors
No cracked project references RenderSystem.fs, looking at uncracked projects...
Autocompleting at /home/vushu/coding/fsharp/sharptd/Source/Systems/RenderSystem.fs(27,18)
No cracked project references RenderSystem.fs, looking at uncracked projects...
Finished typecheck, looking for completions...
Check failed, ignored 1 errors
No cracked project references RenderSystem.fs, looking at uncracked projects...



@yatli
Copy link
Member

yatli commented Jul 11, 2019

the project file is not parsing correctly. is it working on a simpler project?

@vushu
Copy link
Author

vushu commented Jul 11, 2019

I have this problem with any fsharp project, not sure why how this happened, maybe after I have updated to dotnet core 2.2.

@elafarge
Copy link

elafarge commented Jul 12, 2019

👍 I'm getting the very same errors in :CocInfo on a very simple project.

Steps to reproduce:

  • create a brand new hello world:qall dotnet new console -lang F# -o src/MyConsoleApp).
  • then nvim src/MyConsoleApp/Program.fs

CocList diagnostics shows

1 src/MyConsoleApp/Program.fs:1:1 Error [fsharp] No .fsproj or .fsx file references /redacted/src/MyConsoleApp/Program.fs

Is there any way I could help figure out why the project file isn't parsing correctly ?

@yatli
Copy link
Member

yatli commented Jul 12, 2019

I think I have some clue now.
It's about msbuild not finding the tool set.
I'll see if I can repro this problem.

@yatli
Copy link
Member

yatli commented Jul 12, 2019

Hang on.

@yatli
Copy link
Member

yatli commented Jul 13, 2019

Ok I can repro this on WSL.
Looking into it.

@yatli yatli closed this as completed in f8f7cb3 Jul 13, 2019
@yatli
Copy link
Member

yatli commented Jul 13, 2019

f8f7cb3#diff-13c71099093e892021cc44da994dc763R202

They decided to add a space to dotnet --info in 2.2

@yatli
Copy link
Member

yatli commented Jul 13, 2019

@elafarge @vushu pushed out 0.1.52 on npm. Feel free to reopen if the problem persists.

@vushu
Copy link
Author

vushu commented Jul 14, 2019

Now im getting this error:

## versions

vim version: NVIM v0.3.1
node version: v8.10.0
coc.nvim version: 0.0.72-b24601e6af
term: xterm-kitty
platform: linux

## Messages
[coc.nvim] Error on active extension coc-fsharp: TypeError: mode must be an integer


@yatli
Copy link
Member

yatli commented Jul 14, 2019

@vushu I'm not sure what happened. Any detailed logs?

@yatli yatli reopened this Jul 14, 2019
@vushu
Copy link
Author

vushu commented Jul 14, 2019

I only get the info above when doing CocInfo

I first did a CocUninstall coc-fsharp
then CocInstall coc-fsharp
then the error occurs when opening just a simple fsharp project.

in my .config/coc/extensions/node_modules/coc-sharp/package.json I am using your latest version 0.1.52:

{
    "name": "coc-fsharp",
    "displayName": "F# Language Server for coc.nvim",
    "description": "F# Language Support using FSharp Compiler Services",
    "author": "Yatao Li",
    "license": "MIT",
    "icon": "Icon512.png",
    "version": "0.1.52",
    "publisher": "yatli",
    "repository": {
        "type": "git",
        "url": "https://github.com/yatli/fsharp-language-server"
    },
    "engines": {
        "coc": ">=0.0.71"
    },
    "keywords": [
        "fsharp",
        "coc.nvim",
        "dotnet",
        ".NET Core",
        ".NET"
    ],
    "categories": [
        "Programming Languages",
        "Linters",
        "coc.nvim"
    ],
    "activationEvents": [
        "onLanguage:fsharp"
    ],
    "main": "out/client/extension.js",
    "files": [
        "out",
        "syntaxes"
    ],
    "contributes": {
        "languages": [
            {
                "id": "fsharp",
                "aliases": [
                    "F#",
                    "FSharp",
                    "fsharp"
                ],
                "extensions": [
                    ".fs",
                    ".fsx",
                    ".fsi",
                    ".fsl",
                    ".fsy"
                ],
                "configuration": "syntaxes/fsharp.configuration.json"
            }
        ],
        "grammars": [
            {
                "language": "fsharp",
                "scopeName": "source.fsharp",
                "path": "syntaxes/fsharp.json"
            },
            {
                "language": "fsharp",
                "scopeName": "source.fsharp.fsx",
                "path": "syntaxes/fsharp.fsx.json"
            },
            {
                "language": "fsharp",
                "scopeName": "source.fsharp.fsi",
                "path": "syntaxes/fsharp.fsi.json"
            }
        ],
        "configuration": {
            "type": "object",
            "title": "FSharp configuration",
            "properties": {
                "fsharp.trace.server": {
                    "scope": "application",
                    "type": "string",
                    "enum": [
                        "off",
                        "messages",
                        "verbose"
                    ],
                    "default": "off",
                    "description": "Traces the communication between VSCode and the language server."
                },
                "fsharp.project.define": {
                    "scope": "resource",
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "default": [],
                    "description": "Specifies macro definitions for a F# project."
                },
                "fsharp.project.otherFlags": {
                    "scope": "resource",
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "default": [],
                    "description": "Specifies other fsc flags."
                },
                "fsharp.project.includeCompileBefore": {
                    "scope": "resource",
                    "type": "boolean",
                    "default": false,
                    "description": "Treat <CompileBefore ../> items in the project as source files."
                },
                "fsharp.codelens.references": {
                    "scope": "resource",
                    "type": "boolean",
                    "default": true,
                    "description": "Display the number of references for the symbols. Uses more resources and may crash coc.nvim for very large projects."
                }
            }
        }
    },
    "scripts": {
        "compile": "tsc -p ./",
        "watch": "tsc -watch -p ./"
    },
    "extensionDependencies": [],
    "dependencies": {
        "vscode-jsonrpc": "*",
        "vscode-languageserver-protocol": "*"
    },
    "devDependencies": {
        "@types/node": "^10.3.3",
        "typescript": "^3.0.3",
        "coc.nvim": "^0.0.71"
    }
}

@yatli
Copy link
Member

yatli commented Jul 14, 2019

uh oh I think I see what happened
It's about fs.chmodSync

@yatli
Copy link
Member

yatli commented Jul 14, 2019

try 0.1.53 :)

@vushu
Copy link
Author

vushu commented Jul 14, 2019

It works now, thank you :)

@yatli yatli closed this as completed Jul 14, 2019
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