https://pantsbuild.org/ logo
b

bitter-ability-32190

08/31/2022, 10:50 AM
How penalized will we be if I'm making a
Snapshot
for my plugin implementors and only some of them use the
Digest
(the other build their own from the
files
plus other info)
h

hundreds-father-404

08/31/2022, 1:27 PM
Penalized in what sense?
Is this for fmt/fix/lint?
b

bitter-ability-32190

08/31/2022, 1:28 PM
Yes it is. And penalized in the space/time dimensions
The TL;DR is ideally there's a lowest common denominator on the requests to fmt/lint/fix tools. That happens to be a snapshot (because of the pipeline nature of fmt/fix)
h

hundreds-father-404

08/31/2022, 2:15 PM
I see, but
lint
does not need the snapshot. It can't be a digest? That's cheaper
b

bitter-ability-32190

08/31/2022, 2:16 PM
Some linters use the snapshot, others use the
files
and build their own Snapshot (from transitive targets and the like)
w

witty-crayon-22786

08/31/2022, 5:35 PM
it used to be a lot cheaper to hold a
Digest
, but the difference has been reduced signifificantly with the move to
DigestTrie
they’re not equivalent, but in 95% of cases converting from a
Digest
to a
Snapshot
will not involve any io
b

bitter-ability-32190

08/31/2022, 5:36 PM
In this case, I'm requesting a snapshot from pathglobs. And then the user might just ignore it.
I suspect in the end, the pros outweigh the cons. But this is the glaring mark on the implementation 😕