qdk icon indicating copy to clipboard operation
qdk copied to clipboard

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

Open minestarks opened this issue 10 months ago • 1 comments

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

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

MyProj/src/qsharp.json

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

MyDep/src/Main.qs

operation DependencyFunction() : Unit {}

export DependencyFunction;

MyDep/src/qsharp.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

minestarks avatar Jan 31 '25 22:01 minestarks

Maybe a bug, but seems most libraries today don't export from Main anyway, so low-pri.

billti avatar May 06 '25 21:05 billti