Giter VIP home page Giter VIP logo

Comments (9)

DanielGavin avatar DanielGavin commented on August 21, 2024

Is there a simple repro that causes the timeout? Have you tried other editors, and do they cause the same issue? Helix is not the most stable editor currently with LSP.

from ols.

sudokit avatar sudokit commented on August 21, 2024

Yeah no as I mentioned I was unable to find any way to reproduce the timeout. Ill be on the lookout. Nop I havent really tried other other editors. I increased the timeout so hopefully that helps

from ols.

sudokit avatar sudokit commented on August 21, 2024

happened as well today with vscode with the error:

/home/sudokit/langs/ols/src/common/position.odin(152:31) Invalid slice indices -1:1885 is out of range 0..<1885

from ols.

DanielGavin avatar DanielGavin commented on August 21, 2024

Maybe it's some partial ast that gives some bad node. I'll add a max(). That should fix the issue with that crash. I'd rather return some wrong position then crash.

from ols.

DanielGavin avatar DanielGavin commented on August 21, 2024

Fixed. It'll instead print an error if the token range is invalid.

from ols.

DanielGavin avatar DanielGavin commented on August 21, 2024

Closing issue. Make a new issue if you find more errors.

from ols.

sudokit avatar sudokit commented on August 21, 2024

Thank you!
Errors, I think, are better than a crash, since a lsp restart isn't needed.
What I think then happens in my case is that the lsp restarts but its still out of range and instantly crashes.

from ols.

sudokit avatar sudokit commented on August 21, 2024

Hehehe... sorry similar error so same issue...
/home/sudokit/langs/ols/src/server/analysis.odin(159:31) Index 60 is out of range 0..<60
how about a upper limit as well ,p

EDIT: sorryyyyy prob should open a new issueee, but it just seems dumb since its the same thing
changing the added if to this seems to fix it:

if offset < 0 || offset > end_offset {
		offset := 0
		log.errorf("Failed to find offset in get_token_range: %v", node)
}

Yeah i could make a pull request buuuut only for one simple thing seems inefficient. Besides ill have to see if it actually fixes it!
It just seems to have a really bad time with function overloading or with like parametric polymorphism when there are allot of them one after the other. one function has parametric polymorphism and calls another function which has overloads which each has parametric polymorphism and so in ./

from ols.

DanielGavin avatar DanielGavin commented on August 21, 2024

Has nothing to do with the previous error. I should have fixed it thought.

from ols.

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.