Comments (6)
Hi Sergey,
Did you only grab the govec package and not broker as well?
If you have both, as a stopgap measure you can change the import to refer
directly to the local broker path at probably ./../broker instead of the
absolute github path.
On Mar 6, 2016 9:49 PM, "Sergey Skovorodnikov" [email protected]
wrote:
I can't import GoVector into the project and keep getting error where it
is looking forGoVector/govec/gopublisher.go:10:2: cannot find package "
github.com/arcaneiceman/GoVector/broker" in any of:
/usr/lib/go/src/pkg/github.com/arcaneiceman/GoVector/broker (from $GOROOT)
/home/vm/gowork/src/github.com/arcaneiceman/GoVector/broker (from $GOPATH)And then the same thing for gopublisher.go and other components. I added
GoVector as git submodule to our project and did the import from the root
of the project "project/GoVector/govec" where project is root directory
of our project. As far as I understand GOROOT needs to be set when you
install go into a custom directory, but I haven't. GOPATH is working fine
(so far) and is pointing to $HOME/gowork where the project is as well.
Should GoVector be installed under $GOPATH as well for this to work? I was
trying to make it self contained by having it as submodule.Some info:
- GoVector cloned using git submodule init
- project is at $GOPATH/src/project
- GoVector is at $GOPATH/src/project/GoVector
- the file that's importing GoVector is at $GOPATH/src/project/server
- import statement "project/GoVector/govec"
I would really appreciate some help. Might be something I am doing wrong.
Thanks.—
Reply to this email directly or view it on GitHub
#26.
from govector.
Hi Mike, I used git submodule
and checked directory structure - it seems that everything is there. I tried the suggestion and changed import to project/GoVector/broker
and got this:
GoVector/broker/pubmanager.go:12:2: cannot find package "github.com/arcaneiceman/GoVector/broker/nonce" in any of: /usr/lib/go/src/pkg/github.com/arcaneiceman/GoVector/broker/nonce (from $GOROOT) /home/sergey/gowork/src/github.com/arcaneiceman/GoVector/broker/nonce (from $GOPATH)
Then I tried changing import just to "./../GoVector/broker"
, which should reach GoVector directory but I get the same error.
I also tried specifying missing packages (I checked - they are in the filesystem):
"project_h2b9_s8z8_y4n8/GoVector/broker"
"project_h2b9_s8z8_y4n8/GoVector/broker/nonce"
"project_h2b9_s8z8_y4n8/GoVector/govec/vclock"
But they are still missing. Here is a full error message when I do those three imports (sorry, I can't find proper formatting for chunks of code):
GoVector/broker/pubmanager.go:12:2: cannot find package "github.com/arcaneiceman/GoVector/broker/nonce" in any of:
/usr/lib/go/src/pkg/github.com/arcaneiceman/GoVector/broker/nonce (from $GOROOT)
/home/sergey/gowork/src/github.com/arcaneiceman/GoVector/broker/nonce (from $GOPATH)
GoVector/broker/pubmessages.go:5:5: cannot find package "github.com/arcaneiceman/GoVector/govec/vclock" in any of:
/usr/lib/go/src/pkg/github.com/arcaneiceman/GoVector/govec/vclock (from $GOROOT)
/home/sergey/gowork/src/github.com/arcaneiceman/GoVector/govec/vclock (from $GOPATH)
GoVector/broker/submanager.go:15:2: cannot find package "golang.org/x/net/websocket" in any of:
/usr/lib/go/src/pkg/golang.org/x/net/websocket (from $GOROOT)
/home/sergey/gowork/src/golang.org/x/net/websocket (from $GOPATH)
from govector.
Hmmm. I see that the imports were fixed recently to point to the github paths. When I run
go get github.com/arcaneiceman/GoVector
It brings in the full package.
I haven't brought in a copy of a library to modify in a while, so I can't recall what needs editing to do it that way at the moment.
If you don't need to modify the source files, try removing the govec source from your project source files and just do the go get above. Sorry I can't be more helpful :(
from govector.
Thanks Mike. I followed instructions on the README.md file that say that I need to add GoVector to the project. I haven't thought of using go get to install it. I will do that and report here. I don't intend to modify source code. Thank you for your help.
UPDATE: I tried running go get github.com/arcaneiceman/GoVector
and I am getting this error:
package github.com/arcaneiceman/GoVector
imports github.com/arcaneiceman/GoVector
imports github.com/arcaneiceman/GoVector: no buildable Go source files in /home/sergey/gowork/src/github.com/arcaneiceman/GoVector
GoVector is in $GOPATH directory completely, but does not seem to build if I understand it. I haven't had issues installing other packages (like golint and gotags) before. I am not sure if this is a problem with my environment or not.
from govector.
Try go get github.com/arcaneiceman/GoVector/govec
https://github.com/arcaneiceman/GoVector/blob/master/example/ClientServer.go#L9
from govector.
Looks like that actually worked. It's no longer complaining about build files and project runs. Thanks for responses and your help - really nice to have that.
from govector.
Related Issues (20)
- Update broker_test.go to create a different broker with a new port for each test
- Create separate RPC servers for publishers and subscribers
- Create log entry with reconstructed vector clock if publisher disconnects
- Change FileSub to keep the file open and close at end of run
- Pass vclock data in Local and NetworkMessage rather than string
- Create separate log file for internal messages/errors
- Create log file for internal messages in the Broker
- Parameterize logging in GoVec HOT 1
- Parameterize logging code in Broker
- In pubmanager.go registerPublisher should return an error
- Create filters for the SubManager
- Improve output HOT 1
- Mocking Library for Log Outputs
- Integration Testing
- Error: Logical clock values for each host must start at 1 HOT 1
- nil pointer dereference when calling PrepareToSend(..) HOT 2
- Interface reflection causes crash HOT 5
- Little Code Error HOT 1
- Faulty Vector Clock Comparison HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from govector.