Bug 244180 - editors/vscode: C/C++ projects fail to build: Unhandled exception: Unhandled Promise rejection: Update code model for cpptools: Non-functional IntelliSense
Summary: editors/vscode: C/C++ projects fail to build: Unhandled exception: Unhandled ...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Hiroki Tagato
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2020-02-17 03:17 UTC by bourne.identity@hotmail.com
Modified: 2020-06-16 22:45 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback? (tagattie)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bourne.identity@hotmail.com 2020-02-17 03:17:39 UTC
On FreeBSD 12.1 amd64, I am trying to build a single-file C++ project in 
VSCode using cmake. My VSCode has 3 extensions installed:

1) C/C++
2) CMake
3) CMake Tools

My CMakeLists.txt is as under:

<<
cmake_minimum_required (VERSION 3.0)
project(chkascii)

set(SOURCE chkascii.cc)
add_executable(${PROJECT_NAME} ${SOURCE})
 >>


Running cmake::configure in the VSCode command palette gives me:

<<
[rollbar] Unhandled exception: Unhandled Promise rejection: Update code 
model for cpptools TypeError: Cannot read property 'getApi' of undefined {}
 >>

Further, IntelliSense does not work in my VSCode C++ project under FreeBSD.

Everything works fine when I use and build the project under Linux.
Comment 1 Hiroki Tagato freebsd_committer freebsd_triage 2020-02-17 11:41:41 UTC
(In reply to bourne.identity@hotmail.com from comment #0)

The Microsoft's C/C++ extension appears to depend on some platform-specific binaries (downloaded after extension installation). So it would not work out of the box.

The notes at:

https://github.com/prash-wghats/Electron-VSCode-Atom-For-FreeBSD/blob/master/vscode/Readme.md#vscode-1172

describes how to make it work with FreeBSD's linux compatibility layer. However, it is quite old and I don't know if it can be applied to the current version of C/C++ extension.
Comment 2 Li-Wen Hsu freebsd_committer freebsd_triage 2020-06-16 22:45:26 UTC
Over to maintainer.