Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

autocomplete-plus completion not working with go-plus #101

Closed
ghost opened this issue Nov 24, 2014 · 19 comments
Closed

autocomplete-plus completion not working with go-plus #101

ghost opened this issue Nov 24, 2014 · 19 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Nov 24, 2014

I get the following error, when I hit the tab key to start autocompletion:
Uncaught TypeError: undefined is not a function ~/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:150

If I disable go-plus autocomplete-plus is working just fine and vice versa.

OS: Ubuntu 14.04
Go: go1.3.3 linux/amd64 (@/usr/local/go/bin/go)
GOPATH: ~/code/go
Cover Tool: /usr/local/go/pkg/tool/linux_amd64/cover
Vet Tool: /usr/local/go/pkg/tool/linux_amd64/vet
Format Tool: ~/code/go/bin/goimports
Lint Tool: ~/code/go/bin/golint
Gocode Tool: ~/code/go/bin/gocode
Gocode Status: Enabled
Oracle Tool: ~/code/go/bin/oracle
Git: /usr/bin/git
Mercurial: /usr/bin/hg
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/go/bin
Atom: 0.150.0 (linux x64 3.13.0-39-generic)

@JoelHobson
Copy link

This has happened to me as well. It seems to occur (at least in my case) when no completions are found.

@lewgun
Copy link

lewgun commented Nov 29, 2014

I have the same problem, but after i set the go(binary) path in settings explicit by myself, it's work, os box: os x 10.10

@ghost
Copy link
Author

ghost commented Nov 29, 2014

I get the same error on my arch machine, too. Cloned Atom 0.152 from the git repo and built it.
@JoelHobson I can reproduce the error by typing main and hit tab in a clean go file.
@lewgun I set the "Go Installation Path" but still get the error. On my ubuntu machine go is installed in /usr/local/go/bin and it's set in the PATH.

@joefitzgerald
Copy link
Owner

Sorry you're having problems @bekite @JoelHobson @lewgun. I will try to reproduce today and let you know if I have trouble doing so.

@joefitzgerald
Copy link
Owner

By the way, in my use of the package I have encountered this error also. I've yet to build a test that can reliably reproduce it, but once I can I will fix as soon as possible.

@fourcube
Copy link
Contributor

I just updated

go-plus 2.0.6 -> 2.0.7
autocomplete-plus 0.22.5 -> 0.22.6

Autocomplete works for me again.

@woozet
Copy link

woozet commented Dec 12, 2014

I have the problem too. I just updated go-plus 2.0.7 and autocomplete-plus 0.22.6, but still not works.

Go: go1.3.3 darwin/amd64 (@/usr/local/go/bin/go)
GOPATH: /Users/woozet/go
Cover Tool: /usr/local/go/pkg/tool/darwin_amd64/cover
Vet Tool: /usr/local/go/pkg/tool/darwin_amd64/vet
Format Tool: /Users/woozet/go/bin/goimports
Lint Tool: /Users/woozet/go/bin/golint
Gocode Tool: /Users/woozet/go/bin/gocode
Gocode Status: Enabled
Oracle Tool: /Users/woozet/go/bin/oracle
Git: /usr/bin/git
Mercurial: /usr/local/Cellar/mercurial/3.1.1/bin/hg
PATH: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin
Atom: 0.157.0 (darwin x64 14.0.0)

@joefitzgerald
Copy link
Owner

@woozet: please upgrade to go 1.4.

@fourcube
Copy link
Contributor

Sorry, I have to withdraw my announcement. It stopped working again after a few moments.

@joefitzgerald
Copy link
Owner

@fourcube sorry you're having issues. I've definitely had this issue also myself. I need to modify autocomplete-plus to prevent this issue.

@joefitzgerald
Copy link
Owner

@fourcube Happy to capture the latest error message by any chance?

@ghost
Copy link
Author

ghost commented Dec 12, 2014

@joefitzgerald Here is the error I get with the updated plugins (Go Plus 3.0.7, Autocomplete Plus 0.22.7)

Uncaught TypeError: undefined is not a function

Atom Version: 0.154.0
System: linux 3.13.0-43-generic
Thrown From: autocomplete-plus package

Steps To Reproduce

  1. create a new go file
  2. type in main
  3. hit tab

Stack Trace

At /home/.../.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:137

TypeError: undefined is not a function
  at AutocompleteView.module.exports.AutocompleteView.confirmed (/home/.../.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:137:30)
  at AutocompleteView.SimpleSelectListView.confirmSelection (/home/.../.atom/packages/autocomplete-plus/lib/simple-select-list-view.coffee:98:8)
  at space-pen-div.<anonymous> (/home/.../.atom/packages/autocomplete-plus/lib/simple-select-list-view.coffee:1:1)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/atom/resources/app/src/command-registry.js:243:29)
  at /opt/atom/resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/opt/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:549:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/opt/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:391:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/opt/atom/resources/app/src/window-event-handler.js:167:20)

@ghost
Copy link
Author

ghost commented Dec 13, 2014

@joefitzgerald Just updated to go plus 3.0.8 and restarted atom. Now I get the following error on start:

Uncaught TypeError: Cannot set property 'name' of null

Atom Version: 0.154.0
System: linux 3.13.0-43-generic
Thrown From: go-plus package

Steps To Reproduce

  1. ...
  2. ...

Stack Trace

At /home/.../.atom/packages/go-plus/lib/goexecutable.coffee:98

TypeError: Cannot set property 'name' of null
  at done (/home/.../.atom/packages/go-plus/lib/goexecutable.coffee:98:15)
  at exit (/home/.../.atom/packages/go-plus/lib/executor.coffee:63:7)
  at BufferedProcess.triggerExitCallback (/opt/atom/resources/app/src/buffered-process.js:52:47)
  at /opt/atom/resources/app/src/buffered-process.js:59:18
  at Socket.<anonymous> (/opt/atom/resources/app/src/buffered-process.js:105:18)
  at Socket.emit (events.js:129:20)
  at Pipe.close (net.js:461:12)

@joefitzgerald
Copy link
Owner

I see the issue; there's a race condition.

@joefitzgerald
Copy link
Owner

@bekite Upgrade and try again now. I am guessing you actually have an error that might be visible in the developer tools console. (Command-Option-I).

@ghost
Copy link
Author

ghost commented Dec 13, 2014

@joefitzgerald The error is gone. But I have another problem now.
I can't select the auto complete suggestions using the tab key.

If I type in "m" the auto complete menu shows "main" as a suggestion.
But when I hit tab only a tab is inserted. Clicking on "main" in the auto complete menu adds "main" like expected. Using the arrow keys to navigate the auto complete menu does not work, too.

@joefitzgerald
Copy link
Owner

That was an issue with autocomplete-plus. Should be fixed in 0.22.11. Thanks for bearing with us as we fixed those issues!

@fourcube
Copy link
Contributor

Thanks a lot, everything is working fine for me now!

@nicknezis
Copy link

Setting GOBIN worked for me on OSX.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants