Skip to content

Provide a warning when using a default (recursive workspace includes) configuration with a large project #12817

Closed as duplicate

Description

If a custom configuration provider (i.e. CMake Tools) does not register (or for files not associated with a CMakeLists.txt), the default configuration used by the C/C++ Extension is to recursively consider every subdirectory under the workspace folder as an include path. This is equivalent to having the following in the configuration:

            "includePath": [
                "${workspaceFolder}/**"
            ],

For large, complex project workspaces, particularly those containing various subprojects (potentially with some of the same filenames as other projects) this may or may not result in a reasonable configuration.

It may help to provide a warning when using a default (recursive workspace includes) configuration and an excessive number of files or include directories are found, or files or directories with duplicate names are found. A warning could refer users to guidance on how to configure the extension, perhaps pointing them directly to documentation specific to likely scenarios for existing projects (which likely have a build system, or otherwise provide information on how to properly configure a build). Without this, users may assume that the extension is simply failing to work properly and not discover that some configuration may be necessary.

Activity

  1. Colengms commented on Oct 8, 2024

    @Colengms
    ContributorAuthor

    Somewhat related: A warning could be displayed when an excessive number of files are discovered, prompting the user to set exclusions or explicitly set browse/include directories.

  2. bobbrow commented on May 29, 2025

    @bobbrow
    Contributor

    Duplicate of 10828

  3. moved this from Triage to Done in cpptoolson May 29, 2025
  4. moved this from Done to No status in cpptoolson May 29, 2025
  5. locked and limited conversation to collaborators on Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions