Hi, go question: I can't seem to get caching to wo...
# general
m
Hi, go question: I can't seem to get caching to work. Every time I run
pants test <target>
, pants redownloads / analyzes dependencies... Is there something I'm missing?
Here's my `pants.toml`:
Copy code
[GLOBAL]
backend_packages = [
  "pants.backend.experimental.go",
  "pants.backend.experimental.go.lint.golangci_lint",
]
pants_version = "2.16.0"

[golang]
minimum_expected_version = "1.20"
subprocess_env_vars.add = [
  "GOPRIVATE=<http://my-gitlob.com/repo/*|my-gitlob.com/repo/*>",
  "HOME",
]

[anonymous-telemetry]
enabled = false
I also don't see any go-specific named caches:
Copy code
ls ~/.cache/pants/named_caches                          
mypy_cache      pex_root        pyenv
h
Hmm, @fast-nail-55400 any thoughts?
c
Does the behavior persist if you bump pantsd memory? https://pantsbuild.slack.com/archives/C046T6T9U/p1673926486485929
m
Oh nice, bumping the max to 8GiB fixed it 👍
c
It' not clear to me why the results can't be cached on disk though
m
Yeah, the named cache is still empty after the run
h
That shouldn't be the case, so something is off I suspect
Do you still get a lot of process reruns that you don't expect after a pantsd restart?
m
Yeah, it seems that after a pantsd restart, it has to re-download and process the go.mod deps.. The test results are cached, though
h
That doesn't seem right to me
Can you create a small repo that reproduces this?
l
@happy-kitchen-89482 I have the same issue. @modern-london-16641 do you create a repo to reproduce this? If not, I will do it.
c
l
@curved-manchester-66006 I think it is. If a goal is run without pantsd it downloads the packages every time. I think loading that would improve the runtime.
m
@lemon-yak-80782 I haven't done it... Feel free (and thanks!)