me and <@UB2J9BQA0> are considering the possibilit...
# development
h
me and @hundreds-father-404 are considering the possibility that having
.*/
as a default ignore pattern in the
--build-ignore
and
--pants-ignore
might be undesirable
w
why, what is getting ignored that shouldn’t be?
h
specifically now that we read from your
.gitignore
. My argument is that it will already ignore things like
.idea/
that you don’t want The other argument is that it’s much easier to add to
pants_ignore
than to take away
Stu, see https://pantsbuild.slack.com/archives/C046T6T9U/p1600970638032400 We’ve been having a hell of a time to get the
.ci
folder read
w
Copy code
pants_ignore.add = ['!.ci']
right?
h
part of the problem here is that the behavior of the gitignore matching library we use and how it interacts with various things pants does with the filesystem is confusing
we also need
build_ignore = ['!.ci']
.add
is actually either broken there right now, or I misunderstand something about how the git ignore syntax works
w
but yea, i think the “reading the gitignore” support does maybe change the equation there.
h
one issue there though
is that I think most .gitignore files don't actually ignore .git itself
h
Yeah, they don’t. We’d for sure want to add
.git
explicitly, and other popular VCS directories
h
another issue is that if a pants user is using a non-git vcs, some stuff might break unexpectedly
although I think we might say that we only explicitly support git?
git is one of those things where it's common enough that most people us it, but there's enough people not using it that we would like to not cause problems for them by accidentally relying on the presence of a
.gitignore
file
h
is that if a pants user is using a non-git vcs, some stuff might break unexpectedly
My argument here is that it’s easier for us to help a user fix this than it is to un-ignore something. Also, that it’s less likely of a problem than the problem Thales is having of “WTF is Pants not reading this. It exists!”
w
we also need 
build_ignore = ['!.ci']
we should definitely remove
.*
from the default
build_ignore
if it is already in
pants_ignore
👍 1
h
that might actually entirely solve his problem
except that it's a bit confusing (at least I think it's confusing) that we need to specify
!/.ci
and not
!/.ci/*
h
although I think we might say that we only explicitly support git?
I don’t think so.
--changed-since
won’t work, and you’ll have to use a bit more work for
pants_ignore
. But otherwise no reason to require Git
w
that’s how gitignore syntax works, afaik
h
it actually might make sense to try to run pants in an environment without git, just to make sure there's nothing unexpected going on
👍 1
that's a bit tangential to this conversation though
h
it actually might make sense to try to run pants in an environment without git, just to make sure there’s nothing unexpected going on
This is the type of stress testing we need to do for 2.0. Try to break Pants as much as we can
h
anyway yeah if we remove
.*/
from teh --build-ignore defaults, then all we have to do to solve thales' problem is make sure
"!/.ci",
is in the --pants-ignore, which is sensible enough
h
Definitely better. I’d still recommend removing
.*
from the default for
pants_ignore
to be an explicitly enumerated list like
[.git, .svn]
But yeah, at least that’s an improvement
h
I'm gonna put a PR for the first one. the second one might or might not be a good idea, I think we should think a bit more if we can come up with a good explicitly enumerated list of common dot-dirs
👍 1