vknabel / vscode-swift-development-environment

New home of Swift Development Environment for VS Code
https://marketplace.visualstudio.com/items?itemName=vknabel.vscode-swift-development-environment
Apache License 2.0
175 stars 14 forks source link

Sourcekite failed to work, missing stdlib module #84

Closed sonnguyen9800 closed 2 years ago

sonnguyen9800 commented 3 years ago

Hello everyone,

Today I tried to code Swift on my Ubuntu machine, using sourcekite language server. I did successfully build the server, however, when i hover over some key code, the output prompted some errors involved with missing "stdlib"module.

The full output looks like this:

[ERROR][1]
[request] {
  key.request: source.request.cursorinfo,
  key.sourcefile: "...",
  key.offset: 131,
  key.compilerargs: [...]
}

[sourcekite] ***stderr***sourcekite: /home/build-user/swift/lib/Sema/ImportResolution.cpp:459: swift::ImplicitImportList swift::ModuleImplicitImportsRequest::evaluate(swift::Evaluator &, swift::ModuleDecl *) const: Assertion `stdlib && "Missing stdlib?"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0.  
[sourcekite] ***stderr***While evaluating request ModuleImplicitImportsRequest(main.main)

It is seem that's I lack one or more cpp header? In addition, i did install libcurl4-openssl-dev into my machine.

Any help is very appreciated! =)

vknabel commented 3 years ago

Hi @sonnguyen9800

Sorry for the late response. Got quite a lot to do within the last month! Did you change your swift version after installation or do you have multiple versions installed?

Maybe recompilation might help.

sonnguyen9800 commented 3 years ago

Hi @sonnguyen9800

Sorry for the late response. Got quite a lot to do within the last month! Did you change your swift version after installation or do you have multiple versions installed?

Maybe recompilation might help.

Hello,

I don't think that there were multiple version of Swift installed on my laptop. Also, the only version I used was the newest one.

Well, as the problem was very troublesome, I decided to use my campus's Mac to code swift instead. So this issue can be closed for now.

Best Regards