https://pantsbuild.org/ logo
f

fresh-cat-90827

07/19/2022, 2:20 PM
does Pants support working with hidden directories (dot directory, .e.g.
.project
) in the
./pants test .helloworld::
notation? Running this on the example-python repo after renaming the
helloworld
to
.helloworld
ends with an error:
Copy code
$ ./pants test .helloworld::
15:18:35.80 [INFO] Initializing scheduler...
15:18:36.10 [INFO] Scheduler initialized.
15:18:36.17 [ERROR] 1 Exception encountered:

  ResolveError: No targets found for the address glob `.helloworld::`

Do targets exist in those directories? Maybe run `./pants tailor` to generate BUILD files? 
See <https://www.pantsbuild.org/v2.12/docs/targets> about targets and BUILD files.
✅ 1
More:
Copy code
$ ./pants test .helloworld  
15:22:36.69 [ERROR] 1 Exception encountered:

  ResolveError: The file or directory '.helloworld' does not exist on disk in the workspace, so the address '.helloworld' cannot be resolved.
f

fast-nail-55400

07/19/2022, 2:23 PM
--pants-ignore
ignores
.*
in the buildroot by default
Copy code
default:

[
  ".*/",
  "/dist/"
]
This kind of makes me think we should provide a better error when something is ignored vs not existing. CC @hundreds-father-404
f

fresh-cat-90827

07/19/2022, 2:28 PM
ah perfect, thanks @fast-nail-55400 and @bitter-ability-32190
✅ 1
🙌 1
Just did
pants_ignore.add = ["site/", "!.project"]
— nice that negation works in this case!
h

hundreds-father-404

07/19/2022, 2:39 PM
This kind of makes me think we should provide a better error when something is ignored vs not existing.
@witty-crayon-22786 would that be possible?
w

witty-crayon-22786

07/19/2022, 3:57 PM
you could probably do it post-facto, so yea. basically: if something didn’t* match, check whether the pattern would be ignored
b

bitter-ability-32190

07/19/2022, 3:59 PM
And if we know we're going to error, perf doesn't matter 🙂
☝️ 2
h

hundreds-father-404

07/19/2022, 4:12 PM
4 Views