Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Poor GetAllUsesOfAllSymbolsInFile results (on bigger files?) #6583

Closed

Description

@auduchinok

After we've got chunking in #6089 I get truncated results on bigger files. E.g. GetAllUsesOfAllSymbolsInFile for TypeChecker.fs only returns symbol uses up to ~3400 line. Reverting this PR locally fixes it for me.

Activity

  1. cartermp commented on Apr 23, 2019

    @cartermp
    Contributor

    @auduchinok I tried using document highlights in that file today (and others), since that relies on that specific API. It was able to highlight all usages of what I needed, though it could be that what it "found" was small enough in scope that it didn't matter. Looking at the code I can't see why this would happen though, since the code processes each chunk...

  2. auduchinok commented on May 14, 2019

    @auduchinok
    MemberAuthor

    @cartermp I've just tried to find usages of SynExpr type in Visual Studio 2019 (16.0.3). Results indeed missed lots of the references in TypeChecker.fs. In addition to that, highlighting usages of the symbol under caret stops working at some point when moving caret down in that file. It behaves in a somewhat similar way to what I get in Rider without reverting #6089, with the difference is it at least adds the semantic highlighting beyond the point where some features stop working..

    Rider (2019.1 dev):
    missingSymbolsRider

    Visual Studio 2019 (16.0.3)
    missingSymbolsVS16

  3. cartermp commented on Dec 17, 2019

    @cartermp
    Contributor

    @TIHan this might be a good one to look at while you're digging into the TcSymbolUseData issues

  4. dsyme commented on Sep 1, 2020

    @dsyme
    Contributor

    @auduchinok Do you know the status of this? Or a specific repro?

  5. cartermp commented on Sep 1, 2020

    @cartermp
    Contributor

    I've noticed this from time to time when selecting a symbol in Typechecker.fs. No other files though.

  6. dsyme commented on Sep 1, 2020

    @dsyme
    Contributor

    Well, I did "Find all references" on "SynExpr" and got plenty of results all the way through TypeChcker.fs. The main problem is a large number of duplicates:

    image

  7. changed the title [-]GetAllUsesOfAllSymbolsInFile missing symbol uses on bigger files[/-] [+]Poor GetAllUsesOfAllSymbolsInFile results (on bigger files?)[/+] on Sep 1, 2020
  8. added
    Impact-Medium
    on Sep 1, 2020
  9. cartermp commented on Sep 1, 2020

    @cartermp
    Contributor

    Duplicate data shouldn't shown anymore if you are using the latest dogfood (i.e., what will ship in 16.8). So if that's still the case in dogfood then there's a separate issue at play.

    This one shouldn't be affected by Find Refs, since Find Refs doesn't call GetAllUsesOfAllSymbolsInFile in either the "symbol is declared in this file" or "symbol is declared elsewhere" cases in VS. Perhaps it's used by Rider?

    Either way there is certainly an issue here.

  10. added this to the Backlog milestone on Sep 1, 2020
  11. auduchinok commented on Sep 2, 2020

    @auduchinok
    MemberAuthor

    The stable repro was bigger files like TypeChecker.fs and we still have #6089 reverted, otherwise it reproduces for us in Rider. I can try looking at it again when updating our repo for the next rider release. Though, we don't yet use the FCS symbols cache, so now there's even more difference compared to what VS does.

  12. auduchinok commented on Sep 2, 2020

    @auduchinok
    MemberAuthor

    @cartermp @dsyme Does symbol usages under caret highlighting work reliably for you in TypeChecker.fs when invoked somewhere down the file (e.g. near the file end)? It's where I've seen it working bad in Visual Studio, as recorded in the gif above.

  13. cartermp commented on Sep 2, 2020

    @cartermp
    Contributor

    I have noticed symbol highlighting not necessarily getting kicked off in TypeChecker.fs. But it's hard to reproduce.

  14. dsyme commented on Apr 6, 2022

    @dsyme
    Contributor

    I'm closing this as we haven't seen this problem reported separately and I'm pretty sure it was either a performance or point-in-time problem.

  15. dsyme commented on Sep 26, 2022

    @dsyme
    Contributor

    @auduchinok your initial analysis was spot on - the chunking PR was just broken for large files. Presumably this caused the duplicates I saw as well.

    Really annoying we let this slip for so long, especially since you'd reported it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-FCSBugImpact-Medium

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions