Skip to content

Missing references in some cases #33017

Closed

Description

TypeScript Version: 3.5.2

Search Terms:

Code

We have some code that looks like this:

./main.ts:

import { types } from './types';

type Test = types.Foo;

./types/index.ts:

import * as types from './types';
export { types };

./types/types.ts:

export type Foo = 1;

When I try to find references for Foo, I'm getting no results. "Go to definition" does still work.

However, I can only reproduce this behaviour in our large TS project. I've tried and failed to create a reduced test case. If I start removing files from our large TS project, it will eventually begin to work, suggesting there's some sort of (memory?) threshold which we could be crossing.

Here is a video recording to demonstrate this: https://www.dropbox.com/s/xw7c3lk0mxhr5vj/Screen%20Recording%202019-08-21%20at%2021.40.59.mov?dl=0

I have also attached a TS server log, which was recorded at the same time as the above video.

Any ideas what could be going on here? What's the best way for me to debug this?

tsserver.log

Activity

  1. added
    Needs Investigation
    on Aug 21, 2019
  2. sheetalkamat commented on Sep 11, 2019

    @sheetalkamat
    Member

    Can you please share the screen recording and tsserverlog again. (The screen share link is not working so I cant figure out what you expect and what is happening.)

  3. added
    Needs More Info
    and removed
    Needs Investigation
    on Sep 11, 2019
  4. OliverJAsh commented on Sep 12, 2019

    @OliverJAsh
    ContributorAuthor

    Sorry about that Sheetal Nandi (@sheetalkamat). I won't delete the video this time around. 🤦‍♂

    tsserver.log

    Video

  5. added
    Needs Investigation
    and removed
    Needs More Info
    on Sep 13, 2019
  6. OliverJAsh commented on Sep 18, 2019

    @OliverJAsh
    ContributorAuthor

    Just found another bug which might be related: #33489

  7. sheetalkamat commented on Sep 30, 2019

    @sheetalkamat
    Member

    Oliver Joseph Ash (@OliverJAsh) From the log it looks like when finding references its hitting the assertion. We would need code sample to investigate so please provide small repro if you can or you can share your source code. We can get NDA for getting the repro project if you need to. Thanks.

  8. 3 remaining items

  9. OliverJAsh commented on Oct 14, 2019

    @OliverJAsh
    ContributorAuthor
  10. OliverJAsh commented on Oct 16, 2019

    @OliverJAsh
    ContributorAuthor

    Sheetal Nandi (@sheetalkamat) I have sent you an invite to access the repo.

    To test this issue, the file I used in my video is located at app/routes/Explore/LandingPage/components/PopularCategories/PopularCategories-helpers.ts.

  11. OliverJAsh commented on Oct 17, 2019

    @OliverJAsh
    ContributorAuthor

    Sheetal Nandi (@sheetalkamat) Sorry I forgot to mention, this is on the maintenance/named-namespace-imports-landing-pages branch.

  12. sheetalkamat commented on Oct 22, 2019

    @sheetalkamat
    Member

    Oliver Joseph Ash (@OliverJAsh) Thank you for providing details. I was able to repro this and will look into this soon.

  13. added
    Bug
    and removed
    Needs Investigation
    on Oct 22, 2019
  14. added a commit that references this issue on Oct 29, 2019
    49bd87f
  15. added
    Fix Available
    on Oct 29, 2019
  16. added
    Domain: LS: Symbol Navigation
    on Nov 8, 2019
  17. added a commit that references this issue on Dec 11, 2019
    1fd1b42
  18. locked as resolved and limited conversation to collaborators on Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugDomain: LS: Symbol NavigationFix Available

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions