-
Notifications
You must be signed in to change notification settings - Fork 375
tern 0.22.2/0.22.1 - Looks line tern was stopped or crashed. Delete .tern-port file and restart [n]vim #990
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Any code snippets for this issue? |
@othree not sure if this will help, but here is the example that caused a crash for my own code. import { Controller } from 'stimulus';
export default class extends Controller {
static targets = [
'form',
'location',
];
onLocationTextChange() {
this.locationTarget.value = '';
this.
^^^^crashes the moment I press dot
}
connect() {
$('input[name="project[business_type_ids][]"]:hidden').attr('name', 'project_business_type_ids');
this.validator = $(this.formTarget).validate({
rules: {
// validation rules
},
submitHandler: (form) => {
$('input[name="project_business_type_ids"]:hidden').attr('name', 'project[business_type_ids][]');
form.submit();
},
});
}
disconnect() {
if (this.validator) {
this.validator.destroy();
}
}
} |
There also appears to be an example in the issue raised in carlitux/deoplete-ternjs#66 |
Thanks, found an issue is caused by anonymous class.
I will make a hotfix release for this. |
@othree for tern@0.22.2 I added a name for the class and autocomplete worked as expected. Using anonymous classes with extend like below did work fine in tern@0.21. export default class extends Controller { Thank you for your help! |
btw, acorn still not support class field. |
@othree yes, I noticed that autocomplete doesn't seem to work for static fields. For example, import React, { Component } from 'react';
import PropTypes from 'prop-types';
export default class NavMenu extends Component {
static propTypes = {
open: PropTypes.
^^^ autocomplete results are not accurate.
};
render() {
}
}
NavMenu.propTypes = {
open: PropTypes.bool.isRequire,
^^^ autocomplete results are accurate here
} |
It looks like the moment I press the dot operator tern crashes for version 0.22.2 and 0.22.1.
The issue does not occur in 0.21.
Running
node v8.12.0
npm 6.4.1
tern 0.22.1 and 0.22.2
Originally, it looked like there was an issue in the deoplete-ternjs but when I tried rolling back tern to 0.21 the issue went away.
I am running Python 3.7 locally.
Computer Info
MacOs High Sierra
Version 10.13.6
MacBook Air (13-inch, Mid 2013)
Processor 1.3 GHZ Intel Core i5
Memory 4 GB 1600 MHz DDR3
The text was updated successfully, but these errors were encountered: