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

rich-london-74860

08/12/2022, 3:11 PM
Hello 👋 I’m having an issue where if I run
./pants roots
and
./pants list ::
(or any goal using
::
), then … 1. both commands work locally 2. both work when running in a docker container for the image used in CI/CD 3. in CI/CD,
roots
works as expected, and has the same output as 1 and 2 but
list
gets the error:
Copy code
15:09:10.80 [ERROR] 1 Exception encountered:
  ResolveError: No targets found for the address glob `::`
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.
Why might this be different in this case?
h

happy-kitchen-89482

08/12/2022, 3:46 PM
That is… strange. Sorry for the trouble. Are you running all these commands from the repo root in all cases?
r

rich-london-74860

08/12/2022, 3:53 PM
Yes
h

happy-kitchen-89482

08/12/2022, 4:00 PM
That is very very strange. And you’re certain your BUILD files are in the CI workspace, they’re not gitignored or something?
./pants roots
doesn’t look at BUILD files, but
./pants list ::
does
So I suspect your BUILD files are somehow not visible
r

rich-london-74860

08/12/2022, 4:02 PM
Ah, that’s it! The
.gitignore
included
build
for other reasons, which effectively ignore
BUILD
h

happy-kitchen-89482

08/12/2022, 4:03 PM
aha
So, you can rename BUILD to anything you like
there is a configuration option for that
Or you can use
BUILD.something
without any config changes
with any suffix
as that is already recognized
r

rich-london-74860

08/12/2022, 4:08 PM
Thank you!
4 Views