Skip to content

codegraph init -i does not detect source files when run from a top-level CMake workspace containing multiple nested repos #193

@timxx

Description

@timxx

Description

Our project uses CMake and is organized as a top-level workspace that contains several independent Git repositories. These are not Git submodules.

Example structure:

root/
├── coding/
├── CMakeLists.txt
├── sub_repo1/
│   ├── CMakeLists.txt
│   └── src/
└── sub_repo2/
    ├── CMakeLists.txt
    └── src/

The top-level directories (root/ and coding/) do not contain any source files directly. All source code is located inside the nested repositories such as sub_repo1/ and sub_repo2/.

Problem

When I run:

codegraph init -i

from either root/ or coding/, it reports:

No files found to index

However, if I run the same command inside sub_repo1/, it works correctly.

Expected behavior

I expect codegraph init -i to discover and index source files in nested repositories when run from the top-level project directory.

Actual behavior

codegraph init -i only works when executed inside each individual sub-repository. It does not work from the main project root, which is the directory we normally open and work in.

Why this matters

In our workflow, developers usually open the entire workspace from the top-level directory. Currently, indexing has to be done separately for each nested repository, which is inconvenient and makes project-wide indexing difficult.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions