Skip to content
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

Duplicate entries for call hierarchy #36517

Closed
jrieken opened this issue Jan 29, 2020 · 5 comments
Closed

Duplicate entries for call hierarchy #36517

jrieken opened this issue Jan 29, 2020 · 5 comments
Assignees
Labels
Bug A bug in TypeScript Working as Intended The behavior described is the intended behavior; this is not a bug

Comments

@jrieken
Copy link
Member

jrieken commented Jan 29, 2020

TS Template added by @mjbvz

Test TypeScript Version: 3.8.0-dev.20200128

Search Terms

  • Call hierarchy
  • provideCallHierarchyOutgoingCalls

/cc @rbuckton


re microsoft/vscode#89386

  • us ts3.8-beta
  • show calls from here resolve
  • split is shown two time

image

@mjbvz mjbvz transferred this issue from microsoft/vscode Jan 29, 2020
@mjbvz
Copy link
Contributor

mjbvz commented Jan 29, 2020

Here are the duplicated response objects:

    {
        "to": {
            "name": "split",
            "kind": "method",
            "file": "/Users/matb/projects/vscode/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts",
            "span": {
                "start": {
                    "line": 255,
                    "offset": 5
                },
                "end": {
                    "line": 260,
                    "offset": 110
                }
            },
            "selectionSpan": {
                "start": {
                    "line": 260,
                    "offset": 5
                },
                "end": {
                    "line": 260,
                    "offset": 10
                }
            }
        },
        "fromSpans": [
            {
                "start": {
                    "line": 201,
                    "offset": 18
                },
                "end": {
                    "line": 201,
                    "offset": 37
                }
            },
            {
                "start": {
                    "line": 201,
                    "offset": 18
                },
                "end": {
                    "line": 201,
                    "offset": 37
                }
            },
            {
                "start": {
                    "line": 201,
                    "offset": 18
                },
                "end": {
                    "line": 201,
                    "offset": 37
                }
            },
            {
                "start": {
                    "line": 201,
                    "offset": 18
                },
                "end": {
                    "line": 201,
                    "offset": 37
                }
            }
        ]
    },
    {
        "to": {
            "name": "split",
            "kind": "method",
            "file": "/Users/matb/projects/vscode/node_modules/typescript/lib/lib.es5.d.ts",
            "span": {
                "start": {
                    "line": 470,
                    "offset": 5
                },
                "end": {
                    "line": 475,
                    "offset": 65
                }
            },
            "selectionSpan": {
                "start": {
                    "line": 475,
                    "offset": 5
                },
                "end": {
                    "line": 475,
                    "offset": 10
                }
            }
        },
        "fromSpans": [
            {
                "start": {
                    "line": 201,
                    "offset": 18
                },
                "end": {
                    "line": 201,
                    "offset": 37
                }
            },
            {
                "start": {
                    "line": 201,
                    "offset": 18
                },
                "end": {
                    "line": 201,
                    "offset": 37
                }
            },
            {
                "start": {
                    "line": 201,
                    "offset": 18
                },
                "end": {
                    "line": 201,
                    "offset": 37
                }
            },
            {
                "start": {
                    "line": 201,
                    "offset": 18
                },
                "end": {
                    "line": 201,
                    "offset": 37
                }
            }
        ]
    },

@mjbvz mjbvz removed their assignment Jan 29, 2020
@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Feb 6, 2020
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 3.9.0 milestone Feb 6, 2020
@rbuckton
Copy link
Member

rbuckton commented Apr 8, 2020

We discussed this during the implementation and explicitly made the decision to support multiple results from call hierarchies for this express case (multiple declarations of the reference across multiple files): #31863 (comment)

I think I'd classify this as "working as intended"

@rbuckton rbuckton added the Working as Intended The behavior described is the intended behavior; this is not a bug label Apr 8, 2020
@rbuckton rbuckton closed this as completed Apr 8, 2020
@jrieken
Copy link
Member Author

jrieken commented Apr 9, 2020

I think without context information (containing symbol, filename, etc) this pretty useless. How would I know what to click when seeing "split" and "split"?

@mjbvz
Copy link
Contributor

mjbvz commented Apr 9, 2020

@jrieken Does #37061 cover that?

@jrieken
Copy link
Member Author

jrieken commented Apr 14, 2020

Yeah, just not sure if that ever happens. In the meantime we can force the filename to show when there is no detail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Working as Intended The behavior described is the intended behavior; this is not a bug
Projects
None yet
Development

No branches or pull requests

5 participants