Skip to content

tools: fix compilation db generation for VSCode.#5873

Merged
lizan merged 1 commit intoenvoyproxy:masterfrom
ipuustin:vscode-compile-commands
Feb 8, 2019
Merged

tools: fix compilation db generation for VSCode.#5873
lizan merged 1 commit intoenvoyproxy:masterfrom
ipuustin:vscode-compile-commands

Conversation

@ipuustin
Copy link
Member

@ipuustin ipuustin commented Feb 7, 2019

Description:

Change gen_compilation_database.py command to accept a --vscode flag. If this flag is on, create such a compilation database which can be used by Visual Studio Code for code analysis. At the moment it only changes -iquote compiler options to old-style -I options to prevent Visual Studio Code from falling back to tag parser mode.

This fix doesn't completely solve all problems VSCode has with Envoy compilation db, but it makes the "Intellisense" functionality work. Note that you need to also compile Envoy to get access to the generated protobuf files.

Risk Level: low
Testing: Visual Studio Code v1.31
Docs Changes: N/A
Release Notes: N/A

Change the gen_compilation_database.py command to accept a --vscode
flag. If this flag is on, create such a compilation database which can
be used by Visual Studio Code for code analysis. At the moment it only
changes "-iquote" compiler options to old-style "-I" options to prevent
Visual Studio Code from falling back to tag parser mode.

Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
@htuch htuch requested a review from lizan February 7, 2019 17:15
@lizan lizan merged commit 24e2e0e into envoyproxy:master Feb 8, 2019
fredlas pushed a commit to fredlas/envoy that referenced this pull request Mar 5, 2019
Change the gen_compilation_database.py command to accept a --vscode
flag. If this flag is on, create such a compilation database which can
be used by Visual Studio Code for code analysis. At the moment it only
changes "-iquote" compiler options to old-style "-I" options to prevent
Visual Studio Code from falling back to tag parser mode.

*Risk Level*: low
*Testing*: Visual Studio Code v1.31
*Docs Changes*: N/A
*Release Notes*: N/A

Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Fred Douglas <fredlas@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants