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

Can't use globstar in the middle of the path in includePath #12070

Closed
ggladilov opened this issue Mar 6, 2024 · 3 comments
Closed

Can't use globstar in the middle of the path in includePath #12070

ggladilov opened this issue Mar 6, 2024 · 3 comments
Assignees
Labels
bug Feature: Configuration An issue related to configuring the extension or IntelliSense fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix
Milestone

Comments

@ggladilov
Copy link

Environment

  • OS and Version: macOS Sonoma Version 14.3.1
  • VS Code Version: 1.87.0 (Universal)
  • C/C++ Extension Version: 1.19.5

Bug Summary and Steps to Reproduce

Bug Summary:

Path with globstar in the middle of the path doesn't work in includePath of c_cpp_properties.json. Example of usage:

{
    "configurations": [
        {
            "name": "Mac",
            "includePath": [
                "${workspaceFolder}/**",
                "/opt/homebrew/opt/**/include", <- faulty path
                "/opt/homebrew/opt/opencv/include/opencv4",
                "/opt/homebrew/opt/openvino/include"
            ],
...
    "version": 4
}

Per #723 I tried both ** and *, but the result is the same:

Screenshot 2024-03-06 at 19 39 29

Using ls /opt/homebrew/opt/**/include locally in external terminal shows multiple matches as expected.

Steps to reproduce:

  1. Go to 'c_cpp_properties.json' file and add path with globstar in the middle to includePath
  2. See error

Expected behavior: multiple directories as a result of globstar expansion would be added to includePath

Configuration and Logs

`c_cpp_properties.json`:


{
    "configurations": [
        {
            "name": "Mac",
            "includePath": [
                "${workspaceFolder}/**",
                "/opt/homebrew/opt/**/include",
                "/opt/homebrew/opt/opencv/include/opencv4",
                "/opt/homebrew/opt/openvino/include"
            ],
            "defines": [],
            "macFrameworkPath": [
                "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"
            ],
            "compilerPath": "/opt/homebrew/opt/llvm/bin/clang++",
            "cStandard": "c23",
            "cppStandard": "c++23",
            "intelliSenseMode": "macos-clang-arm64",
            "compileCommands": "${command:cmake.buildDirectory}/compile_commands.json"
        }
    ],
    "version": 4
}

Other Extensions

No response

Additional context

No response

@browntarik browntarik self-assigned this Mar 6, 2024
@browntarik browntarik added bug Language Service quick fix Feature: Configuration An issue related to configuring the extension or IntelliSense labels Mar 6, 2024
@browntarik
Copy link
Contributor

browntarik commented Mar 6, 2024

Thank you for reporting your issue.

@browntarik
Copy link
Contributor

After further investigation, this seems to just be a squiggle issue. Could you please provide the output from the C/C++: Log Diagnostics command? It is likely that the paths are correctly expanded and the squiggle is just appearing incorrectly.

@browntarik browntarik added the fixed Check the Milestone for the release in which the fix is or will be available. label Mar 13, 2024
@sean-mcmanus sean-mcmanus added this to the 1.20 milestone Mar 25, 2024
@sean-mcmanus
Copy link
Contributor

@sean-mcmanus sean-mcmanus modified the milestones: 1.20, 1.20.0 May 2, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Feature: Configuration An issue related to configuring the extension or IntelliSense fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix
Projects
None yet
Development

No branches or pull requests

3 participants