Giter VIP home page Giter VIP logo

Comments (5)

natebosch avatar natebosch commented on May 14, 2024

Would be good to see what message the server sent which led to this.

Messages can get split up into chunks and this function recurses until it's consumed every chunk in a message. maxfuncdepth has a default of 100 and if a huge message, say a message with many diagnostics, get's split into >100 chunks this could happen.

Hopefully that is what is happening here - do you know if this file is likely to have a lot of diagnostics?

I will refactor to get rid of the recursion and see if that resolves it. If not there might be some other bug where we misread the message length or something like that.

from vim-lsc.

natebosch avatar natebosch commented on May 14, 2024

As a temporary workaround you could try set maxfuncdepth=200 and see if it buys enough headroom - that would also let us know if there is a broken end condition or if refactoring away from recursion is all we need.

from vim-lsc.

sigmundch avatar sigmundch commented on May 14, 2024

if you run dartanalyzer on the file, you only see 2 warnings, however, when I tee the output from the server, I see about 4000 publishDiagnostics messages.

I think the issue might be that this folder has 2K source files (all independent of each other). So quite likely the issue is that analyzer is processing all the files in the folder. :(

I was curious about whether we avoided this issue in the ycm pluggin, but no, we also set the directory as an analysis root like you do in lsc. While looking there I noticed that we did set the opened source file as a priority-file in ycmd, are you also doing that also in lsc?

from vim-lsc.

natebosch avatar natebosch commented on May 14, 2024

LSP doesn't have a notion of priority files so we don't do that in this client - but in the dart_language_server we always set open files as priority files

There are probably some optimizations we could make in dart_language_server that could help here. I wonder if we should swallow diagnostics for files that aren't open. At least this client doesn't care about them but maybe other clients do? Filed natebosch/dart_lsp#15 to track.

In any case we probably don't want to set maxfuncdepth that high so I'll try to get in the refactoring to change to a loop ASAP.

from vim-lsc.

natebosch avatar natebosch commented on May 14, 2024

Update to the latest and this should be resolved. I couldn't quite hit the problem with the default maxfuncdepth but by setting it artificially low I could repro. Switched to a loop and we shouldn't see this problem again.

from vim-lsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.