-
Notifications
You must be signed in to change notification settings - Fork 1k
Discontinue use of inputs-digest in Gopkg.lock #1496
Comments
Here's a list of the checks that we would need, as discussed in the last maintainer's meeting:
Any corrections, additions or questions about the checks are welcome. |
The It causes merge conflicts because it is the single hottest point of merge Let's say I clone a project and I run Even then, it is still a big leap of faith to say that if these values match I'd suggest doing one of the following.
|
@ecbaldwin i think you'll find all your concerns, and more, addressed by #1912 😄 |
Gopkg.lock
contains a property calledinputs-digest
, which is a hash of the relevant inputs to the solver that were used to generate thatGopkg.lock
. The digest value can be generated by runningdep hash-inputs | tr -d “\n” | shasum -a256
. For reference, this isdep hash-inputs
output on dep itself:Basically, a list of all the imports, constraints, overrides, requireds, and ignoreds.
There are a few reasons why relying on an explicitly-recorded hash digest for this is suboptimal:
Gopkg.toml
to see if everything lines up.Gopkg.toml
without triggering a re-solve, so long as what's inGopkg.lock
is still acceptable with respect to those new constraints. (e.g., if we constraint on^1.0.0
but havev1.1.0
locked in, then moving the constraint to^1.1.0
would be fine with a direct-check system, but would trigger a pointless re-solve when relying on hash comparisons).To do this, we'll need to write some new general gps functions for checking if a lock is acceptable with respect to an input set, and probably tweak a bunch of our comparison logic. idk the full extent of it right now - i have to dig a bit. But, we need to do this.
To be clear, there's still potential value in these inputs hash digests, mostly around the possibility of pushing some computation to an edge cache, and/or enabling some prefetching or pipelining of data from upstream sources. But using it for this particular local-only check is just bad, and we need to stop.
The text was updated successfully, but these errors were encountered: