This is probably a super basic question, but it's ...
# general
f
This is probably a super basic question, but it's driving me nuts... I make edits to my goals.py file and save it (
cat
on the command line shows me the edit did save) but
pants
keeps building using a cached version from somewhere. How do I force it to use the actual file on disk?
deleting the pycache directory and killing the pantsd process seems to do the trick, but I feel like those shouldn't be necessary.
h
This is in an in-repo plugin?
f
Yes, it is an in-repo plugin. What are "Filesystem events"? To me that means
write(2)
. I'm assuming it's actually the file paths, so something like
pants-plugins/**
?
hmm. ok, this didn't work. Can you help me figure out what it's supposed to be?
Copy code
pantsd_invalidation_globs = [
    "pants-plugins/**",
]
FWIW, killing
pantsd
is not sufficient to fix this. I have to delete the
__pycache__
directory as well.
h
Yeah, “file system events” is too vague. It means writes or metadata changes.
If that doesn’t work then something weird is going on wrt
__pycache__
f
ok, trying that now
(my plugin code isn't buildable right now, so it'll take a little while for me to finish up the changes and give it another go)
ok, apparently I'm in the something weird territory now. Problem is still happening
h
To be sure I understand - with the globs change, pantsd is restarted when files in those globs are modified, but the `__pycached__`’d code is run instead of the new code?
f
that appears to be the case, yes.
h
OK, just checking that the pantsd invalidation part is working at least
hmm
f
actually, even that seems intermittent now. 😞
time stamps on the files look right