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

Intelisense mulfunctions when RxCpp is used #5619

Closed
dzmitry-babrovich opened this issue Jun 6, 2020 · 7 comments
Closed

Intelisense mulfunctions when RxCpp is used #5619

dzmitry-babrovich opened this issue Jun 6, 2020 · 7 comments
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service verified Bug has been reproduced Visual Studio Inherited from Visual Studio
Milestone

Comments

@dzmitry-babrovich
Copy link

Issue Type: Bug

I have create repository at https://github.com/dzmitry-babrovich/rxcpp-intelisense-bug to reproduce the bug.
The container installs RxCpp and part of docker image generation. Check README.md for instructions how to reproduce intelisense mulfunctioning when RxCpp is used.

Extension version: 0.28.2
VS Code version: Code 1.45.1 (5763d909d5f12fe19f215cbfdd29a91c0fa9208a, 2020-05-14T08:27:22.494Z)
OS version: Linux x64 5.3.0-28-generic
Remote OS version: Linux x64 5.3.0-28-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz (8 x 3400)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: disabled_off_ok
video_decode: unavailable_off
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) 1, 0, 0
Memory (System) 15.43GB (7.79GB free)
Process Argv --no-sandbox --unity-launch
Screen Reader no
VM 0%
DESKTOP_SESSION plasma
XDG_CURRENT_DESKTOP KDE
XDG_SESSION_DESKTOP KDE
XDG_SESSION_TYPE x11
Item Value
Remote Dev Container: C++ Sample
OS Linux x64 5.3.0-28-generic
CPUs Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz (8 x 3400)
Memory (System) 15.43GB (7.79GB free)
VM 0%
@michelleangela
Copy link
Contributor

@dzmitry-babrovich
I tried the provided repro and was able to reproduce the issue when including any files from the /usr/local/include/rxcpp path and if the C++ standard version is C++14 or gnu++14 or less. Since the default C++ standard of the gcc-8 compiler that's installed on the docker image is gnu++14, this is what the extension uses as default.

I found that by setting the C++ standard to c++17 or gnu++17, then IntelliSense works again with the included RxCpp file. Is this the same case for your project or does the issue persist even when the C++ standard version is set correctly? Does RxCpp library depend on a specific C++ standard version?

@michelleangela michelleangela added Feature: Configuration An issue related to configuring the extension or IntelliSense more info needed The issue report is not actionable in its current state labels Jun 10, 2020
@dzmitry-babrovich
Copy link
Author

Hi @michelleangela,
I use RxCPP with C++14 because that's what our company uses. As far as I know RxCpp supports C++11 and above. Mind you compilation time is not great. Where does intelisense take it's compiler setting: from CMakeLists.txt or .vscode/c_cpp_properties.json - option cppStandard?

@michelleangela
Copy link
Contributor

The C/C++ extension gets IntelliSense configuration from c_cpp_properties.json. Information from CMakeLists.txt can be passed on to the extension as well if the "configurationProvider" property is set (see https://code.visualstudio.com/docs/cpp/c-cpp-properties-schema-reference for more info about "configurationProvider ") to a CMake VSCode extension that extracts info from CMakeLists and provides it to the C/C++ extension. The C/C++ extension can also get IntelliSense configuration info from a compile_commands.json file, by setting the "compileCommands" property in c_cpp_properties.json to the path of a compile_commands.json. Only set either "configurationProvider" or "compileCommands", but not both. If neither of those two properties are set, then IntelliSense will get info from the set properties in c_cpp_properties.json (or default values if no c_cpp_properties.json is customized).

You can run C/C++: Log Diagnostics from the VS Code command palette to see the actual IntelliSense configurations that are used.

@dzmitry-babrovich
Copy link
Author

Hi - I have added c_cpp_properties.json to the repo and pushed it up. Unfortunatelly I am still observing the same issue. Here what I get in log diagnostic:

-------- Diagnostics - 6/10/2020, 8:24:56 PM
Version: 0.28.3
Current Configuration:
{
"name": "Linux",
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c18",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64",
"includePath": [
"/usr/local/include"
],
"compilerArgs": [],
"browse": {
"path": [
"/usr/local/include",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
}
}
Translation Unit Mappings:
[ /workspaces/rxcpp-intelisense-bug/main.cpp ]:
/workspaces/rxcpp-intelisense-bug/main.cpp
Translation Unit Configurations:
[ /workspaces/rxcpp-intelisense-bug/main.cpp ]:
Process ID: 429
Memory Usage: 0 MB
Compiler Path: /usr/bin/gcc
Includes:
/usr/include/c++/8
/usr/include/x86_64-linux-gnu/c++/8
/usr/include/c++/8/backward
/usr/lib/gcc/x86_64-linux-gnu/8/include
/usr/local/include
/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
Standard Version: c++17
IntelliSense Mode: gcc-x64
Other Flags:
--g++
--gnu_version=80300
Total Memory Usage: 0 MB

@michelleangela
Copy link
Contributor

It looks like the issue may have something to do with the IntelliSense process (cpptools-srv) being slow to start, may be about 5-6 secs. Note that there will be an IntelliSense (cpptools-srv) per translation unit, but there should only be one extension process (cpptools). The extension process will spawn a cpptool-srv process per translation unit. If the log from C/C++: Log Diagnostics show that memory usage is 0 MB or says "no active translation units", it means the cpptools-srv is not running.

Regardless of the C++ standard version, IntelliSense was able to work provided that the cpptools-srv was able to start running. I haven't figure out yet what's causing the IntelliSense process to not start either immediately or not start at all, perhaps this has something to do with the container.

image

image

FYI: I didn't see the uploaded c_cpp_proeprties.json in https://github.com/dzmitry-babrovich/rxcpp-intelisense-bug/tree/master/.vscode, but this may not be a configuration issue, but I can just manually create a local copy of c_cpp_proeprties.json if needed.

@michelleangela michelleangela added Language Service remote verified Bug has been reproduced Visual Studio Inherited from Visual Studio and removed Feature: Configuration An issue related to configuring the extension or IntelliSense more info needed The issue report is not actionable in its current state labels Jun 10, 2020
@michelleangela michelleangela added this to the Tracking milestone Jun 16, 2020
@michelleangela
Copy link
Contributor

michelleangela commented Jun 16, 2020

This has been determined to be an issue with the IntelliSense engine that is shared with Visual Studio.

Edit:
A fix is in progress.

@michelleangela michelleangela added bug and removed remote labels Jun 16, 2020
@bobbrow bobbrow modified the milestones: Tracking, 0.29.0 Jun 16, 2020
@sean-mcmanus
Copy link
Contributor

@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Jun 25, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2020
@michelleangela michelleangela removed their assignment Feb 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service verified Bug has been reproduced Visual Studio Inherited from Visual Studio
Projects
None yet
Development

No branches or pull requests

4 participants