When a module containing a go.mod is synced, the module name may contain
a major release suffix (e.g. "rsc.io/quote/v2"), indicating that the
code at the module root is a post-v1 major release and that users of the
module should import it with this suffix. Prior to this change, code
using such a module would have had to import it without the suffix,
requiring different versions of the client code to exist in order to
be buildable in both module-aware and legacy-GOPATH modes.
This change creates a self-referencing major-release symlink if the
imported module contains a go.mod specifying a major release suffix.
This allows both legacy-GOPATH and module-aware builds to succeed,
which can help users migrating from glock to Go modules avoid a hard
cutover due to import path incompatibilities.
Because glock now changes the contents in GOPATH/src/... from the
checked-out source, the git tagSyncCmd was updated with a -f flag, in
order to force checkout and overwrite any created symlinks that might
conflict with to-be-checked-out content.
When a module containing a go.mod is synced, the module name may contain a major release suffix (e.g. "rsc.io/quote/v2"), indicating that the code at the module root is a post-v1 major release and that users of the module should import it with this suffix. Prior to this change, code using such a module would have had to import it without the suffix, requiring different versions of the client code to exist in order to be buildable in both module-aware and legacy-GOPATH modes.
This change creates a self-referencing major-release symlink if the imported module contains a go.mod specifying a major release suffix. This allows both legacy-GOPATH and module-aware builds to succeed, which can help users migrating from glock to Go modules avoid a hard cutover due to import path incompatibilities.
Because glock now changes the contents in GOPATH/src/... from the checked-out source, the git tagSyncCmd was updated with a -f flag, in order to force checkout and overwrite any created symlinks that might conflict with to-be-checked-out content.