internal/pkgbits: sync version.go with goroot
This updates the format version to V3 to support CompactCompLiterals
in export data, fixing tests that fail due to an unsupported version
when importing packages built with Go 1.25.
diff --git a/internal/pkgbits/version.go b/internal/pkgbits/version.go
index 53af9df..beebb22 100644
--- a/internal/pkgbits/version.go
+++ b/internal/pkgbits/version.go
@@ -1,4 +1,4 @@
-// Copyright 2024 The Go Authors. All rights reserved.
+// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -28,6 +28,12 @@
// - remove derived info "needed" bool
V2
+ // V3: introduces a more compact format for composite literal element lists
+ // - negative lengths indicate that (some) elements may have keys
+ // - positive lengths indicate that no element has a key
+ // - a negative struct field index indicates an embedded field
+ V3
+
numVersions = iota
)
@@ -61,6 +67,9 @@
// whether a type was a derived type.
DerivedInfoNeeded
+ // Composite literals use a more compact format for element lists.
+ CompactCompLiterals
+
numFields = iota
)
@@ -68,6 +77,7 @@
var introduced = [numFields]Version{
Flags: V1,
AliasTypeParamNames: V2,
+ CompactCompLiterals: V3,
}
// removed is the version a field was removed in or 0 for fields
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +2 |
// Copyright 2021 The Go Authors. All rights reserved.Intentional?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +1 |
// Copyright 2021 The Go Authors. All rights reserved.Robert GriesemerIntentional?
copy&paste error - fixed
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
1 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: internal/pkgbits/version.go
Insertions: 1, Deletions: 1.
@@ -1,4 +1,4 @@
-// Copyright 2021 The Go Authors. All rights reserved.
+// Copyright 2024 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
```
internal/pkgbits: sync version.go with goroot
This updates the format version to V3 to support CompactCompLiterals
in export data, fixing tests that fail due to an unsupported version
when importing packages built with Go 1.25.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |