Skip to content

API Documentation includes Main in fully qualified names from dependencies #2145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
minestarks opened this issue Jan 31, 2025 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@minestarks
Copy link
Member

minestarks commented Jan 31, 2025

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 3b32013

@minestarks minestarks added bug Something isn't working needs triage labels Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant