It was suggested that I should advertise this in the dev mailing list as it is 
a significant change.

When developing Go modules, if you do a major version release you need to 
update the module import path to add a `v#` suffix in order for the go tooling 
to handle the version properly. Up until now, since we didn't have the 
corresponding tags, anyone using the Go library would always get the master 
branch whenever they downloaded or upgraded their version of the Go module. 
There was no way to get just version 5 unless you knew the branch name or 
commit hash. You couldn't just do `go get 
github.com/apache/arrow/go/arrow@v5`<mailto:github.com/apache/arrow/go/arrow@v5%60>.

In order to fix this, a PR was made to update the release scripts to add the 
necessary tags, but we also needed to update the module import path. Given the 
dependencies of the Parquet module on the Arrow module, it made sense to make a 
change. Previously they were both separate modules with their own go.mod files. 
In order to ensure they remain in sync when versioning, I pushed 
https://github.com/apache/arrow/pull/11570 which will lift the go.mod up one 
directory making them separate packages of a single module rather than two 
separate modules.

For any users there will be a one time transition they'd need to make in order 
to upgrade to the newest release in that their own go.mod dependency would now 
be `github.com/apache/arrow/go` rather than `github.com/apache/arrow/go/arrow` 
and in order to upgrade to version 6, in their code they would change the 
import path from `github.com/apache/arrow/go/arrow` to 
`github.com/apache/arrow/go/v6/arrow`. Their actual code wouldn't have to 
change beyond the import path changes (except for any breaking changes in new 
versions).

This also means that every major version release would also require a change 
like this which touches every one of the .go files and updates the go.mod to 
the new major version suffix.

For more reference here's a couple links:

  *   https://golang.org/doc/modules/major-version
  *   https://go.dev/blog/v2-go-modules

--Matt

Reply via email to