Skip to content

Commit d381731

Browse files
dmitshurgopherbot
authored andcommitted
README.vendor: document release cycle considerations
Write down a few more things relevant to the process of maintaining the vendor directory for the std and cmd modules. This includes the import path of the package containing a tree consistency check, and some considerations regarding the Go release cycle. Also mention the updatestd command with enough context so that it's clear that it is okay to either use it to update everything at once, or instead update specific modules with individual 'go get' calls, whichever is a better fit for the task at hand. For golang#31806. For golang#36905. Change-Id: I37d391c557d6cf6ebf2751d71ab9c8f7c10d922d Reviewed-on: https://go-review.googlesource.com/c/go/+/739301 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Ian Alexander <jitsu@google.com> Reviewed-by: Damien Neil <dneil@google.com> TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
1 parent cffd7a3 commit d381731

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/README.vendor

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ Go from source and use that 'go' binary to update its source tree.
3939

4040
Requirements may be added, updated, and removed with 'go get'.
4141
The vendor directory may be updated with 'go mod vendor'.
42+
Tree inconsistencies are reported by 'go test cmd/internal/moddeps'.
4243
A typical sequence might be:
4344

4445
cd src # or src/cmd
4546
go get golang.org/x/net@master
4647
go mod tidy
4748
go mod vendor
49+
go test cmd/internal/moddeps
4850

4951
Use caution when passing '-u' to 'go get'. The '-u' flag updates
5052
modules providing all transitively imported packages, not only
@@ -53,3 +55,22 @@ the module providing the target package.
5355
Note that 'go mod vendor' only copies packages that are transitively
5456
imported by packages in the current module. If a new package is needed,
5557
it should be imported before running 'go mod vendor'.
58+
59+
Go release cycle considerations
60+
===============================
61+
62+
Applying changes to packages that are vendored follows the considerations
63+
written down at go.dev/s/release.
64+
65+
When the Go tree is open for development, a specific change may be pulled in
66+
at any time that it is needed. During the release freeze, the bar for changes
67+
in vendored packages is the same as it is for changes in non-vendored packages.
68+
After a major release is out, minor Go releases follow a more involved process
69+
documented at go.dev/wiki/MinorReleases#cherry-pick-cls-for-vendored-golangorgx-packages.
70+
71+
In addition to individual updates that happen on demand, all dependencies in
72+
the std and cmd modules are updated to their latest available versions at least
73+
twice during every major release cycle. This is done to avoid the possibility of
74+
some dependencies being left on very old versions and in turn make their eventual
75+
update more disruptive. This recurring process is tracked in go.dev/issue/36905.
76+
The golang.org/x/build/cmd/updatestd command exists to assist with that process.

0 commit comments

Comments
 (0)