Directory specs question #1: does a directory incl...
# development
h
Directory specs question #1: does a directory include file-less targets defined in that directory's BUILD? (and possibly subdirs, if recursive) đź§µ
File args only operate on the targets that "own" the source file, as determined by
SourcesField
and
SecondaryOwnerMixin
This means that
./pants list '**/*'
gives different results than
./pants list ::
(even if you didn't consider our weirdness with generated targets not showing up in project introspection goals)
Concrete use case, do we agree that `./pants package cmd/casload`—a Go package with a file-less
go_binary
target in it—should package the
go_binary
? That seems like "obviously, yes!" to me. But want to double check
./pants list 3rdparty/python
would list all
python_requirement
targets defined there (and possibly in subdirs, if recursive)
w
there are a few related questions there probably 1. does
dir:
match all generated targets in a directory 2. does
dir::
match all generated targets in the subdirectories 3. is
dir
equivalent to
dir:
or
dir::
independent of recursion, i think that
dir:
and
dir::
should match generated targets.
h
Yeah, i think it probably should. I don't know how to actually do it, but I do agree it's really really weird that
./pants test src/go/dir::
wouldn't test anything if you have
go.mod
defined at
src/go