Coder Social home page Coder Social logo

Inference hangs on some files about tern HOT 8 CLOSED

ternjs avatar ternjs commented on August 19, 2024
Inference hangs on some files

from tern.

Comments (8)

sergeche avatar sergeche commented on August 19, 2024

infer.js still fails on minified underscore.js, it happens when I request completions:

IndexError: RangeError: Maximum call stack size exceeded ( js/infer.js @ 43 : 21 )  ->       if (this.types.indexOf(type) > -1) return;

from tern.

marijnh avatar marijnh commented on August 19, 2024

It works for me now. Can you describe how you're running Tern when this happens?

from tern.

sergeche avatar sergeche commented on August 19, 2024

I’m running Tern on a project with 30 files. It happens when I’m requesting completions like so: https://github.com/sergeche/ternjs-sublime/blob/master/ternjs/js/controller.js#L205

Altho, it works fine on simple project with two files. I’ll try to narrow down my tests to figure out when this error appears.

from tern.

jeffkenton avatar jeffkenton commented on August 19, 2024

I'm seeing something similar:

With one good sized file in its own directory (jquery-1.7.js, about 9300 lines) I add the following lines of code by hand (don't cut and paste all at once) about 2/3 of the way down the file:

var x = "foo";
var y = x.length;
var x1= "bar";
var y1 = x1.length;
var x2 = "baz";
var y2 = x2.length;
var x3 = "33333";
var y3 = x3.length;

The time required for each succeeding hint increases from 700ms to 5800ms to 38900ms etc. All the time is spent in infer.js in the inferWrapper AST walk, but I don't know why. It might be the same problem you're seeing.

from tern.

marijnh avatar marijnh commented on August 19, 2024

@jeffkenton Are you using the current code? Some changes were made yesterday that should help with this.

from tern.

jeffkenton avatar jeffkenton commented on August 19, 2024

Not yet. I'll try it.

Thanks.

From: Marijn Haverbeke <[email protected]mailto:[email protected]>
Reply-To: marijnh/tern <[email protected]mailto:[email protected]>
Date: Wednesday, March 27, 2013 4:05 PM
To: marijnh/tern <[email protected]mailto:[email protected]>
Cc: Adobe <[email protected]mailto:[email protected]>
Subject: Re: [tern] Inference hangs on some files (#16)

@jeffkentonhttps://github.com/jeffkenton Are you using the current code? Some changes were made yesterday that should help with this.


Reply to this email directly or view it on GitHubhttps://github.com//issues/16#issuecomment-15549752.

from tern.

marijnh avatar marijnh commented on August 19, 2024

Closing. Please file a new issue (with test case) when it comes up again.

from tern.

jeffkenton avatar jeffkenton commented on August 19, 2024

Thanks.

From: Marijn Haverbeke <[email protected]mailto:[email protected]>
Reply-To: marijnh/tern <[email protected]mailto:[email protected]>
Date: Friday, April 5, 2013 10:30 AM
To: marijnh/tern <[email protected]mailto:[email protected]>
Cc: Adobe <[email protected]mailto:[email protected]>
Subject: Re: [tern] Inference hangs on some files (#16)

Closing. Please file a new issue (with test case) when it comes up again.


Reply to this email directly or view it on GitHubhttps://github.com//issues/16#issuecomment-15958819.

from tern.

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.