]> Cypherpunks.ru repositories - gostls13.git/commit
internal/pkgbits: add fingerprints to unified IR export format
authorMatthew Dempsky <mdempsky@google.com>
Wed, 23 Mar 2022 19:10:02 +0000 (12:10 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 28 Mar 2022 19:58:45 +0000 (19:58 +0000)
commit42ca44494c6ca94c6a1f433e61bc5d95d51b2222
tree568d6f0c684e57e47df201664f15087d16cd09b5
parent1a9972ec87de1eba7f9f71c8ed4afa88b0c122d4
internal/pkgbits: add fingerprints to unified IR export format

So far unified IR has been relying on the backwards-compat iexport
data to supply package fingerprints for imports. To be able to drop
the iexport data and natively use unified IR everywhere.

This CL applies basically the same idea that iexport used: simply
hash all of the export data as it's being written out, and then tack
on an 8-byte hash at the end.

Change-Id: Iaca5fbfd7443088bc7f422a1c58be3e762c29014
Reviewed-on: https://go-review.googlesource.com/c/go/+/396196
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/go/build/deps_test.go
src/internal/pkgbits/decoder.go
src/internal/pkgbits/encoder.go