Skip to content

Commit c586dbb

Browse files
cuonglmgopherbot
authored andcommitted
internal/pkgbits: add DerivedInfoNeeded
So next CL can use it to remove unnecessary derivedInfo needed field. Updates #68778 Change-Id: Ia4e0f638beaf4a448fbf10a9aa1bc9425349a5e8 Reviewed-on: https://go-review.googlesource.com/c/go/+/608215 Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Tim King <taking@google.com> Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
1 parent 2b0a157 commit c586dbb

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/internal/pkgbits/pkgbits_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ func TestVersions(t *testing.T) {
4545
{pkgbits.V1, pkgbits.HasInit},
4646
{pkgbits.V0, pkgbits.DerivedFuncInstance},
4747
{pkgbits.V1, pkgbits.DerivedFuncInstance},
48+
{pkgbits.V0, pkgbits.DerivedInfoNeeded},
49+
{pkgbits.V1, pkgbits.DerivedInfoNeeded},
4850
{pkgbits.V2, pkgbits.AliasTypeParamNames},
4951
} {
5052
if !c.v.Has(c.f) {
@@ -57,6 +59,7 @@ func TestVersions(t *testing.T) {
5759
{pkgbits.V0, pkgbits.Flags},
5860
{pkgbits.V2, pkgbits.HasInit},
5961
{pkgbits.V2, pkgbits.DerivedFuncInstance},
62+
{pkgbits.V2, pkgbits.DerivedInfoNeeded},
6063
{pkgbits.V0, pkgbits.AliasTypeParamNames},
6164
{pkgbits.V1, pkgbits.AliasTypeParamNames},
6265
} {

src/internal/pkgbits/version.go

+6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const (
2525
// - remove the legacy "has init" bool from the public root
2626
// - remove obj's "derived func instance" bool
2727
// - add a TypeParamNames field to ObjAlias
28+
// - remove derived info "needed" bool
2829
V2
2930

3031
numVersions = iota
@@ -56,6 +57,10 @@ const (
5657
// ObjAlias has a list of TypeParamNames.
5758
AliasTypeParamNames
5859

60+
// Deprecated: DerivedInfoNeeded was a bool indicating
61+
// whether a type was a derived type.
62+
DerivedInfoNeeded
63+
5964
numFields = iota
6065
)
6166

@@ -71,6 +76,7 @@ var introduced = [numFields]Version{
7176
var removed = [numFields]Version{
7277
HasInit: V2,
7378
DerivedFuncInstance: V2,
79+
DerivedInfoNeeded: V2,
7480
}
7581

7682
// Has reports whether field f is present in a bitstream at version v.

0 commit comments

Comments
 (0)