ethereum / c-kzg-4844

A minimal implementation of the Polynomial Commitments API for EIP-4844 and EIP-7594, written in C.
Apache License 2.0
112 stars 105 forks source link

Add "/v2" to Go module name #504

Closed jtraglia closed 2 weeks ago

jtraglia commented 2 weeks ago

Seems that this is necessary for a v2 release...

https://pkg.go.dev/github.com/ethereum/c-kzg-4844?tab=versions

tarassh commented 2 weeks ago

HI @jtraglia, I think this PR has no effect to versioning. If the version 2 is incompatible it has to go to v2 subdirectory. https://go.dev/blog/v2-go-modules

as an example https://github.com/googleapis/gax-go

jtraglia commented 2 weeks ago

Hey @tarassh thanks for the comment. I'm definitely not an expert on this but I think it's enough to append v2 to the module name. We will still need to make a new v2.0.1 release for this to show up on pkg.go.dev though. Are you sure the v2 code must go into a new v2 directory?

Edit: from the following link, I want to do option 1 and you're suggesting option 2. Both are valid IIUC. Right?

https://go.dev/wiki/Modules#releasing-modules-v2-or-higher

tarassh commented 2 weeks ago

Yes, just follow the links to get more context. Eventually you should be able to see this https://pkg.go.dev/github.com/googleapis/gax-go?tab=versions with this repo.

UPD: the answer refers to the question before the edit.

jtraglia commented 2 weeks ago

Eventually you should be able to see this https://pkg.go.dev/github.com/googleapis/gax-go?tab=versions with this repo.

I see. But that project chose that way of handling things. It's not strictly necessary. Unless it's required, I'd rather not maintain two versions of the codebase.