Skip to content

Commit bdaa8bf

Browse files
committed
go/gcexportdata: warn that {Read,Write}Bundle are experimental
After playing with these a little, they definitely get the job done. But I'm already seeing a few ways the API could be nicer (e.g., provide a bundle-backed go/importer.Importer implementation that reads packages out on demand, so unneeded packages don't need to be read). So mark these APIs as experimental so users know not to get too attached to them just yet. Change-Id: Idb98f45095a0c6f9825ff07172f62c42d8453016 Reviewed-on: https://go-review.googlesource.com/c/tools/+/294310 Reviewed-by: Rebecca Stambler <[email protected]> Trust: Matthew Dempsky <[email protected]>
1 parent f4301d9 commit bdaa8bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

go/gcexportdata/gcexportdata.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ func Write(out io.Writer, fset *token.FileSet, pkg *types.Package) error {
114114
// within the export bundle to other packages are consistent.
115115
//
116116
// On return, the state of the reader is undefined.
117+
//
118+
// Experimental: This API is experimental and may change in the future.
117119
func ReadBundle(in io.Reader, fset *token.FileSet, imports map[string]*types.Package) ([]*types.Package, error) {
118120
data, err := ioutil.ReadAll(in)
119121
if err != nil {
@@ -124,6 +126,8 @@ func ReadBundle(in io.Reader, fset *token.FileSet, imports map[string]*types.Pac
124126

125127
// WriteBundle writes encoded type information for the specified packages to out.
126128
// The FileSet provides file position information for named objects.
129+
//
130+
// Experimental: This API is experimental and may change in the future.
127131
func WriteBundle(out io.Writer, fset *token.FileSet, pkgs []*types.Package) error {
128132
return gcimporter.IExportBundle(out, fset, pkgs)
129133
}

0 commit comments

Comments
 (0)