-
Notifications
You must be signed in to change notification settings - Fork 212
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 importing packages from project #189
Comments
@gh0st42 Could you help me recheck the issue? I've tried to reproduce it and haven't managed in it. My code
Commands to run the code:
Output:
Go version Could you recheck and if the issue reproduced comment here all the steps how you start the code? |
Okay, I tried to follow your steps exactly:
If I follow the official modules quick start guide (https://github.com/golang/go/wiki/Modules#quick-start) I get the following:
My go version: Could it be that you are still within your GOPATH?
As of my understanding for current go modules support dep should not be needed anymore and the "official go way" is the one documented in https://github.com/golang/go/wiki/Modules or am I mistaken? |
Care to try out the new setup instructions in the README? We just released out Noise v2.0. |
The first instructions fail, the second ones of course work as they did before since the example are within the project itself. Also if I check
The version is v1.1.0 NOT v2.. If I specifically request v2 I get an error indicated that no matching version was found. I used many other modules successfully, also with different versions, never had problems like this. Usually should just import the modules and use them in their source code, Copying the benchmark example to a new directory
Oh and I also just tried it on brand new go 1.12, same error there. Are there any other public projects/repos using noise as a lib? |
I'm having the same problem but with the cipher package
I'm on MacOS 10.14.2 and go 1.12 If I create a package in my GOPATH and turn off modules, I am able to run it just fine, but not in a module |
I've made some progress on this but still haven't fully figured out what's going on. I'm also on MacOS 10.13.6 and go 1.12. It looks like Perlin 2.0.0 no longer contains the "crypto/ed25519" module. I imagine that's why it's using Perlin 1.1.0 which doesn't have a the
With the following
I had a similar issue when compiling the chat example. To fix that I edited
to
I still haven't figured out why it's selecting noise v1.1.0 by default though 🤔 Excited for the dust to settle around go modules. It seems like they are moving in the right direction! |
require github.com/perlin-network/noise: version "v2.0.0" invalid: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2 |
This is the only way I'm able to run the chat example. If I move main.go to the folder above the repo or anywhere else and run it I get:
I tried all the recommended setup commands and more but nothing fixes it. Go 1.13. |
Bump. When attempting to run examples/chat.go in a separate project I still get:
go.mod:
|
Hi there.
The workaround is to go get the commit ID corresponding to the tag you're interested in: Thanks. |
This should no longer be an issue once #266 is merged in. |
Cloning this repo, calling
go mod vendor
and thengo run examples/chat/main.go
works fine.The problems begin when I try to use noise from my own projects. I did the usual go mod init etc with a simple test source:
Calling this with
go run main.go
results in the following error:If I remove the logging function and only use the crypto stuff it works. If I try the same with the chat example from the noise repo but copied to my project I get the same error and also an error for the
opcodes
package.Since I am rather new to go modules, I am probably doing something really stupid. It's just extra confusing that the crypto package works..
My go version
go version go1.11.4 linux/amd64
The text was updated successfully, but these errors were encountered: