Commit 34af3382 authored by Steven Allen's avatar Steven Allen

add two checks to make sure we never update the protobuf files

parent 5d5535f0
......@@ -13,6 +13,11 @@ import (
ipld "github.com/ipfs/go-ipld-format"
)
// Make sure the user doesn't upgrade this file.
// We need to check *here* as well as inside the `pb` package *just* in case the
// user replaces *all* go files in that package.
const _ = pb.DoNotUpgradeFileEverItWillChangeYourHashes
// for now, we use a PBNode intermediate thing.
// because native go objects are nice.
......
......@@ -31,6 +31,15 @@ import strconv "strconv"
import bytes "bytes"
// DoNotUpgradeFileEverItWillChangeYourHashes warns users about not breaking
// their file hashes.
const DoNotUpgradeFileEverItWillChangeYourHashes = `
This file does not produce canonical protobufs. Unfortunately, if we change it,
we'll change the hashes of the files we produce.
Do *not regenerate this file.
`
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = math.Inf
......
package merkledag_pb
// Make sure the user doesn't upgrade this package!
// This will fail to build if the user does.
const _ = DoNotUpgradeFileEverItWillChangeYourHashes
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment