deprecation of 1.4 dependent code in x/tools

817 views
Skip to first unread message

Robert Griesemer

unread,
Oct 9, 2015, 5:53:33 PM10/9/15
to golang-...@googlegroups.com
If you don't depend on x/tools libraries building against 1.4 you can stop reading now.

This mail is a clarification of a mail sent to golang-dev a week ago. It includes a list of affected packages.

--------------------------

Background:

go/typesgo/constant (former go/exact), and go/importer moved to the std repo for 1.5. However, several x/tools packages still depend on the x/tools version of go/types and friends. We did not move all package dependencies to the new std repo version of go/types because many people are (were) still running against 1.4. Eventually we want to delete those old versions, with a reasonable grace period.

Note that after the 1.5 release we have stopped back-porting bug fixes to x/tools/go/types.

We intend to move forward as follows:

1) Duplicate package files as needed and mark them with build tags: For instance, if foo.go depends on x/tools/go/types, we make a copy foo14.go which gets the build tag: +build !go1.5. The file foo.go gets the build tag +build go1.5 and is then adjusted to use the std repo go/types. This will keep the packages running for now against both 1.4 and 1.5.

For an example of what the first part of this step looks like (before adjusting to use the std/repo go/types), see e.g.: https://go-review.googlesource.com/#/c/15702/ .

2) Except for keeping the build running against 1.4 (which should not require any work) we will stop any maintenance of the packages depending on 1.4 (no bug fixes, retro-active patches, etc.). All future development, bug fixes, etc. is applied to 1.5-dependent packages only.

3) x/tools packages depending on 1.4 will be deleted 1 month after 1.6 has been released. This gives clients > 3 months grace period to switch. The switch itself is pretty simple, and perhaps (if we or somebody else gets to it) there can be a go fix module.

We will send out a heads-up before deletion a couple of days before. Thus, at this point many x/tools packages require Go 1.5 or 1.6 to be able to run.

Deletion of packages may be delayed until all existing functionality has been moved to 1.5 dependencies.

The following x/tools packages are affected:

cmd/godex (specific action: 1.5 version will move to std repo go/types with build tag +ignore)
cmd/gotype (specific action: 1.5 version already moved to std repo go/types with build tag +ignore)
cmd/ssadump
cmd/stringer
cmd/vet (specific action: 1.5 version already moved to std repo)
go/exact (specific action: 1.5 version already moved to std repo as go/constant)
go/gccgoimporter (specific action: 1.5 version already moved to std repo under go/importer)
go/gcimporter (specific action: 1.5 version already moved to std repo under go/importer)
go/importer (specific action: 1.5 version already moved to std repo under go/importer)
go/types (specific action: 1.5 version already moved to std repo)
godoc/analysis
oracle
refactor/eg

If no specific action is given, the 1.5 version will remain in x/tools. 1.4 versions of all packages will be deleted per step 2).

--------------------------

Comments, feedbacks on this thread please.

- gri, for the Go team
Reply all
Reply to author
Forward
0 new messages