presenting it would involve roughly 1) creating a ...
# announce
w
presenting it would involve roughly 1) creating a
files
target covering the cache, 2) adding that dependency to all tests that need the cache, 3) redefining the cache dir in tests via an env var
h
Wouldn’t this kill reproducibility of tests? Any single change to the cache dir would invalidate the test result
w
The bin directory is pretty stable. But yeah, that's another reason to opt for explicit
h
Stable minus the pants.pex subdir
w
Yea.
ok.... i think i have a good incremental gameplan for this. 1. add an
extra_env_vars
arg to
python_test
(to mirror jvm) and use it to set the cache dir to a relative path inside the hermetic sandbox 2. add a
files
target shaped like the relevant cache entry 3. add a hacky
curl
in the pants script to populate the input to the
files
target
h
The only changes to
src
would be part 1, right? With 3, keep in mind that CI uses pants.pex and not ./pants
w
the last part is, i think, the only hacky bit. but it could probably be replaced by a "curl a file" target type in the medium term.
yep. the pex-in-the-test-workspace is the inspiration for 3.
h
When / where would step 3 happen during CI?
w
the pants script
right where the conditional pex creation happens
h
(Flight is about to lift off, talk later about this. Thank you for working on improving this all!)
w
np
safe travels.
h
Ie during
ci.py —bootstrap
?
w
um, unclear. you might know better.
i'm going to start at the top and work downward.
...slightly insane thought. what if we began including a default jar... in the wheel?