nkt / atom-autocomplete-modules

Autocomplete for require/import statements
https://atom.io/packages/autocomplete-modules
MIT License
114 stars 35 forks source link

Export Module Completion error #96

Closed callain closed 6 years ago

callain commented 6 years ago

Hello, here is the issue I have when I use this plugin.

Description

Adding import creates a lot of error, and makes Atom freeze when I import multiples variables or functions on the same line.

Steps to Reproduce

  1. Create a test file

test.js

export const test = () => "Hello";

export const test2 = () => "World";
  1. Try to include test from another file

index.js

import {test} from "./test";
  1. Select the text inside the brackets and edit it to add test2 to have it like this
import {test, test2} from "./test";

Expected behavior: It works fine

Actual behavior: It prints a lot of log inside the developer tools console. It is even worse when you add import with long names on the same line, Atom freeze. And I can only force close it.

Reproduces how often: Every time

Console errors

image

Versions

macOS High Sierra

Atom : 1.25.0-beta2 x64 autocomplete-modules : 1.11.0

Additional Information

I'm not sure if this an Atom Issue or autocomplete-modules issue. I will be glad to help :)

jonyeezs commented 6 years ago

I will be glad to help :)

@callain Would you like to try to put in a PR for this?

Something happened while it was trying to require test.js.

callain commented 6 years ago

I will try ;)

jonyeezs commented 6 years ago

Since changes to the package. This should be tested to see if it is still an issue.

jonyeezs commented 6 years ago

Tested and working on version 2.2.0