i often want to change my filesystem while running...
# general
i often want to change my filesystem while running pytest, but I get `Filesystem changed during run: retrying
in 500ms...` . I’m pretty confident my changes shouldn’t affect the test (And that in this case I’m not even changing any transitive dependencies of the test). is there a flag I can pass to
pants test
to ignore filesystem changes during run?
Yes there is
. With that you will need
too, because
requires it.
As @lemon-oxygen-72498 says there’s a big hammer. If you find you still want to file watching for relevant sources, you may look at the
file to find out which file was causing the restart and add that to pants ignore paths (or your
if you’ve not told pants to not use that file and you also don’t want it in git): https://www.pantsbuild.org/docs/reference-global#pants_ignore
To echo Andreas, turning off the Pants daemon is always possible, but it comes with a perf hit that you might not want. The
are more performant options, assuming what you want to do is globbable and can safely be ignored. The other question is, are you changing source files during these test runs/
Vs like... Readme files
You could also make a copy of whatever files you need and change them in the sandbox that the test is run in. What files are you changing anyways during your test runs?
assuming that the files are not something that you wanted to have gitignore’d, this likely has something to do with https://github.com/pantsbuild/pants/issues/10705 … sorry for the trouble!
i’ll make sure to include that issue in the prioritization surveying we’re doing now.
Is there are way to have pants ignore readme files or maybe a docs folder? Specially for goals like
or testing? I like to update docs while waiting for things but that causes pants to restart. Very frustrating!😐
👍 1