You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I provided a repository above because the playground does not seem to support show call hierarchy on a symbol in order to reproduce the bug, but below is the playground code form the provided repository in case it helps
On targetFunction (line 1) Run Show Call Hierarchy (Shift+Alt+H) and expand the incoming calls
down to the last level. π¨ β See the issue: The hierarchy is targetFunction β levelOne β levelTwo, then a node for the
containing file with a full path. That last node is where the two TS versions differ.
π Expected behavior
The file node is labelled the way TypeScript 6 labels it: the file name, with
the path relative to the workspace shown as the secondary detail.
Additional information about the issue
Real life issue
For a simple call the issue is benign, but in real monorepos, a list of many absolute paths make it very hard to navigate the call hierarchy.
Language server likely not the root cause
The reproduction repository contains a simple script to show tsserver and TypeScript 7 LSP server produce the same value, meaning the issue is quite likely to come from TypeScriptTeam.native-preview
Show to run
# with typescript 6.0.3 installed, over the tsserver JSON protocol
node tools/callhierarchy.mjs ./src/target.ts targetFunction --depth 10 --engine tsserver
# with typescript 7.0.2 installed, over LSP
node tools/callhierarchy.mjs ./src/target.ts targetFunction --depth 10 --engine lsp
π Search Terms
"call hierarchy"
"function call hierarchy files"
"call hierarchy file path"
"absolute path"
"full file path"
Found: Possibly related #36511 β same symptom, reported in 2020 and closed as fixed.
π Version & Regression Information
6.0.3: TypeScript and JavaScript Language Features (built-in)TypeScriptTeam.native-preview0.20260226.1(first version with Call Hierarchy support)TypeScriptTeam.native-preview0.20260708.2(latest)β― Playground Link
https://github.com/brian-xu-vlt/typescript-hierarchy-repro
π» Code
Important
I provided a repository above because the playground does not seem to support
show call hierarchyon a symbol in order to reproduce the bug, but below is the playground code form the provided repository in case it helpscallers.tstarget.tsπ Actual behavior
Steps to reproduce
pnpm install.src/target.ts.targetFunction(line 1) Run Show Call Hierarchy (Shift+Alt+H) and expand the incoming callsdown to the last level.
π¨ β See the issue: The hierarchy is
targetFunctionβlevelOneβlevelTwo, then a node for thecontaining file with a full path. That last node is where the two TS versions differ.
π Expected behavior
The file node is labelled the way TypeScript 6 labels it: the
file name, withthe path relative to the workspace shown as the secondary detail.
Additional information about the issue
Real life issue
For a simple call the issue is benign, but in real monorepos, a list of many absolute paths make it very hard to navigate the call hierarchy.
Language server likely not the root cause
The reproduction repository contains a simple script to show
tsserverand TypeScript 7 LSP server produce the same value, meaning the issue is quite likely to come fromTypeScriptTeam.native-previewShow to run
Result for TS6 and TS7