So Pants is made up with a network of rules. Those...
# general
a
So Pants is made up with a network of rules. Those rules are 'run' when we call
Get(Result, Request, data)
Pants assumes that
data
is immutable, and forces
data
to be hashable. This then allows Pants to memoise/cache calls to
Get
so no matter how many times
Get(Result, Request, 1)
is called, the rule will only ever get executed once. Oh and everything is async. How does Pants handle
MultiGet( Get(Result, Request, 1), Get(Result, Request 1) )
? Is this undefined behaviour? or can we still trust that the rule will only be ran once?
1
h
Still only run once 🙂 It happens pretty frequently that multiple rules need the same thing at the same time, like downloading PEX
a
sweet
I didn't want to assume.
but I thought that was the case.
h
Btw that deduplication happens regardless of Pantsd -- the difference with Pantsd is we preserve the memoization across "sessions" (
./pants
invokes)
a
neato