biscuit-auth / biscuit-go

Apache License 2.0
75 stars 22 forks source link

Can't import v2 #104

Closed guregu closed 1 year ago

guregu commented 2 years ago

I think v2 might be released improperly.

$ go get github.com/biscuit-auth/biscuit-go@v2.0.0
go: downloading github.com/biscuit-auth/biscuit-go/v2 v2.0.0
go: go.mod has non-.../v2 module path "github.com/biscuit-auth/biscuit-go" (and .../v2/go.mod does not exist) at revision v2.0.0

$ go get github.com/biscuit-auth/biscuit-go/v2@v2.0.0
go: github.com/biscuit-auth/biscuit-go@v2.0.0: invalid version: module contains a go.mod file, so module path must match major version ("github.com/biscuit-auth/biscuit-go/v2")

AFAIK these are the two options:

TL;DR: this needs /v2 at the end: https://github.com/biscuit-auth/biscuit-go/blob/main/go.mod#L1, and I think it either needs to be in a v2 branch or a v2 folder (not sure if v2 from main branch works). The internal imports for the datalog package, etc., need /v2 in their imports as well.

hagmonk commented 1 year ago

I think this is still busted until someone tags the right version per https://github.com/biscuit-auth/biscuit-go/pull/106#issuecomment-1347379877

In the meantime, I've just been specifying the commit directly:

go get github.com/biscuit-auth/biscuit-go/v2@370cd7c
Pranay-Munshi commented 1 year ago

Is this issue fixed or not? I tried to do go get github.com/biscuit-auth/biscuit-go/v2@370cd7c which was successful but in imports I am not able to use above path. I tried below - "github.com/biscuit-auth/biscuit-go/v2@370cd7c" but it is saying invalid import path.

Geal commented 1 year ago

Right, thanks for the report, looking into it

Geal commented 1 year ago

I pushed a new tag, let me know if that fixes it for you

chilarai commented 1 year ago

Thanks. I did not face any issue this time while using the following go get github.com/biscuit-auth/biscuit-go/v2

guregu commented 1 year ago

Works great now, thank you!