golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.99k stars 17.67k forks source link

proposal: x/tools/go/gcexportdata: drop experimental bundle API #69573

Open adonovan opened 1 month ago

adonovan commented 1 month ago

The gcexportdata package has two functions, WriteBundle and ReadBundle, that have always been marked as experimental and are not used within x/tools, nor, to my knowledge, anywhere else. The only matches in GitHub are a single call from apidiff in the obsolete golang/exp repo, and forks thereof.

package gcexportdata

func ReadBundle(in io.Reader, fset *token.FileSet, imports map[string]*types.Package) ([]*types.Package, error)
func WriteBundle(out io.Writer, fset *token.FileSet, pkgs []*types.Package) error

We propose to drop bundle functionality by making both functions return an error unconditionally.

Related:

gopherbot commented 1 month ago

Change https://go.dev/cl/614815 mentions this issue: go/gcexportdata: drop experimental Bundle support

ianlancetaylor commented 1 month ago

CC @jba for apidiff

jba commented 1 month ago

Why do you describe golang.org/x/exp as obsolete? exp means "experimental,", not "expired."

apidiff has a few users, notably the Go client libraries for GCP. I don't think we should break it.

I'd be happy to rewrite Read/WriteBundle, if you could explain how to get the same effect.

adonovan commented 1 month ago

Why do you describe golang.org/x/exp as obsolete? exp means "experimental,", not "expired."

I misremembered. In any case, it's easy enough for me to fix this one instance. My point was more that no-one is really using this feature.