one other tidbit here: we don't cache zinc increme...
# general
w
one other tidbit here: we don't cache zinc incremental compiles
@polite-vase-75369: it's possible this is tied in to what you're seeing; but unknown. see the
--compile-zinc-incremental
setting
p
what should i try setting it to?
w
leave it where it is. would just suggest reading the docs on that setting and the
--compile-zinc-incremental-caching
setting
find in page for
-incremental
on here: https://www.pantsbuild.org/options_reference.html
Copy code
--[no-]compile-zinc-incremental (default: True)
When set, zinc will use sub-target incremental compilation, which dramatically improves compile performance while changing large targets. When unset, changed targets will be compiled with an empty output directory, as if after running clean-all.
--[no-]compile-zinc-incremental-caching (default: False)
When set, the results of incremental compiles will be written to the cache. This is unset by default, because it is generally a good precaution to cache only clean/cold builds.
p
ah fascinating
w
so it's a good idea to set
--no-compile-zinc-incremental
in CI, as that allows everything to be cached.
also "generally a good precaution" is too soft... basically: zinc is still riddled with bugs
p
hah so this might be bad to enable?
w
--compile-zinc-incremental-caching
... yes, you'd be living dangerously.
basically, any of the zinc bugs under https://github.com/pantsbuild/pants/labels/jvm would be liable to be written to the cache
and then you'd have to wipe the cache
we've been about 2 years "need to wipe the cache to fix an issue" free.
p
so enabling incremental "fixed the problem" for me, but i dont get why it wont just cache after a compile finishes?
w
sorry, which setting?
p
--compile-zinc-incremental-caching
w
yea, that one is scary. would not recommend it.
p
so how can i go about getting cacheing to work when i do a pants run?
w
the cache writing happens in a background thread, and it starts before compile finishes.
@polite-vase-75369: generally, doing clean builds in CI is a good way to populate the cache (by setting
--no-compile-zinc-incremental
)
...without also waiting for clean builds locally
p
hmmm
but now even when i compile locally i dont see it populating the cache
not doing run, doing compile
have i screwed up a setting somehow?
w
read the help strings again