July 26, 2014
During the big move to GitHub we reconsidered the layout of the versioned import paths of Azul3D packages.
Since one of the goals in our move to GitHub was to split up Azul3D’s packages into multiple smaller repositories, it makes sense that we would want to possibly make API-incompatible changes (by incremented a version number, as usual) of a specific package independent of other packages: something that we couldn’t do with the old versioning scheme.
Updating to the new import path scheme is easy using a modified go-fix command:
go get azul3d.org/cmd/azulfix.v1 azulfix.v1 path/to/src/
Which will rewrite all
azul3d.org/v1 import paths to their new counterparts.
Looking at the previous import paths we had paths that looked like this:
Because the version number is stored in the middle of the URL, it would not be possible to have packages with different versions because they are all under the same version number. Instead, by moving the version to the end, we can have import paths like this:
Which allows us to increment the version numbers of specific packages independently of one-another. This is crucial going forward because it means we can break API-compatability of a single package, but leave other ones alone. In code however you will still reference the packages using just:
All in all, upgrading to the new system is made easy by the azulfix tool and going forward this will allow for better code in many situations.
If any part of this article is confusing to you, or if you’re interested in the implementation details, please see this page.