Comments (9)
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.
Thanks for your reply. To reproduce the error in my system:
- Open LT, create a new file, save it as blabla.js
- Type "cons"
- 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.
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.
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.
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.
I forgot: 32bit. I tried installing it again, but same behavior on fresh LT. The configuration folder is not fresh though...
from lt-ternjs.
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.
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.
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)
- Mixed CommonJS and AMD project cause crash HOT 5
- JSDoc text display needs formating HOT 1
- Problems with transient javascript editor HOT 1
- TernJs continue to run after LightTable close HOT 1
- Allow other plugins to append to list of hints / append tern hints to any existing hints ? HOT 2
- Infinite loop on connect HOT 4
- How is this plugin used? HOT 1
- Ability to configure plugins for Tern server HOT 1
- Add tern-lint support HOT 2
- Support for tern-guess-types
- Invalid behavior: :lt.plugins.tern/start-server - Light Table 0.8.0 HOT 6
- Disconnected from: Tern Javascript Server HOT 5
- Add paritial file support to auto-complete HOT 1
- Add command for generating Tern defs for a library
- Plugin loads more JS files than necessary and does so synchronously HOT 10
- Add support for loading a single .tern-project file HOT 1
- Add support for variable renaming
- Error: channel closed HOT 12
- Tern no longer finds node_modules HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lt-ternjs.