forked from kubev2v/forklift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ova: fix the version of encoding/gob
Unfortunately, we rely on 'encoding/gob' to determine the UUID of VMs from OVAs and this package has changed in Go 1.21 in a way we get a different UUID compared to the one we get with Go 1.20 for the same input, which could break existing OVA providers. Therefore, this package integrates the relevant pieces from 'encoding/gob' of Go 1.20 so that we can bump Go to 1.21 without breaking compatibility with OVA providers that were defined in lower versions of Forklift. Signed-off-by: Arik Hadas <[email protected]>
- Loading branch information
Showing
10 changed files
with
2,366 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
run: | ||
skip-dirs: | ||
- pkg/lib/gob | ||
linters: | ||
enable: | ||
- ginkgolinter | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
|
||
go_library( | ||
name = "gob", | ||
srcs = [ | ||
"decoder.go", | ||
"enc_helpers.go", | ||
"encode.go", | ||
"encoder.go", | ||
"error.go", | ||
"type.go", | ||
], | ||
importpath = "github.com/konveyor/forklift-controller/pkg/lib/gob", | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2009 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. | ||
|
||
package gob | ||
|
||
// tooBig provides a sanity check for sizes; used in several places. Upper limit | ||
// of is 1GB on 32-bit systems, 8GB on 64-bit, allowing room to grow a little | ||
// without overflow. | ||
const tooBig = (1 << 30) << (^uint(0) >> 62) |
Oops, something went wrong.