https://pantsbuild.org/ logo
w

witty-crayon-22786

11/15/2022, 9:40 PM
@ancient-vegetable-10556: re:
experimental_shell_command
the thing that is actually using immutable inputs in your repro is
experimental_run_shell_command
and it will use them in all three runs, afaik
a

ancient-vegetable-10556

11/15/2022, 9:41 PM
There’s nothing immutable to input until the first run
w

witty-crayon-22786

11/15/2022, 9:41 PM
right. so during the first run, you will pay the cost to create the immutable input. but the second run should be able to just use it
a

ancient-vegetable-10556

11/15/2022, 9:42 PM
OK, so it’s probably only deciding to make an input immutable when it gets retrieved from the cache
which is what my understanding of the behaviour was until just now
w

witty-crayon-22786

11/15/2022, 9:43 PM
that shouldn’t be the case
which is why it’s slightly odd.
b

bitter-ability-32190

11/15/2022, 9:43 PM
Wait my understanding aligns with Chriss?
w

witty-crayon-22786

11/15/2022, 9:43 PM
i’m suspecting some noise from a background process perhaps
b

bitter-ability-32190

11/15/2022, 9:43 PM
We don't make the immut input until it's needed as an input
a

ancient-vegetable-10556

11/15/2022, 9:44 PM
Stu — rightly — points out that it is an input
w

witty-crayon-22786

11/15/2022, 9:44 PM
right: but each of the three runs involves two processes: an
experimental_shell_command
, and an
experimental_run_shell_command
to consume it
b

bitter-ability-32190

11/15/2022, 9:44 PM
Ah, I'm missing some context. Somewhat ignore me
a

ancient-vegetable-10556

11/15/2022, 9:44 PM
@witty-crayon-22786 Give me a moment, I can test to see if it’s a timing issue
will be a few minutes while I investigate
b

bitter-ability-32190

11/15/2022, 9:46 PM
So yeah run 2 and 3 should have the run process sped up and the non-run be memoized
w

witty-crayon-22786

11/15/2022, 9:46 PM
right
b

bitter-ability-32190

11/15/2022, 9:51 PM
Good chance there's bugs. I still wanna write tests for this.
a

ancient-vegetable-10556

11/15/2022, 9:52 PM
OK, I now have a graph that looks like this:
Copy code
A -> B
A -> C
B -> C

A = `yarn install --immutable`
B = `sleep 5`
C = `ls {chroot}/`
Observations:
• The first run does indeed have symlinks in the output. Good! • There’s still the three-step speedup that we saw without the indirection.
w

witty-crayon-22786

11/15/2022, 9:55 PM
would need to look at traces and/or profiles i think. my guess is a background process of some sort
but in any case: immutable inputs are working there
thanks for confirming!
👍 1
b

bitter-ability-32190

11/16/2022, 3:31 PM
New comit will be coming in very soon with dirsize caching.
very soon => soonish (writing tests so I feel better about it)
OK added tests 🙂