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

Typescript Find All References stopped finding references 1.30.0 #65102

Closed
mdenson-dayspring opened this issue Dec 14, 2018 · 13 comments
Closed
Assignees
Labels
info-needed Issue requires more information from poster typescript Typescript support issues

Comments

@mdenson-dayspring
Copy link

Issue Type: Bug

This is an awesome feature that I used extensively when it was the preview List All References.

With the latest release it stopped finding references with TS. I am able to command click from a reference to the definition (cool) but the Find all References doesn't list the use I just came from

VS Code version: Code 1.30.0 (c6e592b, 2018-12-11T22:22:15.793Z)
OS version: Darwin x64 18.2.0

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz (8 x 2300)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 16.00GB (0.14GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (1)
Extension Author (truncated) Version
EditorConfig Edi 0.12.5
@mdenson-dayspring
Copy link
Author

Ah! Is this dependent on some parsing process running in the background?

It has started working now after a few minutes. Maybe an indication that the feature may work after the project is processed, with an indication of progress (maybe).

Thanks for the great tool.

@mjbvz mjbvz self-assigned this Dec 14, 2018
@mjbvz mjbvz added the typescript Typescript support issues label Dec 14, 2018
@mjbvz
Copy link
Collaborator

mjbvz commented Dec 14, 2018

Was there an Initializing JS/TS language features... spinner shown in the status bar when it did not work? Also, does your project have a tsconfig.json and are both files part of it?

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Dec 14, 2018
@mdenson-dayspring
Copy link
Author

Hi I did not see the spinner. I did specifically look to see if something was going on in the background.

Yes I do have a tsconfig.json. Multiple actually. The project is an angular project with multiple (2) apps and several libraries. Each app/lib has a tsconfig.json.

FYI we are using the ng tooling extension by nrwl called nx.

@vscodebot vscodebot bot removed the new release label Dec 16, 2018
@mjbvz
Copy link
Collaborator

mjbvz commented Dec 20, 2018

Do you have an example project that you can share or can you describe the project layout (along with contents of the tsconfigs)

@dcecile
Copy link

dcecile commented Dec 25, 2018

I'm also seeing this with a multiple tsconfig.json setup. (Even though technically all of them should be "joined" via a root tsconfig.json that uses project references.)

Here's a minimal repro of my setup: https://github.com/dcecile/typescript-references-test

common/
  message.ts
  tsconfig.json
server/
  hello.ts
  tsconfig.json
client/
  sharedMain.ts
  tsconfig.json
  • Both client and server reference the common project
  • "Find references" fails to find the references to the common function
  • "Rename symbol" also fails to rename the references
  • After loading files from the client and server projects, find references works

@enzy
Copy link

enzy commented Feb 11, 2019

I'm facing this issue in an Angular 7 project after the recent VS code update, it did work in the previous version though.

[exthost] [error] TypeError: Cannot read property 'replace' of undefined
	at Function.file (resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:99:632)
	at getIconPath (resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:423:936)
	at getLightIconPath (resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:423:728)
	at g.createTreeItem (resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:422:618)
	at g.createTreeNode (resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:422:508)
	at g.createAndRegisterTreeNode (resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:422:299)
	at define.fetchChildrenNodes.a.asPromise.then.Promise.all.u.coalesce.map.a.asPromise.then.r (resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:421:169)
Version: 1.32.0-insider (user setup)
Commit: 7ff2398cfd0776409ff687ce811f1d7ff3375dc8
Date: 2019-02-11T11:42:54.142Z
Electron: 3.1.3
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.18334

@qlqllu
Copy link

qlqllu commented Feb 18, 2019

I have the similar issue, and I narrow down the issue to: only the export function fn1() can't find its references, the functions in a class can find their references.

BTW, rename symbol on the function that can't find its references will report an error, but I can't find a way to copy the error stack.

My vscode version is 1.31.1, on windows 10. The same vscode version on mac does not have this issue.

@qlqllu
Copy link

qlqllu commented Feb 18, 2019

The find all references starts working after some operations (I don't which operation make this function work). I am sure waiting for sometime can't make this work.

@mjbvz
Copy link
Collaborator

mjbvz commented Feb 19, 2019

@qlqllu @enzy @dcecile Please open new issues.

@mdenson-dayspring If you are still seeing this issue in the latest VS Code insider, let me know. Please include more information about your project contents and structure

@mjbvz mjbvz closed this as completed Feb 19, 2019
@achimschrepfer
Copy link

@mjbvz the issue (not finding all references of a given symbol throughout the whole workspace) seems to happen on projects with multiple tsconfig.json files. I have an Angular NX Workspace with several libraries in it. Navigation features like find all references, lint messages and errors and warnings never seem to be collected througout the whole workspace.

In simple TS projects I never experience those issues.

@qlqllu
Copy link

qlqllu commented Mar 9, 2019 via email

@dcecile
Copy link

dcecile commented Mar 9, 2019

@achimschrepfer @qlqllu I created #69001 hoping to track this multiple tsconfig.json issue

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

6 participants