https://pantsbuild.org/ logo
#general
Title
# general
r

rapid-exabyte-76685

03/29/2022, 4:46 AM
On a new machine (x86 Macbook Pro - to make some progress despite some ARM/Apple Silicon issues) I've checked out my repo that has my WIP Pants integration work... I kick off
./pants test
to bootstrap, build the venvs, and run the tests and find I have continuous loop...
Copy code
14:39:12.61 [INFO] Filesystem changed during run: retrying `Test` in 500ms...
14:39:12.64 [INFO] Canceled: Building requirements.pex with 4 requirements: <requirements elided>
14:40:12.36 [INFO] Filesystem changed during run: retrying `Test` in 500ms...
14:40:12.39 [INFO] Canceled: Building requirements.pex with 4 requirements:
<requirements elided>
I also have the same problem trying to run
./pants repl ::
h

hundreds-father-404

03/29/2022, 4:54 AM
I recommend checking out
.pants.d/pants.log
- it should tell you which files are being invalidated You can then add it to
[GLOBAL].pants_ignore.add
or your top-level
.gitignore
(which auto-populates
pants_ignore
)
r

rapid-exabyte-76685

03/29/2022, 5:40 AM
thanks for the response!
Copy code
15:38:12.50 [INFO] notify invalidation: cleared 0 and dirtied 0 nodes for: {".git", ".git/FETCH_HEAD.lock"}
15:38:12.50 [INFO] notify invalidation: cleared 0 and dirtied 0 nodes for: {".git/FETCH_HEAD.lock", ".git"}
15:38:12.50 [INFO] notify invalidation: cleared 0 and dirtied 0 nodes for: {".git/FETCH_HEAD.lock"}
15:38:12.50 [INFO] notify invalidation: cleared 0 and dirtied 0 nodes for: {".git", ".git/FETCH_HEAD"}
15:38:12.50 [INFO] notify invalidation: cleared 0 and dirtied 0 nodes for: {".git", ".git/FETCH_HEAD"}
15:38:12.50 [INFO] notify invalidation: cleared 1 and dirtied 1008 nodes for: {".git", ".git/FETCH_HEAD.lock"}
15:38:12.50 [INFO] notify invalidation: cleared 0 and dirtied 0 nodes for: {".git/FETCH_HEAD.lock", ".git"}
is what I'm seeing in
<repo root>/.pants.d/pants.log
But I'd think that the .git directory would be ignored by default?
h

hundreds-father-404

03/29/2022, 5:41 AM
So it looks like
.git
is being tracked for some reason 👀 short-term fix is to try this:
Copy code
[GLOBAL]
pants_ignore.add = [".git"]
It should be, idk why it isn't
r

rapid-exabyte-76685

03/29/2022, 5:46 AM
That appears to fix it. The dependencies are being built now, and it isn't being interrupted. And a repl has successfully opened 👍 One of the dependencies is imported from Git (via
poetry_requirements
and the
<dependency_name> = { git = "<https://github.com/some/repo.git>", tag = "some_tag" }
syntax... I wonder if that's a cause?
h

hundreds-father-404

03/29/2022, 5:48 AM
shouldn't be. were you by chance setting
pants_ignore
before? If so, to what?
looks like the default is
.*/
and
dist/
, which should include
.git
. But if you use
pants_ignore
rather than
pants_ignore.add
, you lose the default
r

rapid-exabyte-76685

03/29/2022, 5:55 AM
yep, have been using
pants_ignore
instead of
pants_ignore.add
👍
h

hundreds-father-404

03/29/2022, 1:52 PM
Ahhh that's it, problem solved. I unfortunately don't think there's any change we can make beyond better documentation - there are times you don't want to ignore all of
.*/
, like if you have
.helper_code/
- some repos do that