adobe / adobe/hyde

Classes split over multiple files

Open
#19 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
340
Forks
45
PR merge metrics
No merged PRs in 30d

Description

I have the following situation (in many different situations):
```c++
// a.hpp
class A
{
class B;

void g(const B& b);
};

#include "b.hpp"
```

```c++
// b.hpp
class A::B
{
void g();
};
```

If I run hyde on `a.hpp` alone, I don't get any output for `B`. If I run hyde with with `b.hpp` alone or passing both `a.hpp` and `b.hpp`, I get:
```
.../hyde/build/in/b.hpp:1:7: error: use of undeclared identifier 'A'
class A::B
^
1 error generated.
```

Is there a way to support this use case?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the a.hpp and b.hpp examples, then trace how hyde parses input files and handles declarations split across headers. Done means the nested class B is recognized when the files are processed together or separately without the undeclared A error, with documentation output generated for B.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.