vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Multiroot workspace: Only one folder is tag parsed when each folder is configured with its own compile_commands.json

Open ryanpholt opened this issue 6 years ago • 2 comments

See title. I work on a multiroot workspace. If I configure each folder with its own compile_commands.json, then only one folder gets tag parsed. However, if I configure with a single compile_commands.json via the "default" option in the workspace settings, then they all get tag parsed.

Download the repro.

The zip file contains a project structure:

test |----myWorkspace.code-workspace |----proj1 |----proj2

$ cd proj1
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=1

Repeat for the other folder:

$ cd proj2
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=1

Open the workspace:

$ code myWorkspace.code-workspace

Look at the C++ logs. You will see something like:

  Folder: /usr/include/ will be indexed
  Folder: /usr/lib/gcc/x86_64-linux-gnu/8/include/ will be indexed
  Folder: /usr/lib/gcc/x86_64-linux-gnu/8/include-fixed/ will be indexed
  Folder: /usr/local/include/ will be indexed
  Folder: /home/ryanholt/test/proj2/include/ will be indexed
  Folder: /home/ryanholt/test/proj2/src/ will be indexed

Note that 'proj1' is not indexed.

ryanpholt avatar Oct 23 '20 20:10 ryanpholt

Thanks for reporting this...should be fixed in our next release.

sean-mcmanus avatar Oct 27 '20 06:10 sean-mcmanus

Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/1.1.0-insiders4

sean-mcmanus avatar Nov 04 '20 02:11 sean-mcmanus