https://pantsbuild.org/ logo
f

flat-zoo-31952

11/25/2022, 6:26 PM
is there a way to see what files are being changed when Pants says
Copy code
13:22:13.05 [INFO] Filesystem changed during run: retrying `Test` in 500ms...
I've tried
-ldebug
but i'm not seeing the information I want. I just see a bunch of things like
Copy code
13:20:47.09 [DEBUG] Dependency @rule(pants.engine.internals.build_files.evaluate_preludes()) of Some("@rule(pants.engine.internals.build_files.parse_address_family(tests/components/security))") changed.
but that target demonstrably didn't change
w

wide-midnight-78598

11/25/2022, 6:29 PM
Anything useful in the .pants.d/ files?
e

enough-analyst-54434

11/25/2022, 6:31 PM
Yeah, that's the ticket.
f

flat-zoo-31952

11/25/2022, 6:31 PM
Copy code
13:22:27.53 [INFO] notify invalidation: cleared 1 and dirtied 11336 nodes for: {"", "rpmbuild"}
13:22:28.71 [INFO] notify invalidation: cleared 1 and dirtied 11336 nodes for: {"", "rpmbuild"}
13:22:29.21 [INFO] notify invalidation: cleared 1 and dirtied 11336 nodes for: {"", "rpmbuild"}
that what I'm looking for?
e

enough-analyst-54434

11/25/2022, 6:32 PM
Yup
Should be meaningful to you, but if not...
f

flat-zoo-31952

11/25/2022, 6:33 PM
that path is in gitignore though, which should make it in pants ignore
e

enough-analyst-54434

11/25/2022, 6:33 PM
Ok, well it sounds like you have a crease to dig into anyhow.
f

flat-zoo-31952

11/25/2022, 6:34 PM
I guess, but why does pants watch nodes in paths that are gitignored?
w

wide-midnight-78598

11/25/2022, 6:34 PM
I wish Slack kept more history, I could swear I was in this exact thread before . Something that should have been gitignored - was there a setting to use gitignore? Or is it default
e

enough-analyst-54434

11/25/2022, 6:35 PM
That's what I mean, you'll need to dig. Not sure.
šŸ‘šŸ» 1
c

curved-television-6568

11/25/2022, 6:35 PM
the default is to respect .gitignore, iirc
e

enough-analyst-54434

11/25/2022, 6:36 PM
I'd start with identifying whether the "" detail is noise or significant.
w

wide-midnight-78598

11/25/2022, 6:37 PM
And just a sanity (https://www.pantsbuild.org/docs/troubleshooting#pants-cannot-find-a-file-in-your-project) Do you touch
pants_ignore
anywhere in configs? https://www.pantsbuild.org/docs/reference-global#pants_ignore I think last time, someone set pants_ignore, instead of pants_ignore.add (maybe not, as there is a separate pants_use_gitignore)
e

enough-analyst-54434

11/25/2022, 6:37 PM
Maybe that's the name of the containing dir and that's the build root? I'd have to read some code.
f

flat-zoo-31952

11/25/2022, 6:40 PM
pants_ignore_use_gitingore is what controlls if gitignore is included, you don't need pants_ignore.add for that
I can confirm that the path is ignored for e.g. tailor: adding a python file there
Copy code
āÆ touch rpmbuild/some_python_source.py
āÆ ./pants tailor rpmbuild/some_python_source.py 
13:41:01.44 [ERROR] 1 Exception encountered:

  Exception: Unmatched glob from CLI arguments: "rpmbuild/some_python_source.py"
i'll have to wait to later to drill into what the
""
may be about
w

wide-midnight-78598

11/25/2022, 6:42 PM
Maybe of use?
f

flat-zoo-31952

11/25/2022, 6:44 PM
yeah interesting, although changing to
pants_ingore.add
doesn't solve the issue
w

wide-midnight-78598

11/25/2022, 6:45 PM
And it's not a tempfile/lock issue, like in Bastian's case? Some random thing with a ~ added?
I doubt it... But šŸ¤·
f

flat-zoo-31952

11/25/2022, 6:48 PM
okay fun wrinkle: adding "rpmbuild" to my
pants_ignore.add
fixes this, at least until the next problem
leaving that out of pants_ignore.add and just explicitly having pants_ingore_use_gitignore does not lead to it being ignored
looks like bug in how this ignore rules are interpreted, I can try to repro in something open source when I have a minute
thanks all
e

enough-analyst-54434

11/25/2022, 7:00 PM
How is rpmbuild in gitignore exactly? The exact
/rpmbuild/
or something more fuzzy?
f

flat-zoo-31952

11/25/2022, 7:19 PM
Copy code
āÆ grep rpmbuild .gitignore
/rpmbuild/
e

enough-analyst-54434

11/25/2022, 8:03 PM
Nice! I like exact syntax!! Ok, well, I'm sure the eventual dig will be enlightening.
f

flat-zoo-31952

11/26/2022, 11:59 AM
I was able to repro on Pants main, so I made an issue https://github.com/pantsbuild/pants/issues/17642 It seems related to the trailing slash in gitignore patterns
šŸ‘€ 1
6 Views