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

Error: Could not find source directory #50

Closed
sztanpet opened this issue Jan 17, 2015 · 6 comments
Closed

Error: Could not find source directory #50

sztanpet opened this issue Jan 17, 2015 · 6 comments

Comments

@sztanpet
Copy link
Contributor

I get the following error while trying to run ffjson for a file

Error: error=Could not find source directory: GOPATH=["/home/sztanpet/go/gocode"] REL="/home/sztanpet/go/destinyggchat" path="":

must REL be a relative path or something?

@pquerna
Copy link
Owner

pquerna commented Jan 17, 2015

Is your code inside your GOPATH? From the error message it looks like destinyggchat is outside the GOPATH?

Because of how ffjson works, your code must be inside your GOPATH, so that it can compile your project to export the structure.

@sztanpet
Copy link
Contributor Author

indeed it is outside GOPATH

@sztanpet
Copy link
Contributor Author

symlinked it into the GOPATH but it still says

Error: error=Could not find source directory: GOPATH=["/home/sztanpet/go/gocode"] REL="/home/sztanpet/go/gocode/destinyggchat" path="":

@pquerna
Copy link
Owner

pquerna commented Jan 17, 2015

It needs to be in a correct part of the GOPATH, under the src directory:

https://golang.org/doc/code.html#Workspaces

So if your project is called destinyggchat, your source code goes in $GOPATH/src/github.com/destinygg/chat

@sztanpet
Copy link
Contributor Author

Thank you, works perfectly now

May I ask for this information to be made more clear in the docs?

@pquerna
Copy link
Owner

pquerna commented Jan 17, 2015

Yeah, not sure how to best document this -- ffjson just depends on import paths and $GOPATH being setup the 'standard' way....

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

2 participants