So someone was reviewing a macro I wrote and asked...
# general
So someone was reviewing a macro I wrote and asked something along the lines of "do all docker_image targets have `name`s?" Neither
pants help-advanced docker_image
pants help-advanced target
mention a
field. But I'm pretty sure targets have names? From the code it looks like the "answer" is: ā€¢ (A) All ``s have a name, but it maybe an implicit one. ā€¢ (B) but! In the case of macros, when you are looking at kwargs said implicit name would not yet be available. So I think I've answered my own question. But should I have been able to answer (A) from
and not grepping the pants source code?
You did šŸ˜‰ generally, target addresses are described here and states about the same as your conclusion
in a macro, if you want to know what the implicit name would be, you can always use
šŸš€ 1