code-d icon indicating copy to clipboard operation
code-d copied to clipboard

Autocomletition doesn't work with non-std modules using vibe-d 0.9.5-beta.2

Open wusikijeronii opened this issue 3 years ago • 0 comments

Hello, After some time, autocompiletition stops working in VS code. I use Ubuntu server over SSH. This one works with packages from stdlib, but with my custom modules and modules added by DUB, it doesn't work.

Logs:

2022-07-12T09:02:49.814 [trace] complete.d:763:provideSnippetComplete got 0 snippets fitting in this context: []
[Trace - 9:02:49 AM] Received response 'textDocument/completion - (22)' in 49ms.
Result: {
    "isIncomplete": false,
    "items": []
}


[Trace - 9:02:49 AM] Sending request 'textDocument/codeAction - (23)'.
Params: {
    "textDocument": {
        "uri": "file:///home/server/storageweb/source/backend/app.d"
    },
    "range": {
        "start": {
            "line": 16,
            "character": 11
        },
        "end": {
            "line": 16,
            "character": 11
        }
    },
    "context": {
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 16,
                        "character": 11
                    },
                    "end": {
                        "line": 16,
                        "character": 11
                    }
                },
                "message": "Expected `;` instead of `void`",
                "code": "",
                "severity": 1,
                "source": "DScanner"
            }
        ]
    }
}


2022-07-12T09:02:49.916 [trace] serverbase.d:175:__lambda17 Calling provideCodeActions
2022-07-12T09:02:49.916 [trace] types.d:503:activeInstance Setting active instance to /home/server/storageweb.
2022-07-12T09:02:49.916 [info] code_actions.d:206:addDScannerDiagnostics Diagnostic: Diagnostic([Position(16, 11), Position(16, 11)], error, "", DScanner, "Expected `;` instead of `void`", null(DiagnosticRelatedInformation[]), null(DiagnosticTag[]))
[Trace - 9:02:49 AM] Received response 'textDocument/codeAction - (23)' in 13ms.
Result: []

OS: Ubuntu 22.04 LTS VS code: 1.69.0 code-d: 0.23.2 dmd: v2.100.0 dub: 1.29.0

Init logs (too much) - link to pastebin

In the logs I see code-d uses LDC instead of DMD and an older version of dub. Maybe these ones are a problem source.

UPD: Found theese lines in the log:

2022-07-12T11:46:15.497 [trace] serverbase.d:175:__lambda17 Calling provideDocumentHighlight
2022-07-12T11:46:15.498 [trace] dcd.d:243:__lambda15 Server: 2022-07-12T11:46:15.498 [warning] first.d:481:visit Could not resolve location of module 'vibe/core/core'

2022-07-12T11:46:15.498 [trace] dcd.d:243:__lambda15 Server: 2022-07-12T11:46:15.498 [warning] first.d:481:visit Could not resolve location of module 'vibe/web/web'

2022-07-12T11:46:15.498 [trace] dcd.d:243:__lambda15 Server: 2022-07-12T11:46:15.498 [warning] first.d:481:visit Could not resolve location of module 'vibe/http/fileserver'

2022-07-12T11:46:15.498 [trace] dcd.d:243:__lambda15 Server: 2022-07-12T11:46:15.498 [warning] first.d:481:visit Could not resolve location of module 'vibe/http/router'

2022-07-12T11:46:15.499 [trace] dcd.d:243:__lambda15 Server: 2022-07-12T11:46:15.498 [warning] first.d:481:visit Could not resolve location of module 'vibe/http/server'

2022-07-12T11:46:15.499 [trace] dcd.d:243:__lambda15 Server: 2022-07-12T11:46:15.498 [warning] first.d:560:visit Could not resolve location of module 'immutable(istring)("vibe/core/args")'

2022-07-12T11:46:15.499 [trace] dcd.d:243:__lambda15 Server: 2022-07-12T11:46:15.499 [warning] first.d:481:visit Could not resolve location of module 'vibe/data/json'

2022-07-12T11:46:15.499 [trace] dcd.d:243:__lambda15 Server: 2022-07-12T11:46:15.499 [warning] first.d:560:visit Could not resolve location of module 'immutable(istring)("backend/common")'

2022-07-12T11:46:15.499 [trace] dcd.d:243:__lambda15 Server: 2022-07-12T11:46:15.499 [warning] first.d:481:visit Could not resolve location of module 'backend/config/loader'

2022-07-12T11:46:15.499 [trace] dcd.d:243:__lambda15 Server: 2022-07-12T11:46:15.499 [warning] first.d:481:visit Could not resolve location of module 'backend/web'

2022-07-12T11:46:15.519 [trace] dcd.d:243:__lambda15 Server: 2022-07-12T11:46:15.519 [warning] first.d:481:visit Could not resolve location of module 'gcc/attributes'

2022-07-12T11:46:15.519 [trace] dcd.d:243:__lambda15 Server: 2022-07-12T11:46:15.519 [warning] first.d:481:visit Could not resolve location of module 'ldc/attributes'

2022-07-12T11:46:15.545 [trace] dcd.d:243:__lambda15 Server: 2022-07-12T11:46:15.544 [warning] first.d:481:visit Could not resolve location of module 'gcc/builtins'

Any ideas why?

UPD: It's strange but .... my project used vibe-d 0.9.5-beta.2. I downgraded the package to 9.4 and the problem was fixed. Everthing works. Dont't know why.

wusikijeronii avatar Jul 12 '22 09:07 wusikijeronii