microsoft / microsoft/qdk

API Documentation includes `Main` in fully qualified names from dependencies

Open
#2,145 1 comment 1 reaction 1 assignee Assigned to @Copilot View on GitHub
bug low-priority
Dominant language
Rust
Stars
1k
Forks
212
Avg merge
3d 8h
Merged PRs (30d)
65

Description

I'm not sure if this is a bug in the documentation generation itself, or in how namespace trees are stored in the HIR / wherever documentation is gathered from.

**REPRO**

**`MyProj/src/Main.qs`**

```qsharp
operation Main() : Unit {
MyDep.DependencyFunction()
}
```

**`MyProj/src/qsharp.json`**

```json
{
"dependencies": {
"MyDep": {
"path": "../MyDep"
}
}
}
```

**`MyDep/src/Main.qs`**

```qsharp
operation DependencyFunction() : Unit {}

export DependencyFunction;
```

**`MyDep/src/qsharp.json`**

```json
{}
```

Invoke "Show API Documentation" command in VS Code.

Navigate to `MyDep` > `Main`.

**Expected**

Fully qualified name should show up as `MyDep.DependencyFunction()`

Arguably `Main` shouldn't even exist as a navigation item, as that namespace is not actually accessible from anywhere in the user project.

**Actual**

Fully qualified name shows up as `MyDep.Main.DependencyFunction`

Seen in 3b32013a6e1ff26f5d12c12116b1946eeda4bb0d

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.