Giter Site home page Giter Site logo

Comments (9)

mortalapeman avatar mortalapeman commented on September 22, 2024

The CPU issue I've seen before with tern it's self. It seems like some codebases will cause the analyzer to be caught in an infinite loop, but I haven't been able to relieabley replicate the problem.

I have also seen the glitchy UI issues and they are likely on Light Table's end, but I also have not been able to reliably reproduce the issue.

Thank you for filing this bug! However, I don't have much time to invest in tracking down issues in other projects. If you have some steps for consistently reproducing the problem, it would help me tremendously.

from lt-ternjs.

hamoid avatar hamoid commented on September 22, 2024

Thanks for your reply. To reproduce the error in my system:

  1. Open LT, create a new file, save it as blabla.js
  2. Type "cons"
  3. LT shows the autocomplete suggestions and I press enter to accept the first one.
    Now ternjs is stuck and I have to kill it.

As soon as I typed the first letter in the empty js file ("c") in point 2, below I read 'connected to tern server' and I see this error in the console several times:

TypeError: Cannot read property 'completion' of undefined
    at eval (file:///home/npro/Desktop/LightTable/core/node_modules/lighttable/bootstrap.js:31759:44)
    at b (file:///home/npro/Desktop/LightTable/core/node_modules/lighttable/bootstrap.js:6435:45)
    at eval (file:///home/npro/Desktop/LightTable/core/node_modules/lighttable/bootstrap.js:7913:33)
    at cljs.core.LazySeq.sval (file:///home/npro/Desktop/LightTable/core/node_modules/lighttable/bootstrap.js:5561:40)
    at cljs.core.LazySeq.cljs$core$ISeqable$_seq$arity$1 (file:///home/npro/Desktop/LightTable/core/node_modules/lighttable/bootstrap.js:5571:8)
    at cljs.core._seq (file:///home/npro/Desktop/LightTable/core/node_modules/lighttable/bootstrap.js:2311:14)
    at cljs.core.seq (file:///home/npro/Desktop/LightTable/core/node_modules/lighttable/bootstrap.js:2824:27)
    at eval (file:///home/npro/Desktop/LightTable/core/node_modules/lighttable/bootstrap.js:7899:27)
    at cljs.core.LazySeq.sval (file:///home/npro/Desktop/LightTable/core/node_modules/lighttable/bootstrap.js:5561:40)
    at cljs.core.LazySeq.cljs$core$ISeqable$_seq$arity$1 (file:///home/npro/Desktop/LightTable/core/node_modules/lighttable/bootstrap.js:5571:8)
    at cljs.core._seq (file:///home/npro/Desktop/LightTable/core/node_modules/lighttable/bootstrap.js:2311:14)
    at cljs.core.seq (file:///home/npro/Desktop/LightTable/core/node_modules/lighttable/bootstrap.js:2824:27)

Any clues? Thanks!

from lt-ternjs.

mortalapeman avatar mortalapeman commented on September 22, 2024

Interesting. That is usually one of the first things I type out when testing the plugin. What Light Table version and OS are you running?

Also, post your tern specific behaviors you in your user and workspace if you've changed any of the defaults.

from lt-ternjs.

hamoid avatar hamoid commented on September 22, 2024

I've got LT 0.7.2, binary version 0.8.4. I'm on Ubuntu 14.04, Fish shell, using i3wm instead of Unity.
Workspace behaviors is empty. User behaviors:

[:app :lt.objs.style/set-skin "dark"]
[:app :lt.objs.settings/pair-keymap-diffs]

[:editor :lt.objs.editor/no-wrap]
[:editor :lt.objs.style/font-settings "" "13" ""]
[:editor :lt.objs.style/set-theme "base16-dark"]

[:editor.clojure :lt.objs.langs.clj/print-length 1000]

;; Try to disable menu in i3wm
[:app :-lt.objs.menu/create-menu]
[:app :-lt.objs.menu/set-menu]
[:window :-lt.objs.menu/set-menu]

;; Show git changes
[:modific [(:lt.plugins.modific.util/settings
           {:git {:dir ".git" :bin "git" :diff.options ["--no-color" "--no-ext-diff"]}
            :max.file.length 1000 ; lines
            :gutter-width 2})]]

from lt-ternjs.

mortalapeman avatar mortalapeman commented on September 22, 2024

Excellent! I'll get to testing sometime this week. Thanks for the feedback,
I'll see if I can get this problem resolved.
On Dec 2, 2014 5:19 AM, "Abe Pazos" [email protected] wrote:

I've got LT 0.7.2, binary version 0.8.4.

I'm on Ubuntu 14.04, Fish shell, using i3wm instead of Unity.

Workspace behaviors is empty.

User behaviors:

'''
[:app :lt.objs.style/set-skin "dark"]
[:app :lt.objs.settings/pair-keymap-diffs]

[:editor :lt.objs.editor/no-wrap]
[:editor :lt.objs.style/font-settings "" "13" ""]
[:editor :lt.objs.style/set-theme "base16-dark"]

[:editor.clojure :lt.objs.langs.clj/print-length 1000]

;; Try to disable menu in i3wm
[:app :-lt.objs.menu/create-menu]
[:app :-lt.objs.menu/set-menu]
[:window :-lt.objs.menu/set-menu]

;; Show git changes
[:modific [(:lt.plugins.modific.util/settings
{:git {:dir ".git"
:bin "git"
:diff.options ["--no-color" "--no-ext-diff"]}
:max.file.length 1000 ; lines
:gutter-width 2})]]
'''


Reply to this email directly or view it on GitHub
#18 (comment)
.

from lt-ternjs.

hamoid avatar hamoid commented on September 22, 2024

I forgot: 32bit. I tried installing it again, but same behavior on fresh LT. The configuration folder is not fresh though...

from lt-ternjs.

mortalapeman avatar mortalapeman commented on September 22, 2024

Sorry it's taken me a while to get back to you with feedback. Life has been pretty hectic lately.

The good news is that I can reproduce the console error you provided. I remember tracking down the source of that error, but I don't remember what the resolution was. In any case, it doesn't appear to interfere with the plugin's ability to provide JavaScript auto completion.

The bad news is, I have followed the steps you provided and could not reproduve the issue. I ran top to see if node starting eating up my CPU but everything appears to be functioning normally.

I use the same version of node to run the Tern process that Light Table uses and you don't appear to have changed any of the default behaviors regarding tern in your project. Maybe there is a workspace you have currently loaded that contains JS files which cause tern to go into an infinite loop. Try adding
{:+ {:tern.config [:lt.plugins.tern/lazy-loading]}} to your user behaviors file. That should keep the plugin from trying to eagerly load any JavaScript files in your work space.

from lt-ternjs.

hamoid avatar hamoid commented on September 22, 2024

Thank you for taking a look at it.

Is your suggested change to user behaviors using the new configuration
format? I ask because in my file I only see square brackets, not curly
braces, and I'm not so familiar with the syntax :)

Happy new year!

from lt-ternjs.

mortalapeman avatar mortalapeman commented on September 22, 2024

Oh man, I probably need to update all my plugins and README files to use the new flat syntax. It looks like you would just add [:tern.config :lt.plugins.tern/lazy-loading] to the main vector.

from lt-ternjs.

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.