forked from robfig/glock
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Have sync create module major-release symlinks (robfig#48)
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.
- Loading branch information
1 parent
e56214a
commit b9663bc
Showing
4 changed files
with
116 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters