dart-atom / dart

A Dart plugin for Atom.
http://dart-atom.github.io/dart/
BSD 3-Clause "New" or "Revised" License
154 stars 44 forks source link

Plugin has stopped working in recent releases #898

Open halverneus opened 8 years ago

halverneus commented 8 years ago

Autocomplete has stopped working. Outline shows "outline not available". Dartfmt doesn't run on save, etc... The plugin used to work a short time ago. I deleted the configuration and reinstalled Atom and dartlang (which pulled in linter, etc...) and features are still not working. Same issue occurs on my home and work computers. All machines are Kubuntu 14.04 64 bit, using Atom 1.6.0 and Dartlang 0.6.8 with Dart 1.15.0. Plugin finds the Dart SDK. Analysis server runs and shows files actively being analyzed. I do appear to get warnings/info from the analysis server. No plugin errors. Any other places I can look for more information?

devoncarew commented 8 years ago

Yeah, any exceptions or issues that occur - that we don't show to the user - we log to the JS console. If you open devtools in Atom (View > Developer > Toggle Developer Tools), and switch to the console view, you could check for any exceptions.

You might also check if it's just one project or not working for all of them. You could also try the latest dev release of Dart(1.16.0-dev.2.0); and it'd be good to know what OS you're using. Thanks for any more details!

halverneus commented 8 years ago

The outline doesn't show any exceptions, but I was able to pull this:

Uncaught (in promise) DartObject {o: RequestError} Uncaught (in promise) DartObject {o: RequestError}o: RequestError_$dart_jsObject: DartObjecto: RequestErrorproto: DartObjectcode: "UNKNOWNSOURCE"message: "Unknown source"method: "completion.getSuggestions"stackTrace: undefinedproto: RequestError$isRequestError: RequestError(method, code, message, stackTrace)^: "Object;method,code>,message>,stackTrace<"constructor: RequestError(method, code, message, stackTrace)get$code: (receiver)get$message: (receiver)get$stackTrace: ()toString$0: ()proto: Objectproto: DartObjectconstructor: DartObject(o)arguments: nullcaller: nulllength: 1name: "DartObject"prototype: DartObjectconstructor: DartObject(o)arguments: nullcaller: nulllength: 1name: "DartObject"prototype: DartObjectproto: ()proto: Objectproto: ()proto: ObjectdefineGetter: defineGetter()defineSetter: defineSetter()lookupGetter: lookupGetter()lookupSetter: lookupSetter()constructor: Object()hasOwnProperty: hasOwnProperty()isPrototypeOf: isPrototypeOf()propertyIsEnumerable: propertyIsEnumerable()toLocaleString: toLocaleString()toString: toString()valueOf: valueOf()get proto: get proto()set proto: set proto()

Every time I try to dig deeper it crashes Atom. Looks like it can't find the "completion.getSuggestions" method, if I'm reading that right. As mentioned above, I'm running Kubuntu 14.04 64 bit. Unfortunately I can't install anything newer than 1.15.0 as I'm limited to using a private apt-mirror which doesn't provide less than stable releases (mirrors from repo described in https://www.dartlang.org/downloads/linux.html without the dev channel). Let me know if there are more details I can provide or something I can try.

devoncarew commented 8 years ago

I think you're seeing an exception from the analysis server when we ask it for code completions. If you're seeing other analysis issue after this, it could be that the analysis server is crashing. I would try and upgrade or downgrade away from the specific SDK version and see if that solves the issue.

halverneus commented 8 years ago

Narrowed the issue down. Plugin works perfectly if I open the folder containing the pubspec.yaml as the project folder. My typical workflow has always put that folder nested one directory (my servers are programmed in Go, so the client contents are nested one level beneath that project). When opened in the shallowly nested scenario, autocomplete, outline, dartfmt, etc... do not work, though I do get all the 'info' messages. If this is intended by design, then I'll switch to specially opening the Dart project in its own project folder. If not by design, than it is a bug.

devoncarew commented 8 years ago

So you open foo/ from foo/dart_foo/? That should work. Is your project a normal dart project after that - w/ a pubspec, a lib/ folder, ...?

halverneus commented 8 years ago

It is. I have: /myapp/ /myapp/web/ /myapp/web/.packages /myapp/web/lib/ /myapp/web/packages/ /myapp/web/web/ /myapp/web/pubspec.lock /myapp/web/pubspec.yaml etc....

When I open 'myapp' as the project folder, I don't get the features listed. The Analysis server shows that it is running with no sign of crashing. In fact, I can open 'myapp' as one project folder and 'web' (myapp/web) as the other project folder and things either work or don't work, depending on from which project I open it.

halverneus commented 8 years ago

Started having the issue, again. Narrowed it down to symlinks. Whenever I open a Dart project in Atom that is nested under a symlink, the Outline isn't filled out and the autocomplete doesn't work.

Given: /home/user/Remote/Dev/Dart/Project/pubspec.yaml /home/user/Dev -> /home/user/Remote/Dev (symlink)

Opening "/home/user/Remote/Dev/Dart/Project/pubspec.yaml" works perfectly fine. Opening "/home/user/Dev/Dart/Project/pubspec.yaml" breaks the outline and autocomplete.

tdmurtmub commented 8 years ago

I am experiencing the same issue.

Any dart source files that are members of a symlink folder (mklink in Windows) display "outline not available" in the outline view.

Please fix a.s.a.p.

Thanks