Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle never returns #13

Open
anacrolix opened this issue Dec 28, 2014 · 5 comments
Open

Oracle never returns #13

anacrolix opened this issue Dec 28, 2014 · 5 comments

Comments

@anacrolix
Copy link

Pressing ctrl+shift+o and selecting something shows a buffer that contains the following:

Running oracle callees command...

It never finishes. The console contains:

Traceback (most recent call last):
  File "goOracle in /Users/anacrolix/Library/Application Support/Sublime Text 3/Installed Packages/GoOracle.sublime-package", line 46, in on_done
  File "goOracle in /Users/anacrolix/Library/Application Support/Sublime Text 3/Installed Packages/GoOracle.sublime-package", line 115, in oracle
TypeError
@ericaro
Copy link

ericaro commented Dec 31, 2014

exact same thing here.

the fix is to update your project settings file (*.sublime-project ) to contain:

    {
        "folders":
        [... your stuff ... ],
        "settings":
        {
            "GoOracle":{
                "env":
                {
                    "GOPATH": "/Src/myproject",
                    "PATH": "$GOPATH/bin:$PATH"
                },
                "oracle_scope": ["github.com/ericaro/mrepo/a"]
            }
        }
    }

@pwaller
Copy link

pwaller commented Apr 14, 2015

I got the TypeError, did as @ericaro suggested, and now I get this:

Traceback (most recent call last):
  File "./goOracle.py", line 46, in on_done
  File "./goOracle.py", line 121, in oracle
AttributeError: 'module' object has no attribute 'set_timeout_async'

Sublime text 2, Ubuntu 14.04.

@dr2chase
Copy link

I also see nothing, and the instructions above for which file to edit do not contain enough context.
There are no files on my file system with that suffix, therefore I do not know which one to edit.
(Or rather, I have edited the entire (empty) set of them, so I followed the instructions to the letter.)

I have set up .../Packages/GoOracle/User.sublime-settings like so:
{
"env": { "GOPATH": "$HOME/work/gocode", "GOROOT": "$HOME/work/go", "PATH": "$HOME/work/go/bin:$HOME/work/gocode/bin:$PATH" },
"oracle_scope": [],
"oracle_format": "plain",
"output": "buffer"
}

On the command line I get:
oracle -format=plain -pos=$GOROOT/src/net/http/triv.go:#413 what
/Users/drchase/work/go/src/net/http/triv.go:26.25-26.38: identifier
/Users/drchase/work/go/src/net/http/triv.go:26.20-26.38: selector
/Users/drchase/work/go/src/net/http/triv.go:26.18-26.38: field/method/parameter
/Users/drchase/work/go/src/net/http/triv.go:26.17-26.58: field/method/parameter list
/Users/drchase/work/go/src/net/http/triv.go:26.1-29.1: function declaration
/Users/drchase/work/go/src/net/http/triv.go:7.1-141.1: source file
-: modes: [callers callstack definition describe implements pointsto referrers]
-: srcdir: /Users/drchase/work/go/src
-: import path: net/http

I'm using Sublime Text 3 on a Mac running Mavericks.
I edited User.sublime-settings (the first time) with emacs.
My query to GoOracle in Sublime Text references the exact same file and position (I installed a character counter plugin to get that part right, it was also not working before I installed the character counter plugin).

Thanks for any assistance.

@dr2chase
Copy link

dr2chase commented May 1, 2015

Success!! This is (exactly) what worked for me -- I am working on Go 1.5.
In /Users/drchase/work/go/GoDevel.sublime-project, I put the following,
this may be more than is necessary, but this worked:

{
    "folders": [ {
        "follow_symlinks": true,
        "path":"/Users/drchase/work/go/src"
    } ],
    "settings": {
        "GoOracle": {
            "env": {
                "GOPATH": "/Users/drchase/GoogleDrive/work/gocode",
                "GOROOT": "/Users/drchase/GoogleDrive/work/go",
                "PATH": "$GOPATH/bin:$GOROOT/bin:$PATH"
            },
            "oracle_scope": ["github.com/golang/go"]
        }
    }
}
  • GOROOT appears to be necessary
  • Symbolic links cannot appear in GOPATH or GOROOT; this seems like a bug, or else at least some missing documentation.

@jostyee
Copy link

jostyee commented Feb 24, 2016

@dr2chase tried w/o luck :-(

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

No branches or pull requests

5 participants