average-breakfast-91545
07/04/2023, 2:13 PMaverage-breakfast-91545
07/04/2023, 2:14 PMaverage-breakfast-91545
07/04/2023, 2:15 PMaverage-breakfast-91545
07/04/2023, 2:16 PMbetter-van-82973
07/04/2023, 2:17 PMaverage-breakfast-91545
07/04/2023, 2:17 PMaverage-breakfast-91545
07/04/2023, 2:18 PMripe-scooter-10665
07/04/2023, 2:18 PMbetter-van-82973
07/04/2023, 2:19 PMaverage-breakfast-91545
07/04/2023, 2:20 PMbetter-van-82973
07/04/2023, 2:21 PMremote_cache_read = true
remote_cache_write = false
remote_store_address = <address here>
Alternatively, within CI you can set the environment variable PANTS_REMOTE_CACHE_WRITE=false
and that should accomplish the same thingaverage-breakfast-91545
07/04/2023, 2:23 PMpants --no-remote-cache-read check
and see if that works. The remote cache is super helpful for testsaverage-breakfast-91545
07/04/2023, 2:23 PMbetter-van-82973
07/04/2023, 2:24 PMaverage-breakfast-91545
07/04/2023, 2:24 PMaverage-breakfast-91545
07/04/2023, 2:25 PMbitter-ability-32190
07/04/2023, 3:42 PMaverage-breakfast-91545
07/04/2023, 3:43 PMbitter-ability-32190
07/04/2023, 3:56 PMenough-analyst-54434
07/04/2023, 9:46 PMenough-analyst-54434
07/04/2023, 9:49 PM~/.cache/pants/named_caches/pex_root
, and I bet you observe the same failure as CI on re-run.enough-analyst-54434
07/04/2023, 9:51 PMenough-analyst-54434
07/04/2023, 10:12 PMbetter-van-82973
07/05/2023, 1:23 AM$ pants check ::
21:13:16.59 [INFO] Initializing scheduler...
21:13:19.51 [INFO] Scheduler initialized.
...
21:13:31.55 [INFO] Completed: Typecheck using Pyright - pyright - pyright succeeded.
Loading configuration file at /private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-SKdiSz/pyrightconfig.json
Searching for source files
Found 197 source files
pyright 1.1.274
0 errors, 0 warnings, 0 informations
Completed in 3.851sec
stubPath /private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-SKdiSz/typings is not a valid directory.
✓ pyright succeeded.
Then removed the cache:
$ rm -r ~/.cache/pants/named_caches/pex_root
Then ran the check again:
$ pants check ::
21:17:41.82 [INFO] Completed: Typecheck using Pyright - pyright - pyright succeeded.
Loading configuration file at /private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-SKdiSz/pyrightconfig.json
Searching for source files
Found 197 source files
pyright 1.1.274
0 errors, 0 warnings, 0 informations
Completed in 3.851sec
stubPath /private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-SKdiSz/typings is not a valid directory.
✓ pyright succeeded.
The second run seems to have benefited from caching on the first run, but Pyright still works just as quickly if I run both the check commands with pants --no-local-cache
. So I’m not totally sure what exactly the problem is, or if I ran pants with the right arguments. I tried running pants with pants --no-pantsd check ::
as well, and that seems to work too.enough-analyst-54434
07/05/2023, 2:06 AMrm -rf ~/.cache/pants/named_caches/pex_root && pkill pantsd
enough-analyst-54434
07/05/2023, 2:06 AMbetter-van-82973
07/05/2023, 2:08 AM--no-pantsd
to ensure that the daemon doesn’t start again?better-van-82973
07/05/2023, 2:11 AM$ rm -rf ~/.cache/pants/named_caches/pex_root && pkill pantsd
$ ps -ef | grep pantsd
501 10083 49701 0 10:10PM ttys004 0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox pantsd
$ pants check ::
...
✓ pyright succeeded.
better-van-82973
07/05/2023, 2:13 AM$ rm -rf ~/.cache/pants/named_caches/pex_root
$ ps -ef | grep pantsd
501 10397 49701 0 10:12PM ttys004 0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox pantsd
$ pants --no-pantsd check ::
...
✓ pyright succeeded.
enough-analyst-54434
07/05/2023, 2:18 AMbetter-van-82973
07/05/2023, 2:23 AMenough-analyst-54434
07/05/2023, 2:29 AM~/.cache/*
on Linux and ~/Library/Caches/*
on Mac are well known / well used places to check. Ditto a ps
to see if it starts a daemon.enough-analyst-54434
07/05/2023, 2:30 AMenough-analyst-54434
07/05/2023, 2:32 AMPYRIGHT_PYTHON_CACHE_DIR
here: https://pypi.org/project/pyright/better-van-82973
07/05/2023, 2:32 AM$ ls ~/.cache/pyright-python/1.1.309/
node_modules package-lock.json package.json
But unfortunately, this directory only seems to contain the NodeJS package for Pyright and not much elsebetter-van-82973
07/05/2023, 2:33 AMenough-analyst-54434
07/05/2023, 2:35 AMenough-analyst-54434
07/05/2023, 2:35 AMbetter-van-82973
07/06/2023, 12:23 AMvenv venvs/918c9178508a995b0dd4e20e20e83fd4186290da/1a5262eabfce46850648f9fd6fb6bab392a7a9f6 subdirectory not found in venv path /Users/krishnanchandra/.cache/pants/named_caches/pex_root.
Which certainly points to @enough-analyst-54434 theory being correct, as this venv path does not exist locally for meenough-analyst-54434
07/06/2023, 12:24 AMbetter-van-82973
07/06/2023, 12:25 AMpants check ::
from a subdirectory, rather than from the top level directory of the repobetter-van-82973
07/06/2023, 12:33 AMpants fix ::
to format (which worked)
3. Run pants check ::
to type check (this did not work)