Skip to content

Export default child items not included in 'navtree' #37877

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

Closed
mjbvz opened this issue Apr 9, 2020 · 4 comments · Fixed by #38255
Closed

Export default child items not included in 'navtree' #37877

mjbvz opened this issue Apr 9, 2020 · 4 comments · Fixed by #38255
Labels
Bug A bug in TypeScript Domain: Outlining Relates to multi-line regions that editors can collapse
Milestone

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Apr 9, 2020

From microsoft/vscode#94630

TypeScript Version: 3.9.0-dev.20200409

Search Terms:

  • tsserver
  • navtree

Code

export default {
    foo: 1,
  };
  export const hello = {
    world: 2,
  }; 

Bug:
The nav tree does not include an entry for foo in it:

[Trace  - 23:25:07.33] <syntax> Response received: navtree (6). Request took 4 ms. Success: true 
Result: {
    "text": "\"test\"",
    "kind": "module",
    "kindModifiers": "",
    "spans": [
        {
            "start": {
                "line": 1,
                "offset": 1
            },
            "end": {
                "line": 6,
                "offset": 6
            }
        }
    ],
    "childItems": [
        {
            "text": "default",
            "kind": "const",
            "kindModifiers": "export",
            "spans": [
                {
                    "start": {
                        "line": 1,
                        "offset": 1
                    },
                    "end": {
                        "line": 3,
                        "offset": 5
                    }
                }
            ]
        },
        {
            "text": "hello",
            "kind": "const",
            "kindModifiers": "export",
            "spans": [
                {
                    "start": {
                        "line": 4,
                        "offset": 16
                    },
                    "end": {
                        "line": 6,
                        "offset": 4
                    }
                }
            ],
            "nameSpan": {
                "start": {
                    "line": 4,
                    "offset": 16
                },
                "end": {
                    "line": 4,
                    "offset": 21
                }
            },
            "childItems": [
                {
                    "text": "world",
                    "kind": "property",
                    "kindModifiers": "",
                    "spans": [
                        {
                            "start": {
                                "line": 5,
                                "offset": 5
                            },
                            "end": {
                                "line": 5,
                                "offset": 13
                            }
                        }
                    ],
                    "nameSpan": {
                        "start": {
                            "line": 5,
                            "offset": 5
                        },
                        "end": {
                            "line": 5,
                            "offset": 10
                        }
                    }
                }
            ]
        }
    ]
}
@kliput
Copy link

kliput commented Jun 12, 2020

Is this fix applied in VSCode May release? The bug from microsoft/vscode#94630 still occurs in VSCode 1.46:
obraz

Eg. no qosManager symbol that is inside export default, only default is visible.

@subn3t
Copy link

subn3t commented Jun 16, 2020

@kliput I feel like this broke with the May release. It's taken me a couple of hours to track down this string of bugs, but this is definitely not working the way it was a couple of weeks ago for me.

This is how it worked before:
Screenshot (14)

This is the current behavior:
mQNr2Ya

You have to downgrade to 1.42 before this works again

@kliput
Copy link

kliput commented Jun 16, 2020

@subn3t

You have to downgrade to 1.42 before this works again

Is there an issue to fix this in next release or should I create new?

@subn3t
Copy link

subn3t commented Jun 16, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Outlining Relates to multi-line regions that editors can collapse
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants