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

go get fails #4944

Open
markus2330 opened this issue May 23, 2023 · 11 comments
Open

go get fails #4944

markus2330 opened this issue May 23, 2023 · 11 comments
Assignees

Comments

@markus2330
Copy link
Contributor

$ go get github.com/ElektraInitiative/libelektra/src/bindings/go-elektra@v0.10.0
go: downloading github.com/ElektraInitiative/libelektra v0.10.0
go: module github.com/ElektraInitiative/libelektra@v0.10.0 found, but does not contain package github.com/ElektraInitiative/libelektra/src/bindings/go-elektra
@tmakar
Copy link
Contributor

tmakar commented May 23, 2023

@markus2330 is v0.10.0 tag pushed?

@markus2330
Copy link
Contributor Author

Yes, and it is found, see output above.

@tmakar
Copy link
Contributor

tmakar commented May 23, 2023

@markus2330 When using go get one needs to use the commit hash instead of using the tag, when using go modules which are nested, see following output (the go.mod then automatically uses v0.10.0):

$ go get -v github.com/ElektraInitiative/libelektra/src/bindings/go-elektra@4f45d0c
go: downloading github.com/ElektraInitiative/libelektra/src/bindings/go-elektra v0.10.0
go: added github.com/ElektraInitiative/libelektra/src/bindings/go-elektra v0.10.0
$ cat go.mod 
module irgendwas

go 1.20

require github.com/ElektraInitiative/libelektra/src/bindings/go-elektra v0.10.0 // indirect

@tmakar
Copy link
Contributor

tmakar commented May 23, 2023

4f45d0c is the commit hash where also the tag v0.10.0 exists

@tmakar
Copy link
Contributor

tmakar commented May 23, 2023

At least the correct version tag is used in the go.mod file which is the most important thing.

@tmakar
Copy link
Contributor

tmakar commented May 23, 2023

I also tested the example in the go-elektra/README.md in an external go program, works also perfectly 😁

$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
$ go mod tidy
go: finding module for package github.com/ElektraInitiative/libelektra/src/bindings/go-elektra/kdb
go: found github.com/ElektraInitiative/libelektra/src/bindings/go-elektra/kdb in github.com/ElektraInitiative/libelektra/src/bindings/go-elektra v0.10.0
$ go run t.go 
Value of "/go/elektra" is: Hello World!
$ 

@tmakar
Copy link
Contributor

tmakar commented May 23, 2023

@markus2330 Well, I don't know why, but now also go get github.com/ElektraInitiative/libelektra/src/bindings/go-elektra@v0.10.0 works. Probably it took some time 😄

@tmakar
Copy link
Contributor

tmakar commented May 23, 2023

$ go clean -modcache
$ go get -v github.com/ElektraInitiative/libelektra/src/bindings/go-elektra@v0.10.0
go: downloading github.com/ElektraInitiative/libelektra v0.10.0
go: downloading github.com/ElektraInitiative/libelektra/src/bindings/go-elektra v0.10.0
$ 

@tmakar
Copy link
Contributor

tmakar commented May 23, 2023

So, I think we can close this issue now!

@tmakar
Copy link
Contributor

tmakar commented May 23, 2023

@markus2330 Tried on windows as well, works also perfectly 🎉

PS> go get github.com/ElektraInitiative/libelektra/src/bindings/go-elektra@v0.10.0
go: downloading github.com/ElektraInitiative/libelektra/src/bindings/go-elektra v0.10.0
go: downloading github.com/ElektraInitiative/libelektra v0.10.0
go: added github.com/ElektraInitiative/libelektra/src/bindings/go-elektra v0.10.0

@markus2330
Copy link
Contributor Author

Seems like go version 0.20.0 is needed. With the versions before it did not work for me.

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