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

[Regression] The 'Learn how to install a library for this header with vcpkg' option has disappeared

Open v-ericawu opened this issue 1 year ago • 1 comments

Environment

  • OS and Version: Windows/Linux/Mac OS
  • VS Code Version: 1.85.0
  • C/C++ Extension Version: 1.20.5

Bug Summary and Steps to Reproduce

Bug Summary: The 'Learn how to install a library for this header with vcpkg' option has disappeared

Steps to reproduce:

  1. Create a Test folder with .cpp file.
  2. Open Test folder with VS Code.
  3. Type error code in .cpp file, such as: #include"xxxxx.h"
  4. Hover over error squiggle and Click on 'Quick Fix'

Expected behavior: 'Learn how to install a library for this header with vcpkg' option appear image

Actual behavior: 'Learn how to install a library for this header with vcpkg' option has disappeared from C/C++ extension 1.17.2

Latest C/C++ extension version: 1.20.5 image

C/C++ extension 1.17.2: image

Configuration and Logs

/

Other Extensions

/

Additional context

No response

v-ericawu avatar Jun 25 '24 05:06 v-ericawu

Thank you for reporting this issue. This behavior is actually by design as we only want to suggest this code action for headers that are supported by vcpkg.

This does however bring to light a bug where this code action is not appearing even for such headers like #include <zlib.h>.

It looks like we were incorrectly parsing our vcpkg header database. Please keep tracking this issue to be notified when a fix is checked in.

browntarik avatar Jun 26 '24 20:06 browntarik

Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.21.1

sean-mcmanus avatar Jul 16 '24 00:07 sean-mcmanus

@sean-mcmanus Verified on C/C++ 1.21.1(pre-release) still repro this issue, so could you help to re-confirm it? image

v-ericawu avatar Jul 16 '24 10:07 v-ericawu

Hi @v-ericawu . To clarify, you wouldn't get that option for "xxxxx.h". The feature applies only if the header is from a library supported by vcpkg. Try geos.h:

image

Colengms avatar Jul 16 '24 23:07 Colengms

@Colengms @sean-mcmanus Thanks for your confirmation! using ''geos.h'' will bring up the 'Learn how to install a library for this header with vcpkg' option: image

v-ericawu avatar Jul 17 '24 02:07 v-ericawu